Download External Code

IPOPT uses a few external packages that are not included in the IPOPT source code distribution, namely ASL (the AMPL Solver Library if you want to compile the IPOPT AMPL solver executable), Blas, Lapack.

IPOPT also requires at least one linear solver for sparse symmetric indefinite matrices. There are different possibilities, see Sections 2.3.2-2.3.5. It is important to keep in mind that usually the largest fraction of computation time in the optimizer is spent for solving the linear system, and that your choice of the linear solver impacts IPOPT's speed and robustness. It might be worthwhile to try different linear solver to experiment with what is best for your application.

Since this third party software is released under different licenses than IPOPT, we cannot distribute their code together with the IPOPT packages and have to ask you to go through the hassle of obtaining it yourself (even though we tried to make it as easy for you as we could). Keep in mind that it is still your responsibility to ensure that your downloading and usage of the third party components conforms with their licenses.

Note that you only need to obtain the ASL if you intend to use IPOPT from AMPL. It is not required if you want to specify your optimization problem in a programming language (C++, C, or Fortran). Also, currently, Lapack is only required if you intend to use the quasi-Newton options implemented in IPOPT.

Download BLAS, LAPACK and ASL

Note: It is highly recommended that you obtain an efficient implementation of the BLAS library, tailored to your hardware; Section 1.3 lists a few options. Assuming that your precompiled efficient BLAS library is libmyblas.a in $HOME/lib, you need to add the flag -with-blas="-L$HOME/lib -lmyblas" when you run configure (see Section 2.4). Some of those libraries also include LAPACK.

If you have the download utility wget installed on your system (or ftp on Mac OS X), retrieving source code for BLAS (the inefficient reference implementation, not required if you have a precompiled library), as well as LAPACK and ASL is straightforward using scripts included with the ipopt distribution. These scripts download the required files from the Netlib Repository (

$ cd $IPOPTDIR/ThirdParty/Blas
$ ./get.Blas
$ cd ../Lapack
$ ./get.Lapack
$ cd ../ASL
$ ./get.ASL

If you do not have wget (or ftp on Mac OS X) installed on your system, please read the INSTALL.* files in the $IPOPTDIR/ThirdParty/Blas, $IPOPTDIR/ThirdParty/Lapack and $IPOPTDIR/ThirdParty/ASL directories for alternative instructions.

If you are having firewall issues with wget, try opening the get.<library> scripts and replace the line wgetcmd=wget with wgetcmd="wget -passive-ftp".

If you are getting permissions errors from tar, try opening the get.<library> scripts and replace any instances of tar xf with tar -no-same-owner -xf.

Download HSL Subroutines

There are two versions of HSL available:

HSL Archive
contains outdated codes that are freely available for personal commercial or non-commercial usage. Note that you may not redistribute these codes in either source or binary form without purchasing a licence from the authors. This version includes MA27, MA28, and MC19.
HSL 2011
contains more modern codes that are freely available for academic use only. This version includes the codes from the HSL Archive and additionally MA57, HSL_MA77, HSL_MA86, and HSL_MA97. IPOPT supports the HSL 2011 codes from 2012 and 2013, the support for the versions from 2012 may be dropped in a future release.

To obtain the HSL code, you can follow the following steps:

  1. Go to
  2. Choose whether to download either the Archive code or the HSL 2011 code. To download, select the relevant ``source'' link.
  3. Follow the instructions on the website, read the license, and submit the registration form.
  4. Wait for an email containing a download link (this should take no more than one working day).

You may either:

To compile the HSL code as part of IPOPT, unpack the archive, then move and rename the resulting directory so that it becomes $IPOPTDIR/ThirdParty/HSL/coinhsl. IPOPT may then be configured as normal.

Note: Whereas it is essential to have at least one linear solver, the package MC19 could be omitted (with the consequence that you cannot use this method for scaling the linear systems arising inside the IPOPT algorithm). By default, MC19 is only used to scale the linear system when using one of the HSL solvers, but it can also be switched on for other linear solvers (which usually have internal scaling mechanisms). Further, also the package MA28 can be omitted, since it is used only in the experimental dependency detector, which is not used by default.

Note: If you are an academic or a student, we recommend you download the HSL 2011 package as this ensures you have access to the full range of solvers. MA57 can be considerably faster than MA27 on some problems.

Yet another note: If you have a precompiled library containing the HSL codes, you can specify the directory with the header files and the linker flags for this library with the --with-hsl-incdir and --with-hsl-lib flags for the configure script described in Section 2.4.

Obtaining the MUMPS Linear Solver

You can also use the (public domain) sparse linear solver MUMPS. Please visit the MUMPS home page more information about the solver. MUMPS is provided as Fortran 90 and C source code. You need to have a Fortran 90 compiler (for example, the GNU compiler gfortran is a free one) to be able to use it.

You can obtain the MUMPS code by running the script $IPOPTDIR/ThirdParty/Mumps/get.Mumps if you have wget (or ftp on Mac OS X) installed in your system. Alternatively, you can get the latest version from the MUMPS home page and extract the archive in the directory $IPOPTDIR/ThirdParty/Mumps. The extracted directory usually has the MUMPS version number in it, so you need to rename it to MUMPS such that you have a file called $IPOPTDIR/ThirdParty/Mumps/MUMPS/README.

Once you put the MUMPS source code into the correct place, the IPOPT configuration scripts will automatically detect it and compile MUMPS together with IPOPT, if your Fortran compiler is able to compile Fortran 90 code.

Note: MUMPS will perform better with METIS, see Section 2.3.7.

Note: MUMPS uses interally a fake implementation of MPI. If you are using IPOPT within an MPI program together with MUMPS, the code will not run. You will have to modify the MUMPS sources so that the MPI symbols inside the MUMPS code are renamed.

Obtaining the Linear Solver Pardiso

If you would like to compile IPOPT with the Parallel Sparse Direct Linear Solver (Pardiso), you need to obtain either Intel's MKL library or the Pardiso library from for your operating system.

From, you can obtain a limited time license of Pardiso for academic or evaluation purposes or buy a non-profit or commercial license. Make sure you read the license agreement before filling out the download form.

Please consult Appendix 2.9 to find out how to configure your IPOPT installation to work with Pardiso.

Obtaining the Linear Solver WSMP

If you would like to compile IPOPT with the Watson Sparse Matrix Package (WSMP), you need to obtain the WSMP library for your operating system. Information about WSMP can be found at

At this website you can download the library for several operating systems including a trial license key for 90 days that allows you to use WSMP for ``educational, research, and benchmarking purposes by non-profit academic institutions'' or evaluation purposes by commercial organizations; make sure you read the license agreement before using the library. Once you obtained the library and license, please check if the version number of the library matches the one on the WSMP website.

If a newer version is announced on that website, you can (and probably should) request the current version by sending a message to Please include the operating system and other details to describe which particular version of WSMP you need.

Note: Only the interface to the shared-memory version of WSMP is currently supported.

Please consult Appendix 2.9 to find out how to configure your IPOPT installation to work with WSMP.

Using the Linear Solver Loader

By default, IPOPT will be compiled with a mechanism, the Linear Solver Loader, which can dynamically load shared libraries with MA27, MA57, HSL_MA77, HSL_MA86, HSL_MA97, or the Pardiso linear solver at runtime8. This means, if you obtain one of those solvers after you compiled IPOPT, you don't need to recompile to use it. Instead, you can just put a shared library called or into the shared library search path, LD_LIBRARY_PATH. These are the names on most UNIX platforms, including Linux. On Mac OS X, the names are libhsl.dylib, libpardiso.dylib, and DYLD_LIBRARY_PATH. On Windows, the names are libhsl.dll, libpardiso.dll, and PATH.

The Pardiso shared library can be downloaded from the Pardiso website. To create a shared library containing the HSL linear solvers, read the instructions in $IPOPTDIR/ThirdParty/HSL/INSTALL.HSL.

Obtaining METIS

The linear solvers MA57, HSL_MA77, HSL_MA86, HSL_MA97, and MUMPS can make use of the matrix ordering algorithms implemented in METIS (see If you are using one of these linear solvers, you should obtain the METIS source code and put it into $IPOPTDIR/ThirdParty/Metis. Read the INSTALL.Metis file in that directory, and if you have the wget utility (or ftp on Mac OS X) installed on your system, you can download the code by running the ./get.Metis script.

Note, that only the older METIS 4.x version9 is supported by MA57, HSL_MA77, HSL_MA86, HSL_MA97, MUMPS, and the build system. The ./get.Metis script takes care of downloading the right METIS version.


... runtime8
This is not enabled if you compile IPOPT with the MS Visual Studio project files provided in the IPOPT distribution. Further, if you have problems compiling this new feature, you can disable this by specifying -disable-linear-solver-loader for the configure script
... version9