0

I'm trying to use HSL MA97 for IPOPT on Google colab. I succeeded to run IPOPT (and cyipopt) without HSL linear solver, but failed to run with HSL, for example ma97.

Thank you for your help.

The setting is as follows.

  1. install IPOPT using
!apt install coinor-libipopt1v5 coinor-libipopt-dev
  1. install cyipopt using
!pip install -q cyipopt
  1. clone ThirdParty-HSL
!git clone https://github.com/coin-or-tools/ThirdParty-HSL.git
  1. copy hsl to thirdParty-HSL and install
!cp -R /content/drive/MyDrive/solver/coinhsl/ /content/ThirdParty-HSL/
%cd /content/ThirdParty-HSL/
!./configure
!make
!make install

IPOPT works without HSL, but doesn't work with HSL. I want to find how to make it correct to IPOPT work with HSL MA97.

The following is the Colab notebook that I made.

https://colab.research.google.com/drive/1gFsHMlFUp6eVGEdf3W_t4DHZKhiE7xpx#scrollTo=-N_5KP7kIs8U

RetroD
  • 1
  • 2
  • You would need to provide more information on what "doesn't work" mean. What is the output that makes you come to the conclusion that it "doesn't work". Also include information on which Ipopt version you are using and check the Ipopt docu (https://coin-or.github.io/Ipopt/INSTALL.html#LINEARSOLVERLOADER). – stefan Jan 31 '23 at 02:40
  • Thank you for the comment. "doesn't work" means, as I showed in the Colab notebook, makes the following error if I put an option to use HSL. " TypeError: Invalid option for IPOPT: b'hsllib': /usr/local/lib/libcoinhsl.so (Original message: "Error while assigning an option") " However, if I don't use HSL, IPOPT works and shows the following message. " message: b'Algorithm terminated successfully at a locally optimal point, satisfying the convergence tolerances (can be specified by options).' " – RetroD Jan 31 '23 at 16:45
  • Also, since I'm installing IPOPT with the "!apt install ~~" provided above, the version is 3.11.9 according to the Ubuntu package (https://packages.ubuntu.com/focal/coinor-libipopt-dev). – RetroD Jan 31 '23 at 16:55

1 Answers1

0

The hsllib option is available since Ipopt 3.14 only. So since you use an very old Ipopt version (3.11.9 is from 2014), you cannot use this option. But Ipopt can still try to load a HSL lib at runtime (if that hasn't been disabled in the Ipopt build). You just need to make sure that a libhsl.so can be found, e.g., by setting LD_LIBRARY_PATH. (You need to rename libcoinhsl.so to libhsl.so.)

stefan
  • 799
  • 4
  • 9