[Ipopt+HSL] Error: no BLAS/LAPACK library loaded!

Happy New Year!

I’m having an error with Ipopt and HSL library.

With a toy example:

using JuMP, Ipopt
m = Model(Ipopt.Optimizer)
set_optimizer_attribute(m, "linear_solver", "ma86")
@variable(m, x <= 5)
@variable(m, y <= 45)
@objective(m, Max, x + y)
JuMP.optimize!(m)

Ipopt + HSL has started to give me the following error (It used to be working fine):

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit https://github.com/coin-or/Ipopt
******************************************************************************

This is Ipopt version 3.14.4, running with linear solver ma86.

Number of nonzeros in equality constraint Jacobian...:        0
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:        0

Total number of variables............................:        2
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        2
Total number of equality constraints.................:        0
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls
   0  0.0000000e+00 0.00e+00 0.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
   1  4.9411805e+01 0.00e+00 1.00e-06  -1.0 4.49e+01    -  1.00e+00 9.92e-01f  1
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
   2  4.9960000e+01 0.00e+00 2.00e-07  -1.7 4.30e-01    -  1.00e+00 1.00e+00f  1
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
   3  4.9999700e+01 0.00e+00 1.50e-09  -3.8 1.98e-02    -  1.00e+00 1.00e+00f  1
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
   4  4.9999997e+01 0.00e+00 1.84e-11  -5.7 1.49e-04    -  1.00e+00 1.00e+00f  1
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
   5  5.0000000e+01 0.00e+00 2.51e-14  -8.6 1.84e-06    -  1.00e+00 1.00e+00f  1

Number of Iterations....: 5

                                   (scaled)                 (unscaled)
Objective...............:  -5.0000000494988193e+01    5.0000000494988193e+01
Dual infeasibility......:   2.5091040356528538e-14    2.5091040356528538e-14
Constraint violation....:   0.0000000000000000e+00    0.0000000000000000e+00
Variable bound violation:   4.4749409511268823e-07    4.4749409511268823e-07
Complementarity.........:   2.5059065933419962e-09    2.5059065933419962e-09
Overall NLP error.......:   2.5059065933419962e-09    2.5059065933419962e-09


Number of objective function evaluations             = 6
Number of objective gradient evaluations             = 6
Number of equality constraint evaluations            = 0
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 1
Total seconds in IPOPT                               = 0.182

EXIT: Optimal Solution Found.

Can this be related to “OpenBLAS32_jll v0.3.17+0”?

My current environment is the following:

julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)

and

(@v1.7) pkg> status
      Status `~/.julia/environments/v1.7/Project.toml`
  [336ed68f] CSV v0.9.11
  [5ae59095] Colors v0.12.8
  [a93c6f00] DataFrames v1.3.1
  [31c24e10] Distributions v0.25.37
  [2e9cd046] Gurobi v0.10.1
  [b6b21f68] Ipopt v0.9.1
  [033835bb] JLD2 v0.4.17
  [4076af6c] JuMP v0.22.2
  [67920dd8] KNITRO v0.11.0
  [b964fa9f] LaTeXStrings v1.3.0
  [23992714] MAT v0.10.2
  [6405355b] Mosek v1.2.1
  [1ec41992] MosekTools v0.11.0
  [a8b11937] OpenDSSDirect v0.7.2
  [8314cec4] PGFPlotsX v1.4.1
  [91a5bcdd] Plots v1.25.5
  [c36e90e8] PowerModels v0.19.1
  [22bb73d7] SVR v1.2.3

Thank you!

See GitHub - jump-dev/Ipopt.jl: Julia interface to the Ipopt nonlinear solver

1 Like

@odow would registering GitHub - giordano/OpenBLAS32.jl help?

@odow This resolved my issue. Thank you so much!

1 Like

would registering GitHub - giordano/OpenBLAS32.jl help?

We could just add that piece of code to Ipopt directly. I don’t think we need an extra dependency.

Yeah, well, that’s literally one line :grinning_face_with_smiling_eyes:

1 Like

@odow Is there a way to automatically run (or initialize) the suggested code?

import LinearAlgebra, OpenBLAS32_jll
LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path)

It is a little bit of a hassle to run it every time :sweat_smile:

The suggestion above is to add it to Ipopt. (I’ll review a pull request with it if you want to make one.)

Otherwise it’s only one line, and you’re using non-standard Ipopt options, so it isn’t that much of an inconvenience.

1 Like

@odow Fair enough. Thank you for your input.

1 Like