Rebase of #3902 onto master (TSRKC2/TSRKC3 stage time hoist) - #4091
Merged
ChrisRackauckas merged 1 commit intoAug 2, 2026
Conversation
Rebase of the surviving content of SciML#3902 onto current master. In the in-place TSRKC2 and TSRKC3 stage loops `th` was assigned inside the `if (iter < mdeg)` guard. Hoisting it out matches RKC and RKMC2, which already compute `th` unconditionally. This is a no-op: `th` is read only by the `th1 = th` on the following line, which stays inside the guard, so nothing observes the value computed on the final iteration. The rest of SciML#3902 landed separately and is already on master: - RKL1/RKL2 non-autonomous stage times (SciML#3948) - RKG1/RKG2 non-autonomous stage times (SciML#3949) - RKC in-place mdeg < 2 handling (SciML#3951) - per-algorithm limiter fields, reverted by the author in c34fe7a and superseded by solve-level limiters (SciML#3835) Original commits: 9158496, 05548a5, c34fe7a Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
ChrisRackauckas-Claude
force-pushed
the
pr3902-rebase
branch
from
August 2, 2026 00:51
aa88842 to
de4a30e
Compare
ChrisRackauckas
marked this pull request as ready for review
August 2, 2026 05:03
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 until reviewed by @ChrisRackauckas. Opened as a draft.
Rebase of #3902 (by @Sreeram-Shankar) onto current master, as requested. Authorship on the commit is preserved.
Honest summary: this is a no-op
Rebasing #3902 onto master leaves two moved lines. Everything else in that PR is already on master, landed via other PRs. I am opening this because the rebase was asked for, not because I think it fixes anything — the surviving change has no observable effect.
What survives
thwas assigned inside theif (iter < mdeg)guard in the in-place TSRKC2 and TSRKC3 stage loops; this hoists it out, matching RKC and RKMC2 which already compute it unconditionally.It is a no-op because
this read only by theth1 = thon the next line, which stays inside the guard. Nothing observes the value computed on the final iteration — I checked thatthappears exactly twice in each method (the assignment and that read), both inside the guard, and is never read after the loop.The cost is one dead flop per step. The benefit is consistency with the sibling methods. Reviewer's call whether that trade is worth taking; closing this is a perfectly reasonable outcome.
What did not survive, and why
mdeg < 2handlingc34fe7a73; superseded by solve-level limiters, #3835Master computes stage times with the recursion
cⱼ = μⱼcⱼ₋₁ + νⱼcⱼ₋₂ + μ̃ⱼ (+ γ̃ⱼ)rather than #3902's closed forms. I verified in exact rational arithmetic, for s ∈ {3,4,5,7,9,15,25}, that the recursion reproduces #3902's closed forms exactly for all four families:j(j+1)/(s(s+1))(j²+j−2)/(s²+s−2)j(j+3)/(s(s+3))(j+4)(j−1)/((s+4)(s−1))So none of that analysis was lost in the reimplementation.
I also dropped four stray double-blank-lines and one unwrapped long line from #3902, which were Runic regressions.
Testing
GROUP=Coreinlib/OrdinaryDiffEqStabilizedRK, run locally on this branch:Identical to master (256/256), as expected for a no-op. Runic reports the modified file clean.
Unrelated pre-existing failure on master
GROUP=QAfails on unmodified master, independent of this PR:trivial_limiter!is imported atlib/OrdinaryDiffEqStabilizedRK/src/OrdinaryDiffEqStabilizedRK.jl:13and used nowhere insrc/. Traced toc017e6c45(#3835), which removed every use but left the import. Not fixed here to keep this PR to one thing.🤖 Generated with Claude Code
https://claude.ai/code/session_018D9tiAHg9m8uQcz1H7QxcU