Fix MultipleShooting caches for tagged AD states - #541
Fix MultipleShooting caches for tagged AD states#541ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Benchmark Results (Julia v1.11)Time benchmarks
Memory benchmarks
|
4b42841 to
cc23812
Compare
|
Rebased the branch onto current Post-rebase local verification:
No test was skipped, disabled, or weakened. |
|
Post-timer CI classification:
The Shooting compat change has no failing targeted lane. |
|
Fresh validation (2026-07-26): clean |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
cc23812 to
5ca641c
Compare
|
Refreshed this existing draft rather than opening another duplicate. Before the lease-protected update, I fetched the fork and audited the PR branch. Its only branch-only commit remained The revised implementation removes the earlier Dual conversion of Fresh local verification on
Bisect correction: the earlier comment's |
|
Fresh-CI audit for head
Relevant active runs:
The 1-hour CI timer is set for 19:49:50 EDT; monitoring is being handed back to the root task. |
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Summary
Cause
MultipleShooting hoists ODE integrator allocation out of residual evaluations. The default nonlinear polyalgorithm can evaluate that residual with a new tagged
ForwardDiff.Dualelement type when it falls back to its line-search method. Reinitializing the originalFloat64ODE cache with those states throwsFloat64(::ForwardDiff.Dual).The existing DifferentiationInterface Jacobian caches continue using their preallocated matching ODE caches. The new fallback is only used when another caller introduces a different state element type, and it reuses the resulting cache after the first evaluation.
This is separate from #571, which only adjusts the LinearSolve test compatibility range.
Verification
EnsembleThreads:Float64(::ForwardDiff.Dual{ForwardDiff.Tag{NonlinearFunction...}})EnsembleSerial: the same conversion errorBOUNDARYVALUEDIFFEQ_TEST_GROUP=Core: Basic 84/84, NLLS 56/56, Orbital 40/40BOUNDARYVALUEDIFFEQ_TEST_GROUP=All: Basic 84/84, NLLS 56/56, Orbital 40/40BOUNDARYVALUEDIFFEQ_TEST_GROUP=QA: 19/19