Repository navigation
Tolerate roundoff-scale dt differences in SBDF dt-change reset - #4574
Merged
ChrisRackauckas merged 1 commit intoSep 16, 2026
Merged
ChrisRackauckas merged 1 commit into
ChrisRackauckas merged 1 commit into
Conversation
The dt-change restart added in SciML#4366 compared dt with exact `!=`, so a final step clipped to a 1-ulp-perturbed tspan[2] (dt differing by ~eps(t)) restarted the fixed-coefficient history at first order, amplifying a 1e-16 end-time perturbation into an O(dt^2) solution change (SciML#4573). Compare with the same 100*eps(t) window `modify_dt_for_tstops!` uses instead, preserving the genuine-restart behavior fixed in SciML#4329. Adds a regression test: a 1-ulp end-time perturbation must not change the SBDF2/3/4 result (out-of-place and in-place). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: OpenCode <[email protected]> Agent-Harness: OpenCode 1.17.18 Agent-Model: opencode/muse-spark-1.3-contributor-free Agent-Session: local session in /home/crackauc/sandbox/tmp_20260916_155340_76607
ChrisRackauckas
marked this pull request as ready for review
September 16, 2026 21:54
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 17, 2026
Ships the NordsieckBDF trial-step interpolation fix for delay equations (#4575) and the roundoff-tolerant SBDF dt-change reset (#4574). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude <[email protected]> Agent-Harness: Claude Code 2.1.273 Agent-Model: claude-opus-5[1m] Agent-Session: 6a01e420-3436-4518-83cc-6cd853283cfb (local transcript; this harness publishes no conversation URL)
ChrisRackauckas
added a commit
that referenced
this pull request
Sep 17, 2026
Ships the NordsieckBDF trial-step interpolation fix for delay equations (#4575) and the roundoff-tolerant SBDF dt-change reset (#4574). Agent-Harness: Claude Code 2.1.273 Agent-Model: claude-opus-5[1m] Agent-Session: 6a01e420-3436-4518-83cc-6cd853283cfb (local transcript; this harness publishes no conversation URL) 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.
What changed and why
SBDF's dt-change restart (#4366) compared
dtwith exact!=, so a final step clipped to a 1-ulp-perturbedtspan[2](dt differing by ~eps(t)) restarted the fixed-coefficient history at first order, amplifying a 1e-16 end-time perturbation into an O(dt^2) solution change (#4573). Both SBDF caches now compare via_sbdf_dt_changed, which tolerates differences within the same100*eps(t)windowmodify_dt_for_tstops!uses when clipping to a tstop, preserving the genuine-restart behavior fixed in #4329.Verification
u(T)-u(T2)| = 1.4e-17) vs v2.4.10 (3.7e-05, ratio ~4 under refinement); deleting only the two reset lines from unmodified v2.4.10 restores v2.4.9 bit-for-bit.0 passed, 4 failed(SBDF2/3/4 out-of-place + SBDF2 in-place)4 passed, diffs ~1.4e-17lib/OrdinaryDiffEqBDF/test/bdf_convergence_tests.jlwith fix: 98/98 pass (36+36 convergence, 14 SBDF incl. the SBDF solvers do not achieve expected convergence order #4329 clipped-step test, 12 static-array).GROUP=QA julia --project=lib/OrdinaryDiffEqBDF -e 'using Pkg; Pkg.test()': Allocation 4 pass / 18 broken (pre-existingbroken=truemarkers) / 0 fail; JET 18 pass / 23 broken (pre-existing) / 0 fail; Aqua 21/21; suite reports passed.Fixes #4573.
What was not verified
Reviewer notes
tscale rather thandt: the roundoff in a clipped step is O(eps(T)), so an eps(dt)-relative threshold still misfires for small dt (verified:100*eps(dt)still breaks at dt=2^-8..2^-10). Non-AbstractFloattkeeps exact comparison, mirroringmodify_dt_for_tstops!.bdf_utils.jl.Note
This PR should be ignored until reviewed by @ChrisRackauckas.
🤖 Generated with OpenCode 1.17.18 (model: opencode/muse-spark-1.3-contributor-free) — local session in /home/crackauc/sandbox/tmp_20260916_155340_76607