Ipopt Build


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.

Compile And Install LAPACK

First we need to download the source code and compile to dynamic shared library.

wget https//github.com/Reference-LAPACK/lapack/archive/v3.9.0.tar.gz

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 install

Compile HSL

There are two versions of HSL available:

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
sudo make install

Compile Ipopt

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

After compiling the whole code, make sure executing make test to check if the Ipopt were working properly.