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

Last change on this file since 3338 was 2542, checked in by stefan, 9 years ago

assume sources in coinhsl subdirectory; change version number to 1.4, so we can check for version >= 1.3 in Ipopt

File size: 4.2 KB
Line 
1Installation of certain Harwell subroutines.
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.hsl.rl.ac.uk/
11
12For use by COIN-OR, STFC provides special packages at
13
14http://www.hsl.rl.ac.uk/ipopt/
15
16which can be build independently or within the buildsystem in this
17directory.
18
19Different ways to use the HSL routines in COIN-OR Ipopt:
20--------------------------------------------------------
21
221. If you download the HSL sources when you configure and compile
23   Ipopt, those files will be compiled and included into the Ipopt
24   executable.
25
262. You can also compile Ipopt without the HSL source files.  In this
27   case, Ipopt will be built without the HSL routines, but it will be
28   possible to load a shared library at runtime that contains the HSL
29   routines.  For this, you need to provide this shared library.  You
30   can use the Makefile of the coinhsl package obtained from HSL or
31   the Makefiles in this ThirdParty/HSL directory to generate
32   this shared library.  For details, please look at the
33
34   "Compiling a shared library with HSL"
35
36   below in this file.
37
38Instructions on providing the source code for ThirdParty/HSL:
39-------------------------------------------------------------
40
41First, follow the links at http://www.hsl.rl.ac.uk/ipopt to register and
42obtain an archive coinhsl-x.y.z.tar.gz.
43
44Unpack this archive via
45  gunzip coinhsl-x.y.z.tar.gz
46  tar xf coinhsl-x.y.z.tar
47
48Then rename the directory coinhsl-x.y.z to coinhsl, or set a symbolic link:
49  ln -s coinhsl-x.y.z coinhsl
50
51The configuration script will then detect which source files are available
52in your coinhsl package and prepare the Makefile accordingly.
53
54Note, that in difference to previous versions of ThirdParty/HSL, the
55configure script now checks for the HSL routines in subdirectories
56as they are given in the coinhsl-x.y.z.tar.gz archive.
57
58Compiling a shared library with HSL
59===================================
60
61Note: This has not yet been successfully tested on all platforms.  It
62      should work on most UNIX systems (including Linux), and also on
63      Cygwin and MSys.  So far, it does not seem to work on AIX.
64
65If you already built an Ipopt executable or library, you can still add
66the functionality of the HSL routines without recompiling Ipopt.  The
67following describes the mechanism that Ipopt uses to use a Harwell
68Subroutine:
69
701. If the Ipopt binary/library had been compiled with HSL files
71   present, those subroutines are always available.
72
732. If you are selecting a Harwell subroutine (such as MA27 or MA57 as
74   argument to the "linear_solver" option) which has not been available
75   when Ipopt had been compiled, Ipopt will attempt to load a shared
76   library containing this routine.  The name of the shared library
77   depends on the operating system:
78
79   - Windows (Cygwin/MSys/MSVC): libhsl.dll
80   - Darwin: libhsl.dylib
81   - UNIX (including Linux): libhsl.so
82
83   If this library is not found, or the selected routine is not
84   available in this shared library, Ipopt will abort with an error
85   message.
86
87An easy way to generate this shared library is to use the "configure"
88script in this directory, using the following instructions:
89
901. Put the HSL routines that are available to you into this directory
91   (see above).
92
932. Run the configure script of ThirdParty/HSL (not the one in the
94   Ipopt base directory!).  As arguments, you would essentially
95   provide the same flags as you would usually when you compile Ipopt,
96   but you need to add the flag "--enable-loadable-library".  Since
97   you are compiling a shared library, you cannot specify the
98   "--disable-shared" flag.
99
1003. Then just run "make install".  If it works, this should give you
101   the shared library in the "lib" subdirectory in the directory where
102   you run the ThirdParty/HSL/configure script.
103
1044. To use the shared library, you need to make sure that Ipopt will
105   find it when it is looking for it.  On most UNIX systems, you need
106   to put the shared library into a directory in the LD_LIBRARY_PATH
107   search path, and on Windows it needs to be in the PATH.
Note: See TracBrowser for help on using the repository browser.