source: ThirdParty/HSL/stable/1.1/INSTALL.HSL @ 1345

Last change on this file since 1345 was 1275, checked in by andreasw, 12 years ago

synchronize ThirdParty?/HSL/stable/1.1 with trunk rev 1274

File size: 6.0 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 a commercial copy of the HSL library or are an
18academic who wants to use the "HSL 2007 for Researchers" library)
19and/or MA27 (if you have only access to the HSL Archive).  In
20addition, you should get MC19 (from the ASL archive).
21
22Different ways to use the HSL routines in Ipopt:
23------------------------------------------------
24
251. If you download the HSL sources when you configure and compile
26   Ipopt, those files will be compiled and included into the Ipopt
27   library and executable.
28
292. You can also compile Ipopt without the HSL source files.  In this
30   case, Ipopt will be built without the HSL routines, but it will be
31   possible to load a shared library at runtime that contains the HSL
32   routines.  For this, you need to provide this shared library.  You
33   can use the Makefiles in this ThirdParty/HSL directory to generate
34   this shared library.  For details, please look at the
35
36   "Compiling a shared library with HSL"
37
38   below in this file.
39
40Instructions on how to download files from the HSL Archive or HSL 2007:
41-----------------------------------------------------------------------
42
43If you need to download subroutines from the HSL Archive or from the
44HSL2007 for Researchers website, this is how it goes:
45
46In order to download the HSL Archive subroutines (like ma27 and mc19),
47you need to register at the HSL Archive website
48
49http://hsl.rl.ac.uk/archive/hslarchive.html
50
51or the HSL 2007 for Researchers website:
52
53http://hsl.rl.ac.uk/hsl2007/hsl20074researchers.html
54
55After that you can log in and go to the page that lists all the
56available HSL packages for download.  If you then click on the name of
57the desired routine (like MA27), you get to a download page, where one
58of the button reads "Download Package (comments removed)".
59
60Click on that button (leave the precision choice at default "Double
61Precision").  This brings up a webpage which contains the code for the
62subroutine as text.  All you have to do now is to save this page (all
63of it, even if there are more than one subroutines in it) into the a
64file called "ma27ad.f".  (If "Save page to..." doesn't work, you can
65copy the content of this page into an editor and save it there.)
66
67Similarly, if you want to get the MC19 routine, do the same steps as above
68and safe the context in a file called "mc19ad.f" .
69
70For neither MA27 or MC19 it is necessary to download any dependencies.
71
72If you want to use MA57, please make sure that all source code for
73MA57 ***including dependencies*** is in a file called ma57ad.f.
74Currently, the dependencies are the files:
75
76 fd15ad.f
77 mc21ad.f
78 mc34ad.f
79 mc47ad.f
80 mc59ad.f
81 mc64ad.f
82 mc71ad.f
83
84plus possibly a dummy file (metis.f) for METIS.  However, it is
85strongly suggested that you use METIS (look at the ThirdParty/Metis
86directory for instructions, or use the --with-metis configure flag to
87specify a procompiled Metis library).
88
89
90Instructions on where to put the source code:
91---------------------------------------------
92
93Copy the source files for the required HSL routines into this
94directory before running the `configure' script.  The configuration
95script will detect which source files you have and prepare the
96Makefile accordingly.
97
98
99Compiling a shared library with HSL
100===================================
101
102Note: This has not yet been successfully tested on all platforms.  It
103      should work on most UNIX systems (including Linux), and also on
104      Cygwin and MSys.  So far, it does not seem to work on AIX.
105
106If you already built an Ipopt executable or library, you can still add
107the functionality of the HSL routines without recompiling Ipopt.  The
108following describes the mechanism that Ipopt uses to use a Harwell
109Subroutine:
110
1111. If the Ipopt binary/library had been compiled with HSL files
112   present, those subroutines are always available.
113
1142. If you are selecting a Harwell subroutine (such as MA27 or MA57 as
115   argument to the "linear_solver" option) which has not been available
116   when Ipopt had been compiled, Ipopt will attempt to load a shared
117   library containing this routine.  The name of the shared library
118   depends on the operating system:
119
120   - Windows (Cygwin/MSys/MSVC): libhsl.dll
121   - Darwin: libhsl.dylib
122   - UNIX (including Linux): libhsl.so
123
124   If this library is not found, or the selected routine is not
125   available in this shared library, Ipopt will abort with an error
126   message.
127
128An easy way to generate this shared library is to use the "configure"
129script in this directory, using the following instructions:
130
1311. Put the HSL routines that are available to you into this directory
132   (see above for the proper names, and how to get them).
133
1342. Run the configure script of ThirdParty/HSL (not the one in the
135   Ipopt base directory!).  As arguments, you would essentially
136   provide the same flags as you would usually when you compile Ipopt,
137   but you need to add the flag "--enable-loadable-library".  Since
138   you are compiling a shared library, you cannot specify the
139   "--disable-shared" flag.
140
1413. Then just run "make install".  If it works, this should give you
142   the shared library in the "lib" subdirectory in the directory where
143   you run the ThirdParty/HSL/configure script.
144
1454. To use the shared library, you need to make sure that Ipopt will
146   find it when it is looking for it.  On most UNIX systems, you need
147   to put the shared library into a directory in the LD_LIBRARY_PATH
148   search path, and on Windows it needs to be in the PATH.
Note: See TracBrowser for help on using the repository browser.