The configuration script and Makefiles in the IPOPT distribution have been created using GNU's autoconf and automake. They attempt to automatically adapt the compiler settings etc. to the system they are running on. We tested the provided scripts for a number of different machines, operating systems and compilers, but you might run into a situation where the default setting does not work, or where you need to change the settings to fit your particular environment.
In general, you can see the list of options and variables that can be
set for the configure script by typing
Also, the generic COIN-OR Help pages are a valuable resource of
Below a few particular options are discussed:
However, you can specify a BLAS library (such as your local ATLAS
explicitly, using the
--with-blas flag for configure.
./configure --with-blas="-L$HOME/lib -lf77blas -lcblas -latlas"
To tell the configure script to compile and use the downloaded BLAS
source files even if a BLAS library is found on your system, specify
Similarly, you can use the
--with-lapack switch to specify
the location of your LAPACK library, or use the keyword BUILD
to force the IPOPT makefiles to compile LAPACK together with
--with-hslflag. And the location of the directory with the AMPL solver library amplsolver.a and the ASL header files can be specified with
--with-pardisoflag, including required additional libraries and flags. For example, if you want to compile IPOPT with the parallel version of Pardiso (located in $HOME/lib) on an AIX system in 64bit mode, you should add the flag
If you are using the parallel version of Pardiso, you need to
specify the number of processors it should run on with the
OMP_NUM_THREADS, as described in the
--with-wsmpflag, including required additional libraries and flags. For example, if you want to compile IPOPT with WSMP (located in $HOME/lib) on an Intel IA32 Linux system, you should add the flag
and you also need to provide the link flags for MUMPS with the
./configure CXX=g++-4.2.0 CC=gcc-4.2.0 F77=gfortran-4.2.0
In order to set the compiler flags, you should use the variables CXXFLAGS, CFLAGS, FFLAGS. Note, that the IPOPT code uses ``dynamic_cast''. Therefore it is necessary that the C++ code is compiled including RTTI (Run-Time Type Information). Some compilers need to be given special flags to do that (e.g., ``-qrtti=dyna'' for the AIX xlC compiler).
Please also check the generic COIN-OR help page at
for the description of more variables that can be set for configure.
If you have problems linking your Fortran or C code with the IPOPT library libipopt.a and the linker complains about missing symbols from C++ (e.g., the standard template library), you should specify the C++ libraries with the CXXLIBS variable. To find out what those libraries are, it is probably helpful to link a simple C++ program with verbose compiler output.
For example, for the Intel compilers on a Linux system, you might need to specify something like
./configure CC=icc F77=ifort CXX=icpc
./configure AR='ar -X64' NM='nm -X64'
CC='xlc -q64' F77='xlf -q64' CXX='xlC -q64'
CXXFLAGS='-qrtti=dyna -O3 -bmaxdata:0x3f0000000'
(Alternatively, a simpler solution for AIX is to set the environment variable OBJECT_MODE to 64.)
--enable-debug. Then the compilers will use the debug flags (unless the compilation flag variables are overwritten in the configure command line)
Also, you can tell IPOPT to do some additional runtime sanity checks, by specifying the flag -with-ipopt-checklevel=1.
This usually leads to a significant slowdown of the code, but might be helpful when debugging something.
$ mkdir $HOME/Ipopt-objects
$ cd $HOME/Ipopt-objects
Andreas Waechter 2010-12-22