DifferentialEquations.jl precompilation fails for not finding libopenblas

dasayan05
Fri, 22 Oct 2021 17:01:36 +0000
New to Julia

I am using Julia 1.6.3 on Ubuntu 20.04 built from source with MKL turned on, so BLAS.vendor() says MKL. Now, I was trying to install the DifferentialEquations package simply by ] add DifferentialEquations, which after precompile, throws the below error.

A quick glance at the error shows that it couldn’t find libopenblas64_.so library. I can’t understand whether its looking in the system (PS: I have libopenblas.so available through LD_LIBRARY_PATH) or some local location ? Or is it just not possible to use these libraries when Julia is build with MKL ?

Similar issue have been posted here before or on github, suggest to clean ~/.julia/ folder, which didn’t help.

(@v1.6) pkg> precompile
Precompiling project...
  ✗ SuiteSparse_jll
  ✗ Sundials_jll
  ✗ Sundials
  ✗ DifferentialEquations
  0 dependencies successfully precompiled in 22 seconds (173 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]

Failed to precompile DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa] to /user/HS229/ad01424/.julia/compiled/v1.6/DifferentialEquations/jl_FdQ9ya.
ERROR: LoadError: LoadError: InitError: could not load library "libopenblas64_.so"
libopenblas64_.so: cannot open shared object file: No such file or directory
Stacktrace:
  [1] dlopen(s::String, flags::UInt32; throw_error::Bool)
    @ Base.Libc.Libdl ./libdl.jl:114
  [2] dlopen (repeats 2 times)
    @ ./libdl.jl:114 [inlined]
  [3] __init__()
    @ OpenBLAS_jll /vol/research/sketchapp/julia/v1.6.3/share/julia/stdlib/v1.6/OpenBLAS_jll/src/OpenBLAS_jll.jl:35
  [4] _include_from_serialized(path::String, depmods::Vector{Any})
    @ Base ./loading.jl:696
  [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
    @ Base ./loading.jl:782
  [6] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1020
  [7] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [9] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
 [10] include(x::String)
    @ Sundials_jll ~/.julia/packages/Sundials_jll/heTyl/src/Sundials_jll.jl:1
 [11] top-level scope
    @ ~/.julia/packages/Sundials_jll/heTyl/src/Sundials_jll.jl:54
 [12] include
    @ ./Base.jl:386 [inlined]
 [13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
 [14] top-level scope
    @ none:1
 [15] eval
    @ ./boot.jl:360 [inlined]
 [16] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [17] top-level scope
    @ none:1
during initialization of module OpenBLAS_jll
in expression starting at /user/HS229/ad01424/.julia/packages/Sundials_jll/heTyl/src/wrappers/x86_64-linux-gnu-libgfortran4.jl:5
in expression starting at /user/HS229/ad01424/.julia/packages/Sundials_jll/heTyl/src/Sundials_jll.jl:1
ERROR: LoadError: Failed to precompile Sundials_jll [fb77eaff-e24c-56d4-86b1-d163f2edb164] to /user/HS229/ad01424/.julia/compiled/v1.6/Sundials_jll/jl_7yHnUe.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /user/HS229/ad01424/.julia/packages/Sundials/sg9S0/src/Sundials.jl:3
ERROR: LoadError: Failed to precompile Sundials [c3572dad-4567-51f8-b174-8c6c989267f4] to /user/HS229/ad01424/.julia/compiled/v1.6/Sundials/jl_Cbtg52.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{IOStream}, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:923
  [7] include
    @ ./Base.jl:386 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /user/HS229/ad01424/.julia/packages/DifferentialEquations/7WPQg/src/DifferentialEquations.jl:1

8 posts - 4 participants