Skip to content

Accept SciML DECache values in nlsolve! - #4407

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsolve-decache
Aug 28, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-nlsolve-decache

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore this draft until reviewed by @ChrisRackauckas.

What changed

Accept any SciMLBase.DECache as the cache argument to OrdinaryDiffEqNonlinearSolve.nlsolve!, rather than accepting only OrdinaryDiffEqCore.OrdinaryDiffEqCache. StochasticDiffEq's implicit caches implement the shared DECache interface but do not subtype the OrdinaryDiffEq-specific cache, so the narrower check rejected valid solver calls.

This also bumps OrdinaryDiffEqNonlinearSolve to 2.9.2 and adds an ISSEM solve regression test in StochasticDiffEqImplicit.

The narrow guard was introduced by e4f0c5e.

Verification

I first added the ISSEM regression test, reverted the implementation change, and ran:

GROUP=Core julia +1.11.9 --project=lib/StochasticDiffEqImplicit -e 'using Pkg; Pkg.test()'

It failed on the unfixed implementation:

Module loads and constructors: Error During Test
ArgumentError: nlsolve! expects integrator cache ..., got StochasticDiffEqImplicit.ISSEMCache ...
Test Summary:                    | Pass  Error  Total
Module loads and constructors    |    8      1      9

The same command passed after restoring the fix:

Test Summary:                 | Pass  Total   Time
Module loads and constructors |    9      9  38.8s
Testing StochasticDiffEqImplicit tests passed

The changed package's QA group passed:

Test Summary: | Pass  Total     Time
Aqua          |   41     41  1m25.8s
Testing OrdinaryDiffEqNonlinearSolve tests passed

GROUP=QA for StochasticDiffEqImplicit reached 20 passing checks but also reproduced one unrelated current-master ExplicitImports error:

ImplicitImportsException: Module StochasticDiffEqImplicit relying on implicit import:
StochasticDiffEqCore exported by StochasticDiffEqCore
Test Summary: | Pass  Error  Total
QA            |   20      1     21

That pre-existing module-source failure is being investigated separately and is not hidden or changed here.

Additional checks:

  • Runic over both changed Julia ranges — passed
  • git diff | typos - — passed
  • git diff --check — passed
  • Docs were not built because this changes no docs, docstrings, or public API.

Related baseline failures:

🤖 Generated with Claude Code
https://chatgpt.com/codex/tasks/01a03ea3-e59c-7cd0-a4d2-0191af417f31

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Independent clean-base audit:

  • Upstream master 468bea34 fails for scalar out-of-place ImplicitEM because ImplicitEMConstantCache is rejected.
  • The introducing commit is e4f0c5e.
  • A one-line SciMLBase.DECache prototype passes with retcode=Success, steps=10; the existing PDIRK guard regression remains 6/6.
  • This PR is the complete version of the concurrent narrower draft Fix nlsolve! cache validation for stochastic integrators #4405 because it uses the public common cache contract and includes the OrdinaryDiffEqNonlinearSolve 2.9.2 bump.

Before merge, please correct the commit and PR attribution from Claude Code/Claude to the actual harness/model that owns https://chatgpt.com/codex/tasks/01a03ea3-e59c-7cd0-a4d2-0191af417f31. The repository instructions require Agent-Harness, Agent-Model, and Agent-Session trailers and the same harness/model/session in the final PR-body footer; use unknown rather than guessing any field the owning session cannot determine.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 28, 2026 01:44
@ChrisRackauckas
ChrisRackauckas merged commit bd65ddf into SciML:master Aug 28, 2026
164 of 174 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