GithubHelp home page GithubHelp logo

Comments (15)

dpo avatar dpo commented on June 29, 2024

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 sifdecoder(probname)?

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

Hello @dpo
Thank you for your response.
When I run sifdecoder(probname) nothing is displayed: no error nor result.

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Hmmm... It works for me out of the box on the same version of Catalina.

Here's what I do:

(@v1.6) pkg> activate test-cutest
  Activating new environment at `/private/tmp/test-cutest/Project.toml`

(test-cutest) pkg> add CUTEst

(test-cutest) pkg> test CUTEst  # tests pass

julia> using CUTEst
┌ Info: using problem repository
└   ENV["MASTSIF"] = "/Users/dpo/.julia/artifacts/a7ea0d0aaf29a39ca0fe75588fc077cdd5b5ed54/optrove-sif-99c5b38e7d03"

julia> sifdecoder("ROSENBR")  # no output

julia> readdir(CUTEst.cutest_problems_path)  # you should see the decoded problem here

julia> "libcutest_double.dylib" in readdir(CUTEst.libpath)
true

Does the above work for you?

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

Here is what I get when I make the same commands as yours:

julia> using CUTEst
┌ Info: using problem repository
└   ENV["MASTSIF"] = "/Users/maelle/.julia/artifacts/a7ea0d0aaf29a39ca0fe75588fc077cdd5b5ed54/optrove-sif-99c5b38e7d03"

julia> sifdecoder("ROSENBR")

julia> readdir(CUTEst.cutest_problems_path)
138-element Vector{String}:
 "AUTOMAT_AKIVA.SIF.d"
 "AUTOMAT_BEALE.SIF.d"
 "AUTOMAT_BENNETT5LS.SIF.d"
 "AUTOMAT_BIGGS6.SIF.d"
 "AUTOMAT_BOX3.SIF.d"
 ⋮
 "libSNAKE.dylib"
 "libTWOBARS.dylib"
 "libWAYSEA2.dylib"
 "libZECEVIC2.dylib"

julia> "libcutest_double.dylib" in readdir(CUTEst.libpath)
true

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Ok. Now let's continue:

julia> sifdecoder("ROSENBR", verbose=true)

 Problem name: ROSENBR

 Double precision version will be formed

 The objective function uses 1 linear group
 The objective function uses 1 nonlinear group

 There are 2 free variables


 File successfully decoded

julia> "libROSENBR.dylib" in readdir(CUTEst.cutest_problems_path)
true

julia> librosenbr = Libdl.dlopen(joinpath(CUTEst.cutest_problems_path, "libROSENBR.dylib"))
Ptr{Nothing} @0x00007fa45849e700

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

Everything works like you until:
julia> librosenbr = Libdl.dlopen(joinpath(CUTEst.cutest_problems_path, "libROSENBR.dylib")) ERROR: UndefVarError: Libdl not defined Stacktrace: [1] top-level scope @ none:1

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Sorry, you have to do using Libdl (it's a standard module).

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

Sorry for the response time and thanks again for helping me.
I did add the using Libdl and I get the same thing as you after that!
`julia> using Libdl

julia> "libROSENBR.dylib" in readdir(CUTEst.cutest_problems_path)
true

julia> librosenbr = Libdl.dlopen(joinpath(CUTEst.cutest_problems_path, "libROSENBR.dylib"))
Ptr{Nothing} @0x00007f9dba2dc470`

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Ok, so you can decode a model with sifdecoder and you can open the resulting shared library by hand. Now we have to figure out why things happen differently when you call CUTEstModel(...). What is the output of

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)

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

Here is what I get. Only, I don't have the line corresponding to Precompiling CUTEst, and the last call did not work. Maybe I'm missing something...
`julia> using CUTEst
┌ Info: using problem repository
└ ENV["MASTSIF"] = "/Users/maelle/.julia/artifacts/a7ea0d0aaf29a39ca0fe75588fc077cdd5b5ed54/optrove-sif-99c5b38e7d03"

julia> sifdecoder("ROSENBR")

julia> CUTEst.cutest_lib
Ptr{Nothing} @0x00007f9d5f7e3110

julia> model = CUTEstModel("ROSENBR", decode=false)
ERROR: CUTEst: no decoded problem found
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] (::CUTEst.var"#24#25"{Bool, Bool, Tuple{}, Vector{Int32}, String, String})()
@ CUTEst ~/.julia/packages/CUTEst/ww8Jh/src/CUTEst.jl:207
[3] cd(f::CUTEst.var"#24#25"{Bool, Bool, Tuple{}, Vector{Int32}, String, String}, dir::String)
@ Base.Filesystem ./file.jl:106
[4] CUTEstModel(::String; decode::Bool, verbose::Bool, efirst::Bool, lfirst::Bool, lvfirst::Bool)
@ CUTEst ~/.julia/packages/CUTEst/ww8Jh/src/CUTEst.jl:205
[5] top-level scope
@ REPL[4]:1`

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Could you check that you have write permissions to the folder CUTEst.cutest_problems_path?

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"

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

This is all I have :
`julia> CUTEst.cutest_problems_path
"/Users/maelle/.julia/packages/CUTEst/ww8Jh/src/../deps/files"

julia> filter(x -> contains(x, "ROSENBR"), readdir(CUTEst.cutest_problems_path))
3-element Vector{String}:
"AUTOMAT_ROSENBR.d"
"OUTSDIF_ROSENBR.d"
"libROSENBR.dylib"`

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

@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?

from cutest.jl.

hddmaelle avatar hddmaelle commented on June 29, 2024

So I updated the CUTEst package and it seems that my problem is indeed fixed:
`julia> using CUTEst
┌ Info: using problem repository
└ ENV["MASTSIF"] = "/Users/maelle/.julia/artifacts/a7ea0d0aaf29a39ca0fe75588fc077cdd5b5ed54/optrove-sif-99c5b38e7d03"

julia> probname = "BROWNDEN"
"BROWNDEN"

julia> nlp = CUTEstModel(probname)
Problem name: BROWNDEN
All variables: ████████████████████ 4 All constraints: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
free: ████████████████████ 4 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) 10 linear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nonlinear: ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 0
nnzj: (------% sparsity)`

Thanks a lot for your help !!

from cutest.jl.

dpo avatar dpo commented on June 29, 2024

Wonderful! Thanks for your patience.

from cutest.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.