Handle matrix-free instability diagnostics - #4310
Merged
ChrisRackauckas merged 1 commit intoAug 20, 2026
Merged
Conversation
Member
Author
|
CI triage: all completed failures are the two independently reproduced master Downstream issues. ProbNumDiffEq’s Julia 1.10 resolver failure is addressed by #4320. PositiveIntegrators’ LinearSolve 5 compatibility failure is addressed upstream by NumericalMathematics/PositiveIntegrators.jl#216. No completed red check currently points to this PR’s changed behavior. |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude
force-pushed
the
fix/matrix-free-diagnostic-jacobian
branch
from
August 20, 2026 15:57
72c953e to
bfe1e1a
Compare
ChrisRackauckas
marked this pull request as ready for review
August 20, 2026 15:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ignore this PR until reviewed by @ChrisRackauckas.
What changed and why
Return
nothingfrom the fresh-Jacobian diagnostic hook when an in-place solver cache is matrix-free. The current code callszero(cache.J)and receives aNullOperatorfor a KrylovJVPCache, then passes that operator to the matrix-onlycalc_J!path and errors while trying to report numerical instability. The Core diagnostic caller already treatsnothingas “stored Jacobian unavailable.”The regression is covered with an in-place Rosenbrock23/Krylov cache and verifies both the return value and unchanged solver work counters. OrdinaryDiffEqDifferentiation is bumped to 3.9.1.
An independent runtime bisect identified 0ed2615 as the first bad commit. Its parent returns a dense matrix for the same reproducer; the bad commit errors in
jacobian!(::NullOperator, ...).Failing before / passing after
With the regression test present and the source fix reverted:
With this patch, the same test and full Core group pass:
A direct after-fix reproduction returned
nothingwith counters unchanged at(nf, njacs) = (3, 0).Local verification
GROUP=Core julia +1.12 --project=lib/OrdinaryDiffEqDifferentiation --startup-file=no -e 'using Pkg; Pkg.test()': full package group passed. This includes DAE jacobian2W 4/4, scalar-operator mass matrix 9/9, No Jac 9/9, stale W 12/12, nf accounting 21/21, and Krylov tolerance 7/7.GROUP=QA julia +1.12 --project=lib/OrdinaryDiffEqDifferentiation --startup-file=no -e 'using Pkg; Pkg.test()': JET 1/1 and Aqua 19/19; package tests passed.typos, andgit diff --check: passed.The CUDA job was not run locally because this machine has no GPU. The failure was reproduced through the same matrix-free cache path on CPU; broad CI should verify the GPU path. Docs and prerelease-Julia groups were not run because this adds no public API or documentation.
Failing CI job: https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/32353535950/job/96379682877