Repository navigation
Store the end-of-step slope at the new solution for SFSDIRK4-8, SDIRK2 and SSPSDIRK2 - #4853
singhharsh1708 wants to merge 3 commits into
Conversation
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a19738-d936-7bd2-b34b-c0760295140d, reviewed head 6754fcf
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Corrects the endpoint slope for SFSDIRK4–8 and the endpoint evaluation time for SDIRK2 and SSPSDIRK2. The SFSDIRK change also feeds unscaled mass-matrix right-hand sides into Hermite interpolation and requires correction. Blast radius: SDIRK2, SSPSDIRK2, and SFSDIRK4–8 endpoint caches; SFSDIRK mass-matrix dense output in both in-place and out-of-place execution. Default solver selection and shared interpolation code are unchanged. Evidence: Blind assessment sealed before author context. Head targeted test file passes all 144 assertions (including all 41 added endpoint checks); the added regression fails on base in 10/41 cases and passes on head in 41/41 cases. The independent head probe passes 10 identity-matrix cases and fails all 10 non-unit mass-matrix cases, with dense-output order approximately 1.01 instead of 4. SDIRK Core CI passes on Julia 1 and LTS; failed CI jobs are detailed below. Blocking findings
Non-blocking findingsNone. What I ranCommands were run from the review workspace; gh pr view 4853 --repo SciML/OrdinaryDiffEq.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid
git -C src fetch origin +refs/pull/4853/head:refs/remotes/pr/4853 master
git -C src checkout --detach pr/4853
git -C src rev-parse HEAD origin/master
git -C src merge-base origin/master HEAD
git -C src diff --stat origin/master...HEAD
git -C src diff origin/master...HEAD
sha256sum INITIAL.md > INITIAL.sha256
gh pr view 4853 --repo SciML/OrdinaryDiffEq.jl --json title,body,commits,statusCheckRollup
gh pr checks 4853 --repo SciML/OrdinaryDiffEq.jl
git -C src log -1 --no-merges --format='%H%n%B'
git -C src log --first-parent --no-merges -1 --format='%H%n%B'
gh run list --repo SciML/OrdinaryDiffEq.jl --branch master --event push --limit 5 --json databaseId,headSha,conclusion,name,urlLive head matched TARGET. The merge-base and live PR base were both Julia run 1 (exit 0): JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$REVIEW_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing head_test.jlThe script activates an external Julia run 2 (exit 1): git -C src archive 45ff46afe9919acf32e9af8058705073e0995503 lib/DiffEqBase lib/OrdinaryDiffEqCore lib/OrdinaryDiffEqDifferentiation lib/OrdinaryDiffEqNonlinearSolve lib/OrdinaryDiffEqSDIRK | tar -x -C base-src
cp src/lib/OrdinaryDiffEqSDIRK/test/tableau_consistency_tests.jl regression_head.jl
JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$REVIEW_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing --project=env-base base_test.jl
Julia run 3 (exit 1; 10 passed, 10 failed, 0 errored): JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 JULIA_PKG_PRECOMPILE_AUTO=0 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$REVIEW_DEPOT:" timeout 3600 julia +1.13.2 --startup-file=no --compiled-modules=existing --project=env analytic_probe.jlThe independent probe solves All solves returned successfully. The independent reference exposes a silent dense-output accuracy loss. Output summary (orders computed from the 1/32 and 1/64 errors):
The base analytic sweep was not reached, so I do not claim a measured base-versus-head dense-order comparison. Attribution to this diff follows from its change from the stage-derived CI logs were inspected with
No upstream writes were performed. What I did not verifyGPU execution, differentiation through solve, MPI, Reactant, non-diagonal/singular/time-dependent mass matrices, and full downstream suites were not run locally. The ModelingToolkit InterfaceI failure was not reproduced locally or matched to a recent master failure. The base analytic dense-output sweep and base split-problem testset were not reached after the regression failure. Full benchmark claims in the PR description were not independently reproduced. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
6754fcf to
2ec65e1
Compare
|
With a non-identity mass matrix the step now keeps |
PR: #4853 Reviewed head: 2ec65e1 Risk assessment
Review reportVERDICT: CHANGES Riskmedium-high (MH1: The patch changes derivative caching on the common Blocking findings
Nonblocking findingsNone What I ran
What I did not verify
Head link: 2ec65e1 🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol |
SFSDIRK4 to SFSDIRK8 now give fourth-order dense output instead of second: the slope they stored at the end of a step was the last stage's, not
fat the new solution, and that slope is what the Hermite interpolant and the next step read.SDIRK2andSSPSDIRK2storedf(u_{n+1}, t_n), wrong only whenfdepends ont, and are fixed the same way.The five SFSDIRK tableaus in
imex_tableaus.jlare not stiffly accurate but did not setexplicit_fsallast, and the other two setfsallast_c = 0; both came over from the old hand-written steps.On
u' = -u^2withdt = 1/64the SFSDIRK dense-output order goes from 1.93 to 3.95 and the dense error drops by 974x to 2228x, for one morefcall per step; onu' = 3cos(3t)uthe SDIRK2 dense error drops from 1.5 times the error at the steps to equal to it.The new test checks the stored slope after one step of all 38 methods; on master it fails for these seven.
Risk assessment
explicit_fsallastand pay one morefcall per step; SDIRK2 and SSPSDIRK2 evaluate the stored slope att + dtinstead oft. The generic ESDIRK path (in place and out of place) also gains a mass-matrix condition: with a non-identity mass matrix, tableaus withexplicit_fsallastother than ImplicitEuler (ImplicitMidpoint, Trapezoid, SDIRK2, SSPSDIRK2) now keepz_s/dtas the stored slope instead off(u); the body does not describe this part. IMEX split solves and the default solver are not touched.u' = -u^2withdt = 1/64the SFSDIRK dense-output order goes from 1.93 to 3.95 and the dense error drops 974x to 2228x; onu' = 3cos(3t)uthe SDIRK2 dense error drops from 1.5 times the step error to equal to it. The new test checks the stored slope after one step of all 38 methods and fails on master for these seven. The red checks (SciMLSensitivity Core2 and Core4, ProbNumDiffEq, AD lts, both GPU lanes) also fail on master.AI Disclosure: Claude assisted with this change.