What is Ipopt
Ipopt (Interior Point Optimizer) is an open source software package for large-scale nonlinear optimization. You can find the official documentation HERE.
How to Buid It
The Ipopt relies some dependencies. Make sure install them first.
- LAPACK (Linear Algebra Package)
- HSL (Harwell Subroutines Library)
Compile And Install LAPACK
First we need to download the source code and compile to dynamic shared library.
The LAPACK is compiled to static library by default with unmodified rule, we need to change the 45th line of CMakeLists.txt file.
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
Make build directory and we are good to go.
mkdir build && cd build cmake ../ make make install
There are two versions of HSL available:
- HSL Archive (freely available for personal commercial or non-commercial usage)
- HSL Full (Academic use only)
To obtain the HSL code, you can follow the instructions here. To compile the HSL code via the COIN-OR Tools project ThirdParty-HSL.
git clone https://github.com/coin-or-tools/ThirdParty-HSL.git cd ThirdParty-HSL ./configure make sudo make install
If all the dependencies were correctly installed and default path /usr/local/lib64 was added to the LD_LIBRARY_PATH the Ipopt was very easy to compile. Just clone the project and create a build directory, config it then make.
git clone https://github.com/coin-or/Ipopt cd Ipopt && mkdir build ../configure make
After compiling the whole code, make sure executing
make test to check if the Ipopt were working properly.