Skip to content

Re-enable the moonlander / quadrotor :manual ADNLP tests (blocked on ADNLPModels#383) #626

Open

Description

@ocots

Summary

test/ci/test_all_ocp.jl had its :moonlander and :quadrotor testsets disabled
in #622 (commit on branch v1.1.1). Re-enable them once the upstream cause is fixed.

Why they were disabled

Both testsets ran test_problem(moonlander(); adnlp_backend=:manual) (the :quadrotor
one via a long-standing copy-paste slip — it never actually tested quadrotor()).

moonlander is a free-final-time OCP with a rotation-matrix dynamics: cos(θ) / sin(θ)
with θ = x₅ an unbounded state. The :manual (and :optimized) ADNLP backend build
a SparseReverseADHessian, which records its ReverseDiff tape on an uninitialised
Vector{ForwardDiff.Dual} and executes the model function on that memory. CTDirect's NLP
variable bounds are -Inf .* ones(nvar); once freed, that storage is recycled into the
uninitialised tape input, so θ is seeded with -Inf and cos(-Inf) throws
DomainError: sincos(x) is only defined for finite x before any solve.

Deterministic on the Julia 1.12 CI runners, flaky on 1.10 — it depends only on which
dependency versions each CI run resolves (surfaced by the CTParser 0.9 / CTModels 0.18
bump in #622, not caused by it).

Upstream issue + minimal reproducer: JuliaSmoothOptimizers/ADNLPModels.jl#383

To do when re-enabling

  • Restore the :moonlander testset (test/ci/test_all_ocp.jl).
  • Wire the :quadrotor testset to actually run quadrotor() (not moonlander()),
    ideally with adnlp_backend=:default (forward-mode Hessian, unaffected).
  • Requires ADNLPModels ≥ the release that fixes Use OCP functions true sparsity patterns in manual mode #383 (bump the [compat] lower bound).

Activity

  1. ocots commented on Aug 28, 2026

    @ocots
    MemberAuthor

    I have commented truck trailer too.

  2. PierreMartinon commented on Oct 15, 2026

    @PierreMartinon
    Member

    Hi @ocots
    I have re-enabled the truck trailer and quadrotor test problems that look fine with manual AD backend. Moonlander still fails. PR #641

  3. ocots commented on Oct 15, 2026

    @ocots
    MemberAuthor

    What is the error for the Moonlander problem?

  4. PierreMartinon commented on Oct 16, 2026

    @PierreMartinon
    Member

    Moonlander tests now seem to fail due to local solutions, instead of the above error.
    Behavior is not always deterministic: ubuntu tests seem fine, while windows can either pass or fail. Mac runners are apparently too busy at the moment.
    I suspect we could ensure proper convergence by choosing a suitable initial guess (not necessarily a complex one).
    However, maybe we want to keep this case to investigate the AD part a bit more, and more precisely why the manual patterns seems to give a better convergence than ADNLP built-in detection, despite being 'less' sparse ?

    Ps. This has little to do with #383 :D

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

Metadata

Metadata

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