Download HSL Subroutines

IPOPT requires a sparse symmetric linear solver. There are different possibilities. 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.

In this section we describe how to obtain the source code for MA27 (and MC19) from the Harwell Subroutine Library (HSL) Archive. Those routines are freely available for non-commercial, academic use, but it is your responsibility to investigate the licensing of all third party code. (Since recently, also MA57 (the successor of MA27) is available for free for academic institutions, via the ``HSL 2007 for Researchers'' library, see below.)

The use of alternative linear solvers is described in Sections 2.2.3-2.2.6. You do not necessarily have to use MA27 as described in this section, but at least one linear solver is required for IPOPT to function.

  1. Go to http://hsl.rl.ac.uk/archive/hslarchive.html
  2. Follow the instruction on the website, read the license, and submit the registration form.
  3. Go to HSL Archive Programs, and find the package list.
  4. In your browser window, click on MA27.
  5. Make sure that Double precision: is checked. Click Download package (comments removed)
  6. Save the file as ma27ad.f in $IPOPTDIR/ThirdParty/HSL/
    Note: Some browsers append a file extension (.txt) when you save the file, in which case you have to rename it.
  7. Go back to the package list using the back button of your browser.
  8. In your browser window, click on MC19.
  9. Make sure Double precision: is checked. Click Download package (comments removed)
  10. Save the file as mc19ad.f in $IPOPTDIR/ThirdParty/HSL/
    Note: Some browsers append a file extension (.txt) when you save the file, so you may have to rename it.

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 Harwell solvers, but it can also be switched on for other linear solvers (which usually have internal scaling mechanisms).

Note: If you satisfy the conditions to use the HSL 2007 for Researchers library
(see http://hsl.rl.ac.uk/hsl2007/hsl20074researchers.html), you can download the MA57 in a way very similar to the procedure outlined above. To have Ipopt compile it for you, you need to put the source code into a single file called ma57ad.f (including all dependencies!) that is in the $IPOPTDIR/ThirdParty/HSL/ directory. The IPOPT configuration script will then find this file and compile it into the IPOPT library (just as is would compile MA27). MA57 will perform better with METIS, see Section 2.2.4.

Yet another note: If you have a precompiled library containing the Harwell codes, you can specify the location of this library with the --with-hsl flag for the configure script described in Section 2.3.

Andreas Waechter 2010-12-22