Compiling and Installing IPOPT

IPOPT can be easily compiled and installed with the usual configure, make, make install commands. We follow the procedure that is used for most of the COIN-OR projects, based on the GNU autotools. At https://projects.coin-or.org/CoinHelpyou can find a general description of the tools.

Below are the basic steps for the IPOPT compilation that should work on most systems. For special compilations and for some troubleshooting see Appendix 2.9 and consult the generic COIN-OR help page https://projects.coin-or.org/CoinHelp before submitting a ticket or sending a message to the mailing list.

  1. Create a directory where you want to compile IPOPT, for example
    $ mkdir $IPOPTDIR/build
    and go into this direcrory
    $ cd $IPOPTDIR/build

    Note: You can choose any location, including $IPOPTDIR itself, as the location of your compilation. However, on COIN-OR we recommend to keep the source and compiled files separate.

  2. Run the configure script
    $ $IPOPTDIR/configure

    One might have to give options to the configure script, e.g., in order to choose a non-default compiler, or to tell it where some third party code is installed, see Appendix 2.9.

    If the last output line reads ``configure: Main configuration of Ipopt successful'' then everything worked fine. Otherwise, look at the screen output, have a look at the config.log output files and/or consult Appendix 2.9.

    The default configure (without any options) is sufficient for most users that downloaded the source code for the linear solver. If you want to see the configure options, consult Appendix 2.9, and also visit the generic COIN-OR configuration instruction page at

  3. Build the code
    $ make

    Note: If you are using GNU make, you can also try to speed up the compilation by using the -jN flag (e.g., make -j3), where N is the number of parallel compilation jobs. A good number for N is the number of available processors plus one. Under some circumstances, this fails, and you might have to re-issue the command, or omit the -j flag.

  4. If you want, you can run a short test to verify that the compilation was successful. For this, you just enter
    $ make test
    This will test if the AMPL solver executable works (if you got the ASL code) and if the included C++, C, and Fortran examples work.

    Note: The configure script is not able to automatically determine the C++ runtime libraries for the C++ compiler. For certain compilers we enabled default values for this, but those might not exist or be wrong for your compiler. In that case, the C and Fortran example in the test will most probably fail to compile. If you don't want to hook up the compiled IPOPT library to some Fortran or C code that you wrote you don't need to worry about this. If you do want to link the IPOPT library with a C or Fortran compiler, you need to find out the C++ runtime libraries (e.g., by running the C++ compiler in verbose mode for a simple example program) and run configure again, and this time specify all C++ runtime libraries with the CXXLIBS variable (see also Appendix 2.9).

  5. Install IPOPT
    $ make install
    This installs You can change the default installation directory (here $IPOPTDIR/build) to something else (such as /usr/local) by using the --prefix switch for configure.
  6. (Optional) Install IPOPT for use with CUTEr
    If you have CUTEr already installed on your system and you want to use IPOPT as a solver for problems modeled in SIF, type
    $ make cuter
    This assumes that you have the environment variable MYCUTER defined according to the CUTEr instructions. After this, you can use the script sdipo as the CUTEr script to solve a SIF model.

Note: The above procedures show how to compile the code in directories separate from the source files. This comes in handy when you want to compile the code with different compilers, compiler options, or different operating system that share a common file system. To use this feature, change into the directory where you want to compile the code, and then type $IPOPTDIR/configure with all the options. For this, the directories with the IPOPT source must not have any configuration and compiled code.