Skip to content

Correct NonlinearSolve downgrade dependency floors - #4394

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/nls-differentiation-floor
Aug 27, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix/nls-differentiation-floor

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

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

What changed

Correct two lower bounds in OrdinaryDiffEqNonlinearSolve's testable dependency set:

  • OrdinaryDiffEqDifferentiation 3.9 -> 3.10
  • OrdinaryDiffEqSDIRK 2 -> 2.9

The downgraded dependency set combines OrdinaryDiffEqCore 4.13 with OrdinaryDiffEqDifferentiation 3.9.0. When a Rosenbrock solve reports numerical instability with a matrix-free Jacobian, 3.9.0 calls jacobian! on a SciMLOperators.NullOperator. Version 3.10.0 is the first compatible release: it avoids calculating a diagnostic Jacobian unless the cached Jacobian is an AbstractMatrix.

Once that failure is fixed, the same Core run reaches a second lower-bound bug. nsa_smooth_est_tests.jl tests the can_smooth_est integration added jointly to NonlinearSolve and SDIRK, but the old bound resolves SDIRK 2.0.0, before that integration existed. SDIRK 2.9.0 is the first released version containing it.

This is independent of the stochastic cache-contract bug fixed by #4386. That PR's stochastic downgraded test passes, but its NonlinearSolve downgraded test still hits this error.

No package-version bump is included because #4386 already reserves OrdinaryDiffEqNonlinearSolve 2.9.2. The intended order is to merge this mechanical compatibility correction first, then rebase and rerun that PR. If the order is reversed, this PR should be rebased with a 2.9.3 bump.

Regression evidence

The existing linear_solver_tests.jl and nsa_smooth_est_tests.jl tests are the discriminating regressions, so this mechanical compatibility PR does not add duplicate tests.

Failing before, after applying the repository's exact downgrade action and running the Core group without re-resolving:

Linear Solver Tests |    2      1      3  20.8s
MethodError: no method matching jacobian!(::SciMLOperators.NullOperator, ...)
ERROR: Package OrdinaryDiffEqNonlinearSolve errored during testing

The same downgrade action resolves OrdinaryDiffEqDifferentiation 3.10.0 after this change. The formerly failing testset passes:

Linear Solver Tests |  113    113  8m07.7s

That exposes the second failure with SDIRK 2.0.0:

NonlinearSolveAlg Smoothed Error Estimate Tests | 6 pass, 4 fail, 10 total
Evaluated: 47185 < 23592.5
Evaluated: 47185 < 3399
Evaluated: 6782 < 3391.0
Evaluated: 6782 < 1500

After raising the SDIRK floor, the exact action resolves SDIRK 2.9.0 and the same test passes:

smooth_est is active under NonlinearSolveAlg W-reuse | 10 pass, 10 total, 28.6s

The adjacent-commit bisect found 62a52b2 as the first exposing commit:

  • parent bde55a538656918258d2d87f729e9053814f36af, with a Core 4.12 floor: passes
  • 62a52b272ce3b1605233fe7a33dcb07dba8cbd81, with a Core 4.13 floor: fails with jacobian!(::NullOperator, ...)

That commit did not introduce the faulty diagnostic code; it exposed the latent incompatibility. f77ad2b is the fix included in OrdinaryDiffEqDifferentiation 3.10.0.

The independent SDIRK mismatch was introduced by 55e5da1, which added both the cross-sublibrary behavior and its test. The corresponding SDIRK source first shipped in 2.9.0.

Local verification

GROUP=Core /home/crackauc/.juliaup/bin/julia +1.11 --startup-file=no --project=lib/OrdinaryDiffEqNonlinearSolve \
  -e 'using Pkg; Pkg.test(; allow_reresolve = false)'
Linear Solver Tests | 113 pass, 113 total, 15m18.6s
NonlinearSolveAlg Smoothed Error Estimate Tests | 10 pass, 10 total, 1m37.1s
NonlinearSolveAlg DAEProblem Tests | 32 pass, 32 total, 1m22.8s
NonlinearSolveAlg nlstep_data Field Tests | 11 pass, 11 total, 5m58.8s
Testing OrdinaryDiffEqNonlinearSolve tests passed

GROUP=QA /home/crackauc/.juliaup/bin/julia +1.11 --startup-file=no --project=lib/OrdinaryDiffEqNonlinearSolve \
  -e 'using Pkg; Pkg.test()'
JET Tests |   13      33     46  1m38.1s
Aqua      |   41     41  56.8s
Testing OrdinaryDiffEqNonlinearSolve tests passed

/home/crackauc/.juliaup/bin/julia +1.11 --startup-file=no --project=@runic \
  -e 'using Runic; exit(Runic.main(["--check", "."]))'
# exit 0

typos lib/OrdinaryDiffEqNonlinearSolve/Project.toml
# exit 0

git diff --check
# exit 0

Documentation was not built because this changes no documentation or public API. GPU, Julia pre-release, downstream, and Everything groups were not run locally.

Links

🤖 Generated with Claude Code

https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512

Require OrdinaryDiffEqDifferentiation 3.10 for matrix-free instability diagnostics and OrdinaryDiffEqSDIRK 2.9 for the coupled smoothed-error-estimator behavior.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 27, 2026 18:59
@ChrisRackauckas
ChrisRackauckas merged commit a27ee03 into SciML:master Aug 27, 2026
17 of 22 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 11, 2026
- Fix definite assignment in ROCK stages (#4321)
- Correct NonlinearSolve downgrade dependency floors (#4394)
- Fix ensemble work-precision error storage (#4390)
- Add explicit benchmark tag semantics (#4402)
- fix: require cache-aware nonlinear solver in PDIRK (#4406)
- fix: accept SciML caches in nlsolve! (#4407)
- Support generic callback event storage (#4398)
- test: account for Hairer4 BLAS variation (#4410)
- Fix Rosenbrock interpolation after callback truncation (#4411)
- Fix weak Platen methods for scalar Wiener processes (#4413)



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.

2 participants