Repository navigation
Fall back to the solver default when an integrator carries no tolerances - #5106
Merged
ChrisRackauckas merged 1 commit intoSep 10, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
`affect_tolerance` reads `integ.opts.abstol`/`.reltol` directly. SciML#5080 dropped the `hasproperty` guards on the premise that "every SciMLBase integrator carries `.opts` with `abstol`/`reltol`", but `JumpProcesses`' `SSAIntegrator` stores `opts = (callback = CallbackSet(callback),)` (`SSA_stepper.jl:236`), a plain `NamedTuple` with no tolerances. Any `ImplicitAffect` fired from an SSA solve then threw `FieldError: type NamedTuple has no field 'abstol'`, which is the MTKBase `InterfaceII` failure on master (`jumpsystem.jl:109`). Return `nothing` — the nonlinear solver's own default, i.e. the pre-SciML#5080 behaviour — when the tolerance is absent, leaving SciML#5080's intent intact for every integrator that does carry tolerances. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Agent-Harness: Claude Code 2.1.267 Agent-Model: claude-opus-5[1m] Agent-Session: https://claude.ai/code/session_01FeJYXni9MkJhPFA9yxYvfn Claude-Session: https://claude.ai/code/session_01FeJYXni9MkJhPFA9yxYvfn
ChrisRackauckas
marked this pull request as ready for review
September 10, 2026 16:25
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 11, 2026
- Add AGENTS.md with code generation conventions (#5105) - Fall back to the solver default when an integrator carries no tolerances (#5106) 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]>
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.
What changed and why
ModelingToolkitBasemaster is red:lib/ModelingToolkitBaseInterfaceIIfails on Julia 1, lts and pre with(master run https://github.com/SciML/ModelingToolkit.jl/actions/runs/34284400093,
jumpsystem.jl:109).affect_tolerancereadsinteg.opts.abstol/.reltoldirectly. The second commit of#5080 dropped the
haspropertyguards on thepremise that "every SciMLBase integrator carries
.optswithabstol/reltol".JumpProcesses'SSAIntegratordoes not: it stores(
JumpProcesses/src/SSA_stepper.jl:236) — a plainNamedTuplewith no tolerances at all. AnyImplicitAffectfired from an SSA solve therefore threwFieldErrorinstead of running.The fix returns
nothingwhen the tolerance field is absent, which is what the rest of thefunction already does for the "no usable tolerance" cases and is the pre-#5080 behaviour
(the nonlinear solver's own default). #5080's intent is untouched for every integrator that does
carry tolerances.
Verification
Julia 1.12.7, local checkout of master at
88d9ad9300.Failing before the fix
The new
jumpsystem.jltestset, run against the unmodifiedcallbacks.jl(fix stashed):The two new
affect_tolerancecases insymbolic_events.jl, same unmodified source:Passing after the fix
Test groups
All three green, on the branch head:
Zero
Error During Test/Test Failedlines in either MTKBase log. The 3Brokenin the rootgroup are pre-existing
@test_brokens, untouched here.Formatting / spelling
What I did not verify
QA(Aqua/JET), Downgrade, Downstream, GPU and docs jobs: not run. The MTKBaseQAjob is redon master for an unrelated reason (see below);
affect_toleranceis unchanged in signature andgains only a
haspropertycheck, so it should not move the JET count, but I did not measure it.Core,Initialization,SymbolicIndexing, …) and the otherroot groups.
Note for reviewers
symbolic_events.jladdition sits inside a testset gated on@isdefined(ModelingToolkit),so it runs in the root MTK
InterfaceIgroup rather than in the MTKBase one.QAjob is also red on master (JET, "234 possibleerrors found"). It is tracked in ModelingToolkitBase QA lane red since #4832: JET typo mode reports 263 errors, 234 of them from Moshi
@matchcodegen #5063 andblocked on fix(match): emit flat && chains so guards see defined pattern variables Roger-luo/Moshi.jl#93; nothing here touches it.
This PR should be ignored until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code (model: claude-opus-5[1m], harness: Claude Code 2.1.267)
https://claude.ai/code/session_01FeJYXni9MkJhPFA9yxYvfn