Repository navigation
Fix SRA resize! leaving H0 stage buffers at the old length - #4764
Merged
ChrisRackauckas merged 4 commits intoOct 7, 2026
Merged
Conversation
SRA/SRI store H0/H1 as Vector{uType}, so resize! skipped those arrays and the next step DimensionMismatch'd.
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Cursor Agent <[email protected]>
Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9
Agent-Model: auto
Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/OrdinaryDiffEq.jl/jobs/4720-cursor/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/OrdinaryDiffEq.jl/jobs/4720-cursor/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/OrdinaryDiffEq.jl/jobs/4720-cursor/log.txt on amdci2.julia.csail.mit.edu
Keep both HighOrder Core registrations: master's SRACache SciMLBase cache hooks test and this PR's SRA/SRI resize! stage-buffer regression. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/OrdinaryDiffEq.jl/jobs/4720-cursor/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas
marked this pull request as ready for review
October 7, 2026 16:11
This was referenced Oct 13, 2026
ChrisRackauckas
referenced
this pull request
Oct 13, 2026
…inaryDiffEqBDF, OrdinaryDiffEqExplicitRK, OrdinaryDiffEqFIRK, OrdinaryDiffEqFeagin, OrdinaryDiffEqHighOrderRK, OrdinaryDiffEqPDIRK, OrdinaryDiffEqRKN, OrdinaryDiffEqSDIRK, StochasticDiffEqHighOrder, StochasticDiffEqLowOrder, and StochasticDiffEqMilstein for release (#4871) Agent-Harness: Devin CLI 3000.11.3 Agent-Model: Fusion (Claude Opus 5.5 Medium + SWE-2 Medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/flash-hour.json Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
SRACache/SRICachestore stage states inH0/H1asVector{uType}. StochasticDiffEqCore's@cacheonly put fields typed exactlyuType/rateType/… intofull_cache, soresize!never touched those inner arrays and the nextstep!threwDimensionMismatch. The macro now splatsVector{uType}(and the matching rate/k/uNoUnits, rand, and rate-noise vector fields) into the generated cache iterators, which is the same pathdeleteat!/addat!use.Interaction with #4718
#4718 (merged) made
SRACache'su_cache/du_cache/user_cacheextend SciMLBase's hooks;user_cacheeven listsc.H0.... That alone does not fix #4720: OrdinaryDiffEqCoreresize!iteratesfull_cache(integrator)(from@cache), notuser_cache. Fresh check on this branch after merging master: restoredlib/StochasticDiffEqCore/src/misc_utils.jltoorigin/master(kept merged tests including #4718's hook test), ran HighOrderGROUP=Core— constructors 11/11 and cache hooks 9/9 passed; resize regression failed (Fail 1,Error 1). Restored this PR's@cachechange afterward (no commit of the temporary revert). This PR remains needed for SRA/SRI (and any other@cachetype whose stage buffers areVector{uType}/rateType/…), not for SciMLBase hook dispatch.Fail before / pass after
Negative control after #4718 on master: restored
lib/StochasticDiffEqCore/src/misc_utils.jlfromorigin/master, kept the merged HighOrder tests (cache hooks + resize).Before (master
@cache+ merged #4718 hooks; adaptive and fixed-step covered by the regression):Focused adaptive
SRA()(noadaptive=false) against master@cache(pre-merge evidence, still applicable):After the
@cachechange (GROUP=Core, post-merge with #4718 hooks test):Runic
--check(julia +1.12 --project=@runic) andtyposon the touched files were clean.Not verified / known remaining
DRI1,RS1,W2Ito1,IRI1still fail afterresize!(masterDimensionMismatch→ this PRBoundsError) becauseg2/g3/H12–H23are noise-dimension (m) length outer vectors;PL1WMstill fails withDimensionMismatch. Not a regression; they need m-length handling as a follow-up.deleteat!afterresize!throwsBoundsErroron master and this PR alike (ThreeStageSRACachealiasesk1andtmp, sofull_cacheholds it twice). Separate bug, unchanged here.@allocated resize!(integ, 3)on SRA goes 0 → 240 bytes (full_cachebecomesTuple{V,V,Vararg{V}}).resize!is not a hot path.full_cache(unchanged).@cache(ODE FIRK/RKIP/SDC/etc.Vector{uType}fields). SDC already resizes those inresize_non_user_cache!.Interface3cache callback tests.Please ignore this draft until reviewed by @ChrisRackauckas.
Fixes #4720
Risk assessment
@cachetype withVector{uType}/rateType/kType/uNoUnitsType/randType/rateNoiseTypefields;full_cache/rand_cache/ratenoise_cachenow iterate inner arrays soresize!/deleteat!/addat!mutate each stage buffer instead of skipping them. Weak caches with m-length outer vectors are still wrong (same as master, different exception).H0lengths stay 2;DimensionMismatchonstep!) and passes with this PR's macro change (25/25 in HighOrderGROUP=Core).Harness: Cursor Agent CLI 2026.10.01-14929f9; model: auto; transcript: /home/crackauc/sandbox/goals/issue-backlog/ibd/OrdinaryDiffEq.jl/jobs/4720-cursor/log.txt on amdci2.julia.csail.mit.edu