Skip to content

Do not seed a retry from the previous-step interpolant - #4473

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:maxorder-predictor
Sep 12, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:maxorder-predictor

Conversation

@singhharsh1708

Copy link
Copy Markdown
Member

The MaxOrder, VariableOrder and CutoffOrder predictors seed a stage from the previous-step interpolant built out of integrator.k, but a rejected attempt overwrites k and nothing resets it before the retry, so the seed is built from the failed attempt's data; they now fall back to the zero seed when integrator.last_stepfail is set, as they already do before the first step.

Across 3 problems, 12 methods and those 3 predictors, 23 of 108 configurations abort with ReturnCode.Unstable on master, including KenCarp3/4/5, Kvaerno3/4/5, ESDIRK437L2SA, ESDIRK547L2SA2, ESDIRK659L2SA and TRBDF2. All 23 pass here. Printing the seed across four consecutive attempts at one t shows integrator.k[2] going 0.5 to 7.6e27 to 5.1e122 to Inf while uprev and uprev2 stay at [1.0000004, 0.9999985], after which every retry seeds NaN and dt runs down to eps.

Over the full 288-configuration sweep with all 8 predictors, 258 results are bit-identical to master, 23 go from Unstable to Success, none regress, and 7 shift while still succeeding: Hairer4 with MaxOrder on ROBER drops from 19617 Newton iterations to 11983.

The regression test solves ROBER with KenCarp4 and Lotka-Volterra with TRBDF2 under all three predictors; 4 of its 6 cases fail on master.

Fixes #4472.

AI Disclosure: Claude assisted with this change.

@ChrisRackauckas
ChrisRackauckas merged commit d63b9c8 into SciML:master Sep 12, 2026
143 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 13, 2026
- OrdinaryDiffEqDefault: require OrdinaryDiffEqCore 4.17.1 (#4520)
- Add adaptive step size control to SDC (#4346)
- Allow JET 0.12 in every QA test environment (#4513)
- Resolve OrdinaryDiffEqDefault against the local sublibraries (#4514)
- NonlinearSolveAlg: stale-Jacobian retry + rejected-step W reassembly (carries #4282 to current master) (#4505)
- Do not seed a retry from the previous-step interpolant (#4473)
- Say why the linear path ignores new_W_dt_cutoff (#4527)
- Carry the QNDF2 difference array across steps (#4526)
- Pass Θ = 0, not the absolute time, to the AN5 startup interpolant (#4534)
- Make the stabilized-RK step cap and eigenvalue tolerance direction-agnostic (#4536)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Predictor.MaxOrder drives dt below eps on several SDIRK methods

2 participants