Skip to content

Latest commit

 

History

History
99 lines (80 loc) · 3.16 KB

INSTALL.md

File metadata and controls

99 lines (80 loc) · 3.16 KB

Installation instructions

Packages and libraries

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

Compilation

  1. Create a build directory in the main directory:
mkdir build
  1. Move to the build directory:
cd build/
  1. 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] ..
  1. (or) Use ccmake to provide the paths to the required and optional libraries:
ccmake ..
  1. 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.

Unit tests

  1. Install the GoogleTest suite:
sudo apt-get install googletest
  1. Perform steps 2 and 3 with the flag
-DWITH_GTEST=ON
  1. Run the test suite:
./run_unotest

Autocompletion

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.

Precompiled libraries and executables

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 Linux
  • DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH on macOS
  • PATH 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.