How to get HSL up and running with Ipopt

Hello,

I have recently received an academic license for HSL, and so I wish to try this linear solver out for Ipopt in order to see if there is an increase in performance of my model. Based on this source: GitHub - jump-dev/Ipopt.jl: Julia interface to the Ipopt nonlinear solver, I tried the following in my code:

model = Model(Ipopt.Optimizer)
set_attribute(model, "hsllib", HSL_jll.libhsl_path)
set_attribute(model, "linear_solver", "ma86")

However, this leads to the following error:
Exception message: Error 127 while loading symbol ma86_default_control_d from C:\Users\mikkelhs.julia\artifacts\6a9bbd38c80718e9eb6d302c238dd2e422140665\bin\libhsl.dll: The specified procedure could not be found.

Even though I have downloaded the package HSL_jll and also the CoinHSL resource I got with my license, which appears to contain the ma86 solver and so forth. The issue appears to be that the resource I downloaded is not linked to HSL_jll or Ipopt, does anyone have any guidance?

2 Likes

This is a question for @amontoison

1 Like

Hi @heiwie!
I think that you use the dummy HSL_jll.jl in your environment (v2.0.0).
You can check if you have the correct HSL_jll.jl with the Julia interface HSL.jl and the package manager.

using HSL
bool = LIBHSL_isfunctional()
(@v1.10) pkg> status HSL_jll
Status `~/.julia/environments/v1.10/Project.toml`
  [017b0a0e] HSL_jll v2023.11.7+0 `~/Applications/libHSL//HSL_jll.jl-2023.11.7`

If you have the version 2.0.0, you need install the complete HSL_jll.jl with:

pkg> dev path/to/HSL_jll

Hi,

I have seen multiple references to the dev command, but I do not quite understand how it works. Am I supposed to insert the path in which I want HSL_jll installed? When I directly copy the command I get the following error:

path/to/HSL_jll appears to be a local path, but directory does not exist

And even when I try to insert a path on my computer, I get the same error.

The dev command allows to install a local version of a Julia package.
Due to license restriction, we can’t provide the official HSL_jll.jl through the Julia package manager.

The user must download it from the libHSL webpage and after install it locally.
With the dev command, you provide where is HSL_jll.jl on your computer.

I think that you can drag and drop a Windows folder into the Julia REPL to get its path.

Ah, now I see. It appears I applied for the wrong resource (CoinHSL instead of LibHSL). Is it possible to use CoinHSL for the same purpose, or should I apply for the libHSL?

I recommend to apply for libHSL.
Coin-HSL doesn’t have a precompiled version like HSL_jll.jl for the Julia ecosystem.