Repository navigation
Fix SRA1 OOP non-diagonal noise (matrix-vector mul vs .*) - #4826
Merged
ChrisRackauckas merged 1 commit intoOct 9, 2026
Merged
Conversation
ChrisRackauckas-Claude
force-pushed
the
sde-sra1-oop-nondiag
branch
from
October 9, 2026 09:01
7187ad0 to
eb5a374
Compare
SRA1ConstantCache used elementwise chi2 .* gpdt, which DimensionMismatch-es for matrix noise; mirror the IIP is_diagonal_noise branch (gpdt * chi2). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI Agent-Model: auto
ChrisRackauckas-Claude
force-pushed
the
sde-sra1-oop-nondiag
branch
from
October 9, 2026 16:42
eb5a374 to
ee8e6bb
Compare
ChrisRackauckas
marked this pull request as ready for review
October 9, 2026 19:14
This was referenced Oct 13, 2026
ChrisRackauckas
referenced
this pull request
Oct 14, 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.
Summary
Out-of-place
SRA1ConstantCacheapplied elementwisechi2 .* gpdt(andW.dW * gpdtunder@..) even whengis a matrix. That is only valid for diagonal noise and throwsDimensionMismatchfor non-diagonal additive problems. The in-place path already branches onis_diagonal_noiseand usesmul!(…, gpdt, chi2). This PR mirrors that branch in OOP (gpdt * chi2/gpdt * W.dW), leaving the diagonal branch byte-identical to master.Failing before / passing after
Regression (
lib/StochasticDiffEqHighOrder/test/sra1_oop_nondiag_tests.jl), src fix stashed vs present (Julia 1.12.7,--check-bounds=auto):Before (src stashed):
After (with fix):
Fixed-dt OOP vs IIP non-diagonal trajectories match (
≈); adaptiveu[end]matches tortol=1e-10. Diagonal OOP trajectory bitwise identical to master (serializebefore/after== true).Test-group tails
Core (Julia 1.12,
--check-bounds=auto,OPENBLAS_NUM_THREADS=1):QA (Julia 1.12,
--check-bounds=auto):Julia 1.10.12 regression (standalone env):
Runic
--inplaceandtyposon changed files: clean.Not verified
StochasticDiffEqInterface/Adaptive/additive CI groups.n×mwithm≠nbeyond the 4×2 additive case), complex, orSVectorOOP non-diagonal.Reviewer pushback
u[end]) under shared noise.Please ignore until reviewed by @ChrisRackauckas.
Risk assessment
Independent review: pending
🤖 Generated with Cursor Agent 2026.10.01-14929f9 (model: unknown (Cursor auto)), transcript /home/crackauc/sandbox/goals/performance/jobs/pr-sde-sra1-nondiag/log.txt on amdci2; orchestrated by Claude Code (claude-opus-5-5[1m]) https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv
Made with Cursor
Risk assessment
SRA1ConstantCacheperform_step!in StochasticDiffEqHighOrder. It gains anis_diagonal_noisebranch: the diagonal branch is the existing code unchanged, and the non-diagonal branch uses matrix-vector products, matching the IIPSRA1Cache. Adds a new Core test file. No public API change. Non-diagonal OOP SRA1 threwDimensionMismatchon master, so no working behavior changes.downgrade-sublibrariesfor DiffEqBase and OrdinaryDiffEqDifferentiation also fail on master Downgrade Sublibraries run https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/37889760391 (91d6ffa).SciMLSensitivity.jl/Core1fails at the sameconcrete_solve_derivatives.jl:451as master IntegrationTest run https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/37889760310.GPU (julia 1)shows the same 3 QNDFdae_tests.jl:481failures as master. Locally (Julia 1.12.7, seed 9), I ran master base and PR with fixed dt=1/64 and adaptive. Diagonal Vector, scalaru, scalar-noise and SVector-diagonal OOP solutions are bitwise identical between master and PR, as is non-diagonal IIP. Non-diagonal (4x2) OOP and SVector/SMatrix OOP throwDimensionMismatchon master and solve on the PR. Non-diagonal OOP matches IIP on the same time grid, with a max difference of 3.3e-16 at fixed dt and 4.4e-16 adaptive (identicalt, 98 steps). The PR's test errors on master src (DimensionMismatchatsra.jl:7) and passes on PR src (6/6 and 2/2).lib/StochasticDiffEqHighOrder/test/runtests.jlconflicts with master since SRA1 iip: scale k₁ in-place to drop per-step allocation #4822 merged, and it will also conflict with Fix Float32 promotion in SRA/SRI OOP stages and SRI() Vector broadcast #4825. Non-blocking: the test file's header comment narrates the old behavior, and the 4x2 test does not cover non-square cases with m > n.🤖 Risk assessment posted by an AI agent (fleet master) — harness: Claude Code 2.1.285 · model: claude-opus-5-5
Conversation: local session 3c311569-dda6-4687-bc9f-65febb212c33 (local transcript)