Skip to content

Conversation

@cvanaret
Copy link
Owner

@cvanaret cvanaret commented Jul 16, 2025

  • split the existing Julia tests for the ipopt and filterslp presets
  • add Julia tests for the filtersqp preset

@cvanaret cvanaret self-assigned this Jul 16, 2025
@cvanaret cvanaret added the CI Continuous Integration label Jul 16, 2025
@cvanaret
Copy link
Owner Author

cvanaret commented Jul 16, 2025

Hi @odow @amontoison,
I get a weird Julia test failure here of Uno-filtersqp on the instance nlp-expr/007_010. The instance is infeasible, is detected so by Uno, and the AMPL solution reads:

Uno 2.0.0: Infeasible stationary point

Options
3
0
1
0
2
2
2
2
0
0
1.526378828812082e-09
0.5
objno 0 200
suffix 4 0 18 0 0
upper_bound_duals
suffix 4 0 18 0 0
lower_bound_duals

200 is the error code for infeasible models, see top of p283 in the AMPL manual.
When I call solution_summary(model), I get:

solution_summary(; result = 1, verbose = false)
├ solver_name          : AmplNLWriter
├ Termination
│ ├ termination_status : LOCALLY_INFEASIBLE
│ ├ result_count       : 1
│ └ raw_status         : Uno 2.0.0: Infeasible stationary point
├ Solution (result = 1)
│ ├ primal_status        : UNKNOWN_RESULT_STATUS
│ ├ dual_status          : NO_SOLUTION
│ ├ objective_value      : 0.00000e+00
│ └ dual_objective_value : 0.00000e+00
└ Work counters
  └ solve_time (sec)   : 2.42654e-01

so JuMP has no information related to the primal solution (the 1.526378828812082e-09 0.5 in the AMPL solution, which corresponds to a local minimizer of the constraint violation) and the test fails here:

_check_status_subset(JuMP.primal_status(model), primal_target[problem_type])

How is that possible, given that the AMPL solution contains all the information? Is it the wrong kind of test here?

@cvanaret cvanaret changed the title Julia tests for the filtersqp preset [CI] Julia tests for the filtersqp preset Jul 16, 2025
@testset "MINLPTests" begin
primal_target = Dict(
MINLPTests.FEASIBLE_PROBLEM => MOI.FEASIBLE_POINT,
MINLPTests.INFEASIBLE_PROBLEM => MOI.NO_SOLUTION,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvanaret the issue is here. JuMP expects that if Uno has found an infeasible problem, it will not return a primal solution.

(See the comment in your filterslp above)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I saw the comment and tried both MOI.NO_SOLUTION and MOI.INFEASIBLE_POINT but it made no difference. I'll just skip the test. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't make a difference because the value was UNKNOWN_RESULT_STATUS

"005_010",
# Okay to exclude forever: AmplNLWriter does not support
# user-defined functions.
"006_010",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"006_010",
"006_010",
"007_010",

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just skip the test

@cvanaret cvanaret merged commit 7869c96 into main Jul 17, 2025
25 checks passed
@cvanaret cvanaret deleted the julia_runtests_uno_filtersqp branch July 17, 2025 09:12
r"^test_quadratic_SecondOrderCone_basic$",
r"^test_quadratic_nonconvex_constraint_basic$",
r"^test_solve_DualStatus_INFEASIBILITY_CERTIFICATE_",
r"^test_solve_VariableIndex_ConstraintDual_MAX_SENSE$",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this one skipped? It is a very suspicious failure

Copy link
Owner Author

@cvanaret cvanaret Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_quadratic_SecondOrderCone_basic and test_quadratic_nonconvex_constraint_basic are reported as locally infeasible. The latter is nonconvex so it makes sense. For the former, starting at $(0, 0, 0)$, the QP at iteration 2 is infeasible and the current point $(0.5, 0.5, 0)$ turns out to be a minimum of constraint violation.
If we started from a feasible point, I think that by convexity all the QPs would be feasible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I meant test_solve_VariableIndex_ConstraintDual_MAX_SENSE. It is not complicated:

https://github.com/jump-dev/MathOptInterface.jl/blob/d66c13dab9cbd76c3451faffafd7d828a4e04ee1/src/Test/test_solve.jl#L292-L311

Copy link
Owner Author

@cvanaret cvanaret Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me try again. Perhaps I'm writing the AMPL solution with incorrect signs.
#228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants