Feb 25, 2008 2:27:52 PM (14 years ago)

added instructions on how to build a shared library containing HSL

1 edited


  • ThirdParty/HSL/trunk/INSTALL.HSL

    r225 r949  
    1919MC19 (from the ASL archive).
     21Different ways to use the HSL routines in Ipopt:
     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.
     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
     35   "Compiling a shared library with HSL"
     37   below in this file.
    2239Instructions on how to download files from the HSL Archive:
    6784 mc64ad.f
    6885 mc71ad.f
     88Compiling a shared library with HSL
     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.
     96If you already built an Ipopt executable or library, you can still add
     97the functionality of the HSL routines without recompiling Ipopt.  The
     98following describes the mechanism that Ipopt uses to use a Harwell
     1011. If the Ipopt binary/library had been compiled with HSL files
     102   present, those subroutines are always available.
     1042. If you are selecting a Harwell subroutine (such as MA27 or MA57 as
     105   argument to the "linear_solver" option) which has not been available
     106   when Ipopt had been compiled, Ipopt will attempt to load a shared
     107   library containing this routine.  The name of the shared library
     108   depends on the operating system:
     110   - Windows (Cygwin/MSys/MSVC): libhsl.dll
     111   - Darwin: libhsl.dylib
     112   - UNIX (including Linux): libhsl.so
     114   If this library is not found, or the selected routine is not
     115   available in this shared library, Ipopt will abort with an error
     116   message.
     118An easy way to generate this shared library is to use the "configure"
     119script in this directory, using the following instructions:
     1211. Put the HSL routines that are available to you into this directory
     122   (see above for the proper names, and how to get them).
     1242. Run the configure script, as you would usually do it for Ipopt, but
     125   add the flag "--enable-loadable-library".  Since you are compiling
     126   a shared library, you cannot specify the "--disable-shared" flag.
     1283. Then just run "make install".  If it works, this should give you
     129   the shared library in the "lib" subdirectory in the directory where
     130   you run the configure script.
     1324. To use the shared library, you need to make sure that Ipopt will
     133   find it when it is looking for it.  On most UNIX systems, you need
     134   to put the shared library into a directory in the LD_LIBRARY_PATH
     135   search path, and on Windows it needs to be in the PATH.
Note: See TracChangeset for help on using the changeset viewer.