Skip to content

Error with SolverBenchmark #121

@MaxenceGollier

Description

@MaxenceGollier

I am trying to benchmark solvers on a Diagonal Quasi-Newton Model. I get two issues:

  1. I get type DiagonalQNModel has no field counters
  2. When giving a Quasi-Newton Model to Ipopt, I get MethodError : no method matching hess_structure!(::NLPModelsModifiers.DiagonalQNModel{...},...)

Here is an example

using BenchmarkTools, Dates, LinearAlgebra, JLD2

using Percival, NLPModels, NLPModelsIpopt, SolverBenchmark, SolverCore, NLPModelsModifiers
using OptimizationProblems, ADNLPModels, OptimizationProblems.ADNLPProblems

meta = OptimizationProblems.meta
problem_names = meta[(meta.has_equalities_only.==1).&(meta.has_bounds.==0).&(meta.has_fixed_variables.==0).&(meta.variable_nvar.==0), :name]
problem_list = (SpectralGradientModel(eval(Meta.parse(name))(), σ=1.0) for name in problem_names)

solvers = Dict(
  :ipopt =>
    nlp -> ipopt(
      nlp,
    ),
  :percival =>
    nlp -> percival(
      nlp,
    ),
)

stats = bmark_solvers(solvers, problem_list)

There is no reason for not having a hess_structure! method at least for the DiagonalQNModel type because it is trivial. I can also add the counters as a field of the different structures if you think it is appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions