We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Test added by #2438 did not allocate enough space for Hessian, but no error was thrown.
Caused GC fault in #2439
See
MathOptInterface.jl/src/Nonlinear/ReverseAD/forward_over_reverse.jl
Lines 109 to 116 in 2ea481b
Test needs to be
function test_timers() x = MOI.VariableIndex(1) model = Nonlinear.Model() Nonlinear.set_objective(model, :(log($x))) Nonlinear.add_constraint(model, :(sin($x)), MOI.LessThan(0.5)) evaluator = Nonlinear.Evaluator(model, Nonlinear.SparseReverseMode(), [x]) y = [1.2] g = [NaN] MOI.initialize(evaluator, [:Grad, :Jac, :Hess]) MOI.eval_objective(evaluator, y) MOI.eval_constraint(evaluator, g, y) MOI.eval_objective_gradient(evaluator, g, y) MOI.eval_constraint_gradient(evaluator, g, y, 1) J = zeros(length(MOI.jacobian_structure(evaluator))) MOI.eval_constraint_jacobian(evaluator, J, y) H = zeros(length(MOI.hessian_objective_structure(evaluator))) MOI.eval_hessian_objective(evaluator, H, y) H = zeros(length(MOI.hessian_constraint_structure(evaluator, 1))) MOI.eval_hessian_constraint(evaluator, H, y, 1) H = zeros(length(MOI.hessian_lagrangian_structure(evaluator))) MOI.eval_hessian_lagrangian(evaluator, H, y, 1.0, [1.0]) timers = [ evaluator.initialize_timer, evaluator.eval_objective_timer, evaluator.eval_constraint_timer, evaluator.eval_objective_gradient_timer, evaluator.eval_constraint_gradient_timer, evaluator.eval_constraint_jacobian_timer, evaluator.eval_hessian_objective_timer, evaluator.eval_hessian_constraint_timer, evaluator.eval_hessian_lagrangian_timer, ] @test all(>=(0.0), timers) if !Sys.iswindows() # Windows times only in milliseconds, which can be too coarse to # accurately measure and test. @test sum(timers) > 0.0 end return end
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Test added by #2438 did not allocate enough space for Hessian, but no error was thrown.
Caused GC fault in #2439
See
MathOptInterface.jl/src/Nonlinear/ReverseAD/forward_over_reverse.jl
Lines 109 to 116 in 2ea481b
Test needs to be
The text was updated successfully, but these errors were encountered: