# How to get HSL up and running with Ipopt

**URL:** <https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138>\
**Category:** Optimization (Mathematical)\
**Tags:** ipopt\
**Created:** [May 11, 2024, 9:16am UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138 "2024-05-11T09:16:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![heiwie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heiwie/32/208105_2.png) [@heiwie](https://discourse.julialang.org/u/heiwie)\
**Post date:** [May 11, 2024, 9:16am UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/1 "2024-05-11T09:16:18Z")

</div>

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](https://github.com/jump-dev/Ipopt.jl), I tried the following in my code:

```julia
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?

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [May 11, 2024, 9:48am UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/2 "2024-05-11T09:48:09Z")

</div>

This is a question for @amontoison

---

<div class="post-metadata">

**Author:** ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)\
**Post date:** [May 11, 2024, 1:59pm UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/3 "2024-05-11T13:59:15Z")

</div>

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.

```julia
using HSL
bool = LIBHSL_isfunctional()

```

```julia
(@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:

```julia
pkg> dev path/to/HSL_jll

```

---

<div class="post-metadata">

**Author:** ![heiwie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heiwie/32/208105_2.png) [@heiwie](https://discourse.julialang.org/u/heiwie)\
**Post date:** [May 11, 2024, 2:14pm UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/4 "2024-05-11T14:14:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)\
**Post date:** [May 11, 2024, 2:59pm UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/5 "2024-05-11T14:59:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![heiwie](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heiwie/32/208105_2.png) [@heiwie](https://discourse.julialang.org/u/heiwie)\
**Post date:** [May 11, 2024, 3:15pm UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/6 "2024-05-11T15:15:03Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)\
**Post date:** [May 11, 2024, 4:12pm UTC](https://discourse.julialang.org/t/how-to-get-hsl-up-and-running-with-ipopt/114138/7 "2024-05-11T16:12:50Z")

</div>

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