-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: ArgumentError: NULL library handle #257
Comments
Hi @hddmaelle. Thanks for the report. Are you saying that CUTEst.jl passes all tests but you get a null library handle? Are you able to run |
Hello @dpo |
Hmmm... It works for me out of the box on the same version of Catalina. Here's what I do:
Does the above work for you? |
Here is what I get when I make the same commands as yours:
|
Ok. Now let's continue:
|
Everything works like you until: |
Sorry, you have to do |
Sorry for the response time and thanks again for helping me. julia> "libROSENBR.dylib" in readdir(CUTEst.cutest_problems_path) julia> librosenbr = Libdl.dlopen(joinpath(CUTEst.cutest_problems_path, "libROSENBR.dylib")) |
Ok, so you can decode a model with julia> using CUTEst
[ Info: Precompiling CUTEst [1b53aba6-35b6-5f92-a507-53c67d53f819]
┌ Info: using problem repository
└ ENV["MASTSIF"] = "/Users/dpo/.julia/artifacts/a7ea0d0aaf29a39ca0fe75588fc077cdd5b5ed54/optrove-sif-99c5b38e7d03"
julia> sifdecoder("ROSENBR")
julia> CUTEst.cutest_lib
Ptr{Nothing} @0x00007faea3ee5bb0
julia> model = CUTEstModel("ROSENBR", decode=false)
Problem name: ROSENBR
All variables: ████████████████████ 2 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
free: ████████████████████ 2 free: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 lower: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 upper: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 low/upp: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 fixed: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0 infeas: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nnzh: ( 0.00% sparsity) 3 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nnzj: (------% sparsity) |
Here is what I get. Only, I don't have the line corresponding to julia> sifdecoder("ROSENBR") julia> CUTEst.cutest_lib julia> model = CUTEstModel("ROSENBR", decode=false) |
Could you check that you have write permissions to the folder Also, what does this say: julia> filter(x -> contains(x, "ROSENBR"), readdir(CUTEst.cutest_problems_path))
5-element Vector{String}:
"AUTOMAT_ROSENBR.SIF.d"
"AUTOMAT_ROSENBR.d"
"OUTSDIF_ROSENBR.SIF.d"
"OUTSDIF_ROSENBR.d"
"libROSENBR.dylib" |
This is all I have : julia> filter(x -> contains(x, "ROSENBR"), readdir(CUTEst.cutest_problems_path)) |
@hddmaelle It turns out that we had made changes that might fix your issue, but did not release a new version. We just issued a new release. Could you update your version of CUTEst? |
So I updated the CUTEst package and it seems that my problem is indeed fixed: julia> probname = "BROWNDEN" julia> nlp = CUTEstModel(probname) Thanks a lot for your help !! |
Wonderful! Thanks for your patience. |
I use Julia1.6.1, macOS Catalina 10.15.7, Pkg.test("CUTEst") passes all test. Thank you.
`julia> using CUTEst
julia> probname = "BROWNDEN"
"BROWNDEN"
julia> nlp = CUTEstModel(probname)
ERROR: ArgumentError: NULL library handle
Stacktrace:
[1] #dlsym#1
@ ./libdl.jl:54 [inlined]
[2] dlsym(hnd::Ptr{Nothing}, s::Symbol)
@ Base.Libc.Libdl ./libdl.jl:54
[3] (::CUTEst.var"#24#25"{Bool, Bool, Tuple{}, Vector{Int32}, String, String})()
@ CUTEst ~/.julia/packages/CUTEst/ww8Jh/src/CUTEst.jl:215
[4] cd(f::CUTEst.var"#24#25"{Bool, Bool, Tuple{}, Vector{Int32}, String, String}, dir::String)
@ Base.Filesystem ./file.jl:106
[5] CUTEstModel(::String; decode::Bool, verbose::Bool, efirst::Bool, lfirst::Bool, lvfirst::Bool)
@ CUTEst ~/.julia/packages/CUTEst/ww8Jh/src/CUTEst.jl:205
[6] CUTEstModel(::String)
@ CUTEst ~/.julia/packages/CUTEst/ww8Jh/src/CUTEst.jl:193
[7] top-level scope
@ none:1
(debug) pkg> status
Status
~/Desktop/julia/debug/Project.toml
[1b53aba6] CUTEst v0.11.0`
The text was updated successfully, but these errors were encountered: