jump-dev / SumOfSquares.jl

Sum of Squares Programming for Julia
Other
115 stars 24 forks source link

Error: no BLAS/LAPACK library loaded! #382

Open kocvara opened 3 weeks ago

kocvara commented 3 weeks ago
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
blegat commented 3 weeks ago

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 ?

kocvara commented 3 weeks ago

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".
blegat commented 3 weeks ago

Do you get the error simply by doing using SymbolicWedderburn ?

kocvara commented 3 weeks ago

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

odow commented 3 weeks ago

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.

kocvara commented 3 weeks ago

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 commented 3 weeks ago

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!
odow commented 3 weeks ago

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