Repository navigation
Rosenbrock32: refuse singular mass matrices (#4650) - #4653
Merged
ChrisRackauckas merged 5 commits intoSep 27, 2026
Merged
Conversation
inv(integrator.opts.abstol) fails for a vector abstol (inv has no AbstractVector method), so mass-matrix DAEs errored in the Rosenbrock23/32 error estimate that adds the algebraic-constraint residual. inv.(abstol) is bitwise identical for scalar abstol and gives elementwise reciprocals for vector abstol. The Rosenbrock32ConstantCache site also called ifelse on the differential_vars array unbroadcasted, which errors for any abstol; it now broadcasts like the Rosenbrock23ConstantCache site. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.1 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/OrdinaryDiffEq.jl/jobs/4598-devin/log.txt on amdci2.julia.csail.mit.edu
Rosenbrock23 and Rodas5P solve a ROBER mass-matrix DAE with a vector abstol, in-place and out-of-place; a vector abstol with equal entries must reproduce the scalar-abstol trajectory bitwise. Rosenbrock32 is covered on a non-stiff DAE since its DAE error estimate rejects to instability on ROBER at tight tolerance even with scalar abstol. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.1 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/OrdinaryDiffEq.jl/jobs/4598-devin/log.txt on amdci2.julia.csail.mit.edu
On current master, OOP Rosenbrock32 is Unstable on the non-stiff DAE at 1e-6 for both scalar and vector abstol; use 1e-4 and require equal-entry vector abstol to match the scalar trajectory bitwise. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/adopt/SciML_OrdinaryDiffEq.jl-4619/log.txt on amdci2.julia.csail.mit.edu
Use in-place ./abstol for the DAE algebraic EEst contribution, add a non-uniform vector abstol regression with a hand-checked atmp scale, and document the OOP Rosenbrock32 mass-matrix / tol-1e-6 limitation. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/adopt/SciML_OrdinaryDiffEq.jl-4619/log.txt on amdci2.julia.csail.mit.edu
This was referenced Sep 28, 2026
ChrisRackauckas
referenced
this pull request
Sep 29, 2026
* Bump DiffEqBase to 7.21.3 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqBDF to 2.4.12 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqSDIRK to 2.9.7 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqRosenbrock to 2.7.5 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqLowOrderRK to 2.2.6 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqTsit5 to 2.1.5 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqVerner to 2.4.2 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json * Bump OrdinaryDiffEqSymplecticRK to 2.2.3 Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 (Mac) Agent-Model: Fusion (claude-opus-5-5 medium + swe-2 medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/helpful-exception.json --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This was referenced Sep 27, 2026
ChrisRackauckas
added a commit
that referenced
this pull request
Oct 11, 2026
… test, ScalarOperator mass matrix in SDIRK, GlobalDiffEq erased callback (#4780) * Expect Rosenbrock32 to reject the DAE in the inference QA test #4653 made Rosenbrock32 throw on singular mass matrices, so the DAE pass of the perform_step! inference test errored at init. Assert the ArgumentError for that pairing instead of running the inference check. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Gate the despecialized callback-erasure test on _erases_callback_types Erasure only runs on Julia >= 1.12, so on 1.11 (Downgrade Sublibraries) the problem comes back unchanged and has no callback kwarg. Test the unchanged problem there. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Handle scalar mass matrices in the explicit-first-stage FSAL conversion _mmdiag called diag on the mass matrix, which has no method for a ScalarOperator or a UniformScaling, so TRBDF2 failed on mass_matrix = ScalarOperator(λ). Use the scalar itself; it broadcasts in _mmdiv/_mmmul. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Ignore DiffEqBase's empty erased callback in GlobalDiffEq On Julia >= 1.12 DiffEqBase injects an empty type-erased CallbackSet for despecialized problems, so haskey(kwargs, :callback) rejected solves that passed no callback. Only reject non-empty callbacks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Make the kwargs-merging callback helper work without erasure erased_callbacks assumed every result carries an erased CallbackSet, but erasure only runs on Julia >= 1.12. On lts the callback stays as given (or is absent), so read it with get and accept a bare callback. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Apply the empty-callback check to problem kwargs in GlobalDiffEq get_concrete_problem also writes the empty erased CallbackSet into prob.kwargs, which _validate_estimation_problem rejected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Evaluate a time-varying mass matrix at each FSAL conversion's own point The explicit-first-stage FSAL conversion read a SciMLOperators mass matrix once per step, at whatever (u, p, t) it last held, and reused that value for the end-of-step fsallast. A time-varying ScalarOperator then mixes M(t_n) into a conversion that needs M(t_n + dt). Read the diagonal at (uprev, t) for the first stage and at (u, t + dt) for fsallast, via the out-of-place update_coefficients so the operator itself is untouched. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh * Remove the _mmdiag_end method ambiguity on M === I Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh --------- Co-authored-by: Claude <[email protected]>
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.
Fixes #4650. Depends on #4619 (this branch is built on it; will rebase once it merges).
Rosenbrock32is unstable on index-1 DAEs in both in-place and out-of-place form. Its 3rd-order update amplifies the algebraic constraint error each step, independent of dt, so round-off eventually forces dt to zero. On the issue's problem withtspan = (0, 3):This PR throws an
ArgumentErrorfor singular mass matrices, pointing toRosenbrock23/Rodas5P. Non-singular mass matrices are unaffected.Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
The test block added in #4619 for
Rosenbrock32on this DAE now checks that both forms throw, and that a non-singular mass matrix still solves.disclosure : the analysis and the pr description were made with the help of claude , under my review and i have understood it