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 configure --help.
Also, the generic COIN-OR Help pages are a valuable resource of
information:
Below a few particular options are discussed:
However, you can specify a BLAS library (such as your local ATLAS
library16)
explicitly, using the --with-blas flag for configure.
For example,
./configure --with-blas="-L$HOME/lib -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
--with-blas=BUILD.
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
IPOPT.
--with-hsl flag. And the location of the directory
with the AMPL solver library amplsolver.a and the ASL header
files can be specified with --with-asldir.
--with-pardiso flag, 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
--with-pardiso="-qsmp=omp $HOME/lib/libpardiso_P4AIX51_64_P.so"
If you are using the parallel version of Pardiso, you need to
specify the number of processors it should run on with the
environment variable OMP_NUM_THREADS, as described in the
Pardiso manual.
--with-wsmp flag, 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
--with-wsmp="$HOME/lib/wsmp/wsmp-Linux/lib/IA32/libwsmp.a -lpthread"
--with-mumps-incdir flag,
e.g.,
--with-mumps-incdir="$HOME/MUMPS/include"
and you also need to provide the link flags for MUMPS with the
--with-mumps-lib flag.
./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
CXXLIBS='-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -lstdc++'
./configure AR='ar -X64' NM='nm -X64'
CC='xlc -q64' F77='xlf -q64' CXX='xlC
-q64'
CFLAGS='-O3
-bmaxdata:0x3f0000000'
FFLAGS='-O3 -bmaxdata:0x3f0000000'
CXXFLAGS='-qrtti=dyna -O3 -bmaxdata:0x3f0000000'
--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
$ $HOME/CoinIpopt/configure