Skip to content

Preserve fixed-step multistep convergence - #4328

Merged
ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/nonlinear-fixed-step-nlstep-scaling
Aug 22, 2026
Merged

ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/nonlinear-fixed-step-nlstep-scaling

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

Stack

This is a focused follow-up stacked on #4325. The first commit is that PR's parameter-wrapper fix; the second commit is the fixed-step convergence change to review here. After the prerequisite merges, this branch should be rebased so this PR contains only the second commit.

What changed

Keep the solution-scaled COEFFICIENT_MULTISTEP nonlinear residual for adaptive integration, while restoring the historical raw residual scaling for fixed-step integration. The solution scaling prevents adaptive rejection from walking to dtmin, but for a fixed step it creates a dt-independent nonlinear error floor and destroys the solver's convergence order.

The regression test checks that fixed-step ABDF2 retains second-order convergence with a NonlinearSolveAlg inner solve. OrdinaryDiffEqNonlinearSolve is bumped from 2.10.2 to 2.10.3. No public API is changed.

Failing before, passing after

The regression bisects to 523c650, introduced by #4264.

At its parent 3d2933057fa7d4dc27df4b4a4f2790f10d8413d6, the exact ModelingToolkit NLStep group reports 23 passed and 2 broken. At the introducing commit it reports 17 passed, 6 failed, and 2 broken.

The same new official fixed-step test discriminates directly:

Before: minimum(fixed_orders) = 0.8558588448430611 > 1.9  [failed]
After:  fixed testsets 3/3, 4/4, and 4/4                  [passed]

Verification

GROUP=QA JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600 julia +1.12 \
  --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test()'
JET  | 13 Pass 33 Broken 46 Total
Aqua | 41 Pass 41 Total
Testing OrdinaryDiffEqNonlinearSolve tests passed
GROUP=ModelingToolkit JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600 julia +1.12 \
  --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test()'

With ModelingToolkit pinned to the dependency commit that exposes the parameter conversion and convergence failures:

NLStep Tests                    | 23 Pass 2 Broken
Preconditioner Tests            | 18 Pass
DAE Initialize Integration      | 21 Pass
Testing OrdinaryDiffEqNonlinearSolve tests passed
GROUP=Core JULIA_PKG_PRECOMPILE_AUTO=0 timeout 21600 julia +1.12 \
  --project=lib/OrdinaryDiffEqNonlinearSolve -e 'using Pkg; Pkg.test()'

The environment was path-pinned to the current monorepo OrdinaryDiffEqCore 4.15.0 and OrdinaryDiffEqDifferentiation 3.9.1.

891 Pass 40 pre-existing Broken 931 Total
NonlinearSolveAlg nlstep_data Field Tests | 11 Pass 11 Total
Testing OrdinaryDiffEqNonlinearSolve tests passed

Runic, typos, and git diff --check exit successfully on the convergence-only three-file diff.

Not verified

GPU paths were not run. This PR depends on #4325; the wrapper is retained as the first commit solely so the ModelingToolkit group can reach the convergence assertions.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 22, 2026 07:25
@ChrisRackauckas
ChrisRackauckas merged commit 0c5d164 into SciML:master Aug 22, 2026
19 of 22 checks passed
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.

2 participants