-
download the AMPL solver library (ASL): http://www.netlib.org/ampl/solvers/
-
download optional solvers:
- BQPD (indefinite null-space QP solver): https://www.mcs.anl.gov/~leyffer/solvers.html
- MA57 (sparse indefinite symmetric linear solver): http://www.hsl.rl.ac.uk/catalogue/ma57.html
- LIBHSL (collection of libraries for sparse linear systems): https://licences.stfc.ac.uk/products/Software/HSL/LibHSL
- MUMPS (sparse indefinite symmetric linear solver): https://mumps-solver.org/index.php?page=dwnld
- HiGHS (linear programming solver): https://highs.dev
-
to compile MUMPS in sequential mode, set the following variables at the end of your Makefile.inc:
INCS = $(INCSEQ)
LIBS = $(LIBSEQ)
LIBSEQNEEDED = libseqneeded
- install BLAS and LAPACK:
sudo apt-get install libblas-dev liblapack-dev
- install cmake (and optionally ccmake, CMake curses interface):
sudo apt-get install cmake cmake-curses-gui
- Create a
build
directory in the main directory:
mkdir build
- Move to the build directory:
cd build/
- Execute cmake (you may provide the paths to the libraries ASL, BQPD and MA57):
cmake -DBQPD=path -DMA57=path -DAMPLSOLVER=path -DCMAKE_BUILD_TYPE=[Release|Debug] ..
- (or) Use ccmake to provide the paths to the required and optional libraries:
ccmake ..
- Compile (in parallel:
n
being the number of threads, e.g. 6):
make -jn
To compile the code with different configurations, simply create a build
directory for each configuration and perform instructions 1 to 5.
- Install the GoogleTest suite:
sudo apt-get install googletest
- Perform steps 2 and 3 with the flag
-DWITH_GTEST=ON
- Run the test suite:
./run_unotest
To benefit from autocompletion, install the file uno_ampl-completion.bash
:
sudo cp uno_ampl-completion.bash /etc/bash_completion.d/
and open a new terminal.
We provide precompiled Uno libraries and executables in the releases tab for Linux, macOS (Intel & Silicon), and Windows.
On some platforms, the dynamic linker needs to know where to look for libraries at runtime. You might need to set the following environment variables:
LD_LIBRARY_PATH
on LinuxDYLD_LIBRARY_PATH
orDYLD_FALLBACK_LIBRARY_PATH
on macOSPATH
on Windows
These variables should include the directory where you extracted the library files.
For all platforms, the environment variable PATH
is needed to locate the binary uno_ampl
/ uno_ampl.exe
.
Example for Linux:
tar -xzf Uno.vX.Y.Z.linux.tar.gz
export LD_LIBRARY_PATH=/path/to/extracted/Uno/lib:$LD_LIBRARY_PATH
export PATH=/path/to/extracted/Uno/bin:$PATH
Note: The provided shared library libhsl.so
/ libhsl.dylib
/ libhsl.dll
in the precompiled archive does not contain the HSL solvers like MA57 but can be replaced with the official version without the need to recompile anything.