SumOfSquares.jl icon indicating copy to clipboard operation
SumOfSquares.jl copied to clipboard

Error: no BLAS/LAPACK library loaded!

Open kocvara opened this issue 1 year ago • 8 comments

julia> include("src/dpop1sos.jl")
Precompiling SumOfSquares
        Info Given SumOfSquares was explicitly requested, output will be shown live 
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
.... (many many more lines like that)

This is on Apple M1 processor. The same code works without problems in the same environment on a Mac with Intel processor.

(@v1.10) pkg> st
Status `~/.julia/environments/v1.10/Project.toml`
  [0a46da34] CSDP v1.1.1
  [7c1d4256] DynamicPolynomials v0.6.0
  [4076af6c] JuMP v1.23.0
  [df0521af] Loraine v0.2.4
  [4b9e565b] SumOfSquares v0.7.3

kocvara avatar Aug 19 '24 12:08 kocvara

What does this give

julia> using LinearAlgebra

julia> BLAS.get_config()

before and after including the file ? Are the errors coming from Loraine or CSDP, which solver is used ?

blegat avatar Aug 19 '24 16:08 blegat

Both before and after:

julia> BLAS.get_config()
LinearAlgebra.BLAS.LBTConfig
Libraries: 
└ [ LP64] libopenblasp-r0.3.27.dylib

Error getting with any SDP solver.

Also, whenever I try to include again, SumOfSquares is always precompiling again and giving this message

ERROR: LoadError: Failed to precompile SymbolicWedderburn [858aa9a9-4c7c-4c62-b466-2421203962a2] to "/Users/michal/.julia/compiled/v1.10/SymbolicWedderburn/jl_aEU6JV".

kocvara avatar Aug 19 '24 16:08 kocvara

Do you get the error simply by doing using SymbolicWedderburn ?

blegat avatar Aug 19 '24 16:08 blegat

Ah, ok, all these BLAS errors also come when I just say using SymbolicWedderburn.

kocvara avatar Aug 19 '24 16:08 kocvara

This happens when you're using libblastrampoline without providing a default BLAS.

This fix is: https://github.com/jump-dev/Ipopt.jl/blob/4c156461ef1fda3c9f015520197afda4e8ca3e26/src/Ipopt.jl#L14-L19

But it would be useful to know which dependency is causing it.

odow avatar Aug 20 '24 00:08 odow

It happens right after opening new REPL:

julia> using SymbolicWedderburn
Precompiling SymbolicWedderburn
        Info Given SymbolicWedderburn was explicitly requested, output will be shown live 
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!

kocvara avatar Aug 20 '24 12:08 kocvara

I even removed all other packages from the environment, the problem is still there:

(@v1.10) pkg> st
Status `~/.julia/environments/v1.10/Project.toml`
  [858aa9a9] SymbolicWedderburn v0.4.0

julia> using SymbolicWedderburn
Precompiling SymbolicWedderburn
        Info Given SymbolicWedderburn was explicitly requested, output will be shown live 
Error: no BLAS/LAPACK library loaded!
Error: no BLAS/LAPACK library loaded!

kocvara avatar Aug 20 '24 12:08 kocvara

Then this issue should probably be closed in favor of https://github.com/kalmarek/SymbolicWedderburn.jl/issues/87

odow avatar Aug 20 '24 20:08 odow

I've just seen this issue again.

The issue is because @kocvara has only

Libraries: 
└ [ LP64] libopenblasp-r0.3.27.dylib

and some code is probably looking for an ILP blas.

I can't reproduce on an M4:

(csdp) pkg> st
Status `/private/tmp/csdp/Project.toml`
⌃ [0a46da34] CSDP v1.1.1
⌃ [7c1d4256] DynamicPolynomials v0.6.0
⌃ [4076af6c] JuMP v1.23.0
⌃ [df0521af] Loraine v0.2.4
  [4b9e565b] SumOfSquares v0.7.4
Info Packages marked with ⌃ have new versions available and may be upgradable.

julia> using LinearAlgebra

julia> BLAS.get_config()
LinearAlgebra.BLAS.LBTConfig
Libraries: 
└ [ILP64] libopenblas64_.dylib

julia> using SumOfSquares

odow avatar Oct 17 '25 03:10 odow

I can't reproduce this, even on an M1 machine.

@kocvara how did you install Julia?

If it's not reproducible, I'm tempted to close this issue.

odow avatar Oct 17 '25 23:10 odow