RetroD
RetroD

Reputation: 1

Cannot load HSL for IPOPT in Google Colab

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

Upvotes: 0

Views: 306

Answers (1)

stefan
stefan

Reputation: 929

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.)

Upvotes: 0

Related Questions