Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MOI optimizer broke #166

Closed
blegat opened this issue Oct 16, 2023 · 7 comments · Fixed by #168
Closed

MOI optimizer broke #166

blegat opened this issue Oct 16, 2023 · 7 comments · Fixed by #168

Comments

@blegat
Copy link
Contributor

blegat commented Oct 16, 2023

It seems the constructor NLPModelsJuMP.Optimizer() broke with an update of one of the dependencies. When running the tests, I get

Got exception outside of a @test
  MethodError: no method matching SolverCore.GenericExecutionStats{Float64, Vector{Float64}, Vector{Float64}, Any}()
  
  Closest candidates are:
    (::Type{SolverCore.GenericExecutionStats{T, S, V, Tsp}} where {T, S, V, Tsp})(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any)
     @ SolverCore ~/.julia/packages/SolverCore/iOwNg/src/stats.jl:109
  
  Stacktrace:
    [1] NLPModelsJuMP.Optimizer()
      @ NLPModelsJuMP ~/.julia/dev/NLPModelsJuMP/src/MOI_wrapper.jl:10

The versions used are

(NLPModelsJuMP) pkg> st
Project NLPModelsJuMP v0.12.1
Status `~/.julia/dev/NLPModelsJuMP/Project.toml`
  [4076af6c] JuMP v1.15.1
  [b8f27783] MathOptInterface v1.20.1
  [a4795742] NLPModels v0.20.0
  [01435c0c] Percival v0.7.0
  [ff4d7338] SolverCore v0.3.7
  [37e2e46d] LinearAlgebra
  [de0858da] Printf
  [2f01184e] SparseArrays
@blegat
Copy link
Contributor Author

blegat commented Oct 16, 2023

This is why it was not detected in the tests: #167 (comment)

@tmigot
Copy link
Member

tmigot commented Oct 17, 2023

Ok... I am slighly surprised it ever worked now as I don't remember the last we updated the GenericExecutionStats constructor. The main one being:

 stats = GenericExecutionStats(nlp)

because it allocates some structure that are dependent of the size of the problem.

The solution might be to proceed in the same way we handle the solver?

It should be possible to make an empty constructor for the GenericExecutionStats, but it will at minima requires knowing the type used for the solution vector and the multipliers (for instance, Vector{Float64}, etc...).

@blegat
Copy link
Contributor Author

blegat commented Oct 18, 2023

Ok thanks, #168 should fix it by simply using nothing.

@amontoison
Copy link
Member

Do you want a new release?

@blegat
Copy link
Contributor Author

blegat commented Oct 19, 2023

Yes please :)

@amontoison
Copy link
Member

amontoison commented Oct 19, 2023

Ok, I will do it later today 👍

@tmigot Do you plan to open a PR with your new empty GenericStatsExectution that you added in SolverCore.jl?

@tmigot
Copy link
Member

tmigot commented Oct 19, 2023

Thanks @amontoison , I will add it later, no rush there.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants