source: ThirdParty/HSL/trunk/INSTALL.HSL @ 950

Last change on this file since 950 was 950, checked in by andreasw, 14 years ago

make clear that the ThirdParty?/HSL/configure script needs to be run, not the Ipopt one

File size: 5.5 KB
Line 
1Installation of certain Harwell subroutines for IPOPT.
2
3*********************************************************************
4Note: It is YOUR RESPONSIBILITY to ensure that you are entitled to
5      download and use this third party package.
6*********************************************************************
7
8Information on the Harwell Subroutine Library (HSL) is available at
9
10http://www.cse.clrc.ac.uk/nag/hsl/
11
12Some of the required HSL routines are available in the HSL Archive.
13The subroutines in the HSL Archive are free for non-commercial
14purposes (make sure you read the license).
15
16The sparse symmetric linear solvers that you can use in Ipopt are MA57
17(if you have access for the standard HSL library) and/or MA27 (if you
18have only access to the HSL Archive).  In addition, you should get
19MC19 (from the ASL archive).
20
21Different ways to use the HSL routines in Ipopt:
22------------------------------------------------
23
241. If you download the HSL sources when you configure and compile
25   Ipopt, those files will be compiled and included into the Ipopt
26   library and executable.
27
282. You can also compile Ipopt without the HSL source files.  In this
29   case, Ipopt will be built without the HSL routines, but it will be
30   possible to load a shared library at runtime that contains the HSL
31   routines.  For this, you need to provide this shared library.  You
32   can use the Makefiles in this ThirdParty/HSL directory to generate
33   this shared library.  For details, please look at the
34
35   "Compiling a shared library with HSL"
36
37   below in this file.
38
39Instructions on how to download files from the HSL Archive:
40-----------------------------------------------------------
41
42If you need to download subroutines from the HSL Archive website, this
43is how it goes:
44
45In order to download the HSL Archive subroutines (like ma27 and mc19),
46you need to register at the HSL Archive website
47
48http://hsl.rl.ac.uk/archive/hslarchive.html
49
50After that you can log in and go to the page that lists all the HSL
51Archive packages for download.  If you then click on the name of the
52desired routine (like MA27), you get to a download page, where one of
53the button reads "Download Package (comments removed)".
54
55Click on that button (leave the precision choice at default "Double
56Precision").  This brings up a webpage which contains the code for the
57subroutine as text.  All you have to do now is to save this page (all
58of it, even if there are more than one subroutines in it) into the a
59file called "ma27ad.f".  (If "Save page to..." doesn't work, you can
60copy the content of this page into an editor and save it there.)
61
62Similarly, if you want to get the MC19 routine, do the same steps as above
63and safe the context in a file called "mc19ad.f" .
64
65For neither MA27 or MC19 it is necessary to download any dependencies.
66
67Instructions on where to put the source code:
68---------------------------------------------
69
70Copy the source files for the required HSL routines into this
71directory before running the `configure' script.  The configuration
72script will detect which source files you have and prepare the
73Makefile accordingly.
74
75If you want to use MA57, please make sure that all source code for
76MA57 ***including dependencies*** is in a file called ma57ad.f.
77Currently, it seems that the dependencies are the files:
78
79 fd15ad.f
80 mc21ad.f
81 mc34ad.f
82 mc47ad.f
83 mc59ad.f
84 mc64ad.f
85 mc71ad.f
86
87
88Compiling a shared library with HSL
89===================================
90
91Note: This has not yet been successfully tested on all platforms.  It
92      should work on most UNIX systems (including Linux), and also on
93      Cygwin and MSys.
94
95If you already built an Ipopt executable or library, you can still add
96the functionality of the HSL routines without recompiling Ipopt.  The
97following describes the mechanism that Ipopt uses to use a Harwell
98Subroutine:
99
1001. If the Ipopt binary/library had been compiled with HSL files
101   present, those subroutines are always available.
102
1032. If you are selecting a Harwell subroutine (such as MA27 or MA57 as
104   argument to the "linear_solver" option) which has not been available
105   when Ipopt had been compiled, Ipopt will attempt to load a shared
106   library containing this routine.  The name of the shared library
107   depends on the operating system:
108
109   - Windows (Cygwin/MSys/MSVC): libhsl.dll
110   - Darwin: libhsl.dylib
111   - UNIX (including Linux): libhsl.so
112
113   If this library is not found, or the selected routine is not
114   available in this shared library, Ipopt will abort with an error
115   message.
116
117An easy way to generate this shared library is to use the "configure"
118script in this directory, using the following instructions:
119
1201. Put the HSL routines that are available to you into this directory
121   (see above for the proper names, and how to get them).
122
1232. Run the configure script of ThirdParty/HSL (not the one in the
124   Ipopt base directory!).  As arguments, you would essentially
125   provide the same flags as you would usually when you compile Ipopt,
126   but you need to add the flag "--enable-loadable-library".  Since
127   you are compiling a shared library, you cannot specify the
128   "--disable-shared" flag.
129
1303. Then just run "make install".  If it works, this should give you
131   the shared library in the "lib" subdirectory in the directory where
132   you run the ThirdParty/HSL/configure script.
133
1344. To use the shared library, you need to make sure that Ipopt will
135   find it when it is looking for it.  On most UNIX systems, you need
136   to put the shared library into a directory in the LD_LIBRARY_PATH
137   search path, and on Windows it needs to be in the PATH.
Note: See TracBrowser for help on using the repository browser.