You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Pkg
Pkg.activate(".")
using JuMP, LinearAlgebra, NLPModels, NLPModelsJuMP, NLPModelsTest # main version of NLPModelsTest
nlp_problems = setdiff(NLPModelsTest.nlp_problems, ["MGH01Feas"])
nls_problems = NLPModelsTest.nls_problems
extra_nls_problems = ["HS30", "HS43", "MGH07"]
for problem in lowercase.(nlp_problems)
include(joinpath("nlp_problems", "$problem.jl"))
end
for problem in lowercase.(nls_problems ∪ extra_nls_problems)
include(joinpath("nls_problems", "$problem.jl"))
end
for prob in Symbol.(lowercase.(nlp_problems))
prob_fn = eval(prob)
nlp = MathOptNLPModel(prob_fn(), hessian = (prob != :nohesspb), name = string(prob))
print_nlp_allocations(nlp, test_allocs_nlpmodels(nlp))
end
for prob in Symbol.(lowercase.(nls_problems ∪ extra_nls_problems))
prob_fn = eval(prob)
nls = prob_fn()
print_nlp_allocations(nls, test_allocs_nlpmodels(nls))
print_nlp_allocations(nls, test_allocs_nlsmodels(nls))
end
This might be useful as well to improve the obj and grad of NLS models We probably need to modify obj and grad for nls following this JuliaSmoothOptimizers/NLPModels.jl@a5d084c
I ran the following script tracking allocations:
and got this report:
The text was updated successfully, but these errors were encountered: