Repository navigation
StiffSDE and NonStiffSDE: computed Oval2 verdict, StochasticHeat stability wording, cite sample-error fix (#1906 follow-up) - #1916
Merged
ChrisRackauckas merged 8 commits intoSep 28, 2026
Conversation
… run data The conclusion's claims are now recomputed in a summary chunk from the stored failure counts and timings: the first failure-free step size per explicit method, implicit failure totals and fastest times, and the name and speedup of the fastest adaptive run. The implicit loops record their failures and times so the summary covers them, and each adaptive chunk tracks which failure-free run was fastest. The conclusion names the fastest adaptive run by reference to the summary rather than hardcoding a tolerance pair whose ordering flips under machine load. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/tmp_20260923_090949_54257/handoff/fu1906.log on this machine
…rors shown The implicit methods being stable at every tested step size is a stability statement, not an accuracy one: at dt = 0.1 their fixed-step squared error is about 1, far above what they reach at smaller steps, so the error limits dt in practice. The unsupported claim that an error of about 1e-10 is needed for explicit methods to win is removed; no timing on the page compares cost at equal accuracy. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/tmp_20260923_090949_54257/handoff/fu1906.log on this machine
…rrors fix Link the sample-error caveat to the draft upstream fix for the double-1/sqrt(N) division in DiffEqDevTools.get_sample_errors (SciML/OrdinaryDiffEq.jl#4612, DiffEqDevTools lives in the OrdinaryDiffEq monorepo). Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local session, transcript at /home/crackauc/sandbox/tmp_20260923_090949_54257/handoff/fu1906.log on this machine
…all conclusion claims from the data Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd (bridged session shared with the earlier run)
…rror fix as proposed, not landed Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd (bridged session shared with the earlier run)
…t failure-free run The verdict used findlast on the descending dt grid, so the printed "largest failing dt" was actually the smallest failing one. The "cheapest failure-free fixed-step run" minimized over only each explicit method's first failure-free row and could divide by Inf when no successful run existed. Compute both from the dt values themselves so the result does not depend on grid order, minimize over every measured failure-free fixed-step run (explicit and implicit), label the winning method and step, and print that no baseline exists instead of an infinite ratio. The conclusion prose now only describes what the summary computes; the red stability dots use the same order-independent largest-failure-free-dt selection. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-high Agent-Session: local Devin CLI session "locrian-drip" (no shareable URL; transcript ~/.local/share/devin/cli/transcripts/locrian-drip.json)
…nged SDE pages Round-5 review of PR SciML#1916 found StochasticHeat and BasicSDEWeakWorkPrecision still asserting measured results in prose. StochasticHeat now records each solve's status and each squared error and prints stability, error magnitudes and adjacent-step ratios from them, including the adaptive RSwM1 run; the stability test compares against sol.prob.tspan[2] rather than a literal final time. BasicSDEWeakWorkPrecision retains every work-precision set's weak_final errors and timings and prints which methods reach each set's sample-error line ordered by cheapest qualifying time. Oval2Timings gives the stability scatter concrete Float64 inputs so the marker path is safe when no fixed-step method is failure-free. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3; draft by Codex CLI 0.157.1 Agent-Model: swe-2-max; draft by gpt-6-sol Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (transcript in ~/.local/share/devin/cli/sessions.db), bridged to https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd; Codex rollout: see handoff/cx1916.log
Oval2Timings now counts each explicit method's failing step sizes over all tested dt instead of only those coarser than the coarsest failure-free step, so non-monotone failures at finer steps are reported, and it picks each implicit method's fastest run among failure-free runs only. The conclusion prose matches the new quantities and drops retrospective wording. BasicSDEWeakWorkPrecision renames the summary loop variable that shadowed Base.missing and throws an informative ArgumentError when a name list and its work-precision results differ in length. StochasticHeat retitles the "Interesting Property" and "highest possible dt" headings to describe the sections as they now are. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.11.3 Agent-Model: swe-2-max Agent-Session: local Devin CLI session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (transcript in ~/.local/share/devin/cli/sessions.db on this machine), bridged to https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd
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.
Follow-up to #1906 addressing its round-2 review (
REVIEW-r2.md), the round-3 opencode review, the round-3 Codex review, and the round-5 Codex review of this branch.Review responses
Round-6 follow-ups (Claude Code / claude-opus-5-5, VERDICT: MERGE — non-blocking items addressed at
2f6b5eb4)Non-blocking item 1 (stale "(c)" paragraph) was already corrected in this body. The remaining items:
record_weak_results!throws anArgumentErrornaming the problem, set and the two lengths whennamesandwpdiffer in length (probe:ArgumentError("P (short names): 1 method names for 4 work-precision results")). The summary loop'smissingaccumulator is renamednot_reached.No re-weave: the changes are confined to two
printlnformats, one helper guard, one variable rename, and headings/prose. The changed chunks were extracted verbatim and run in the pinned env (julia --project=.) on the reviewer's synthetic matrices — the weave-like case reproduces the rendered verdict with the new wording, the non-monotone case reports the finer-step failures, and both implicit edge cases behave as described above.typosandgit diff --checkare clean.Round-5 review (Codex / gpt-6-astra, VERDICT: CHANGES — blocking finding fixed, both non-blockings addressed)
(1) Blocking — computed-summary requirement incomplete on two pages.
StochasticHeat.jmdandBasicSDEWeakWorkPrecision.jmdnow keep every measured quantity in variables and print every data-dependent statement from them; no prose asserts a result.heat_stability(SciMLBase.successful_retcode(sol) && sol.t[end] == sol.prob.tspan[2] && all(isfinite, sol.u[end])) and each mean squared error intoheat_errors; the conclusion chunk prints the per-run stability, the squared errors, and the observed error ratios between adjacent step sizes. The adaptiveSRIW1solve on the RSwM1 noise process — whose instability the old prose asserted — is now recorded and reported the same way; on this weave it printedstable.:weak_finalerrors and elapsed times inweak_resultsviarecord_weak_results!after eachget_sample_errorscall, and prints for each problem/set which methods reach that set's own dashed sample-error line ordered by their cheapest qualifying elapsed time, and which methods do not reach it.From the weave at 4c916ce (
/home/crackauc/.juliaup/bin/julia +1.12 --threads=auto --project=. benchmark.jl <page>, each exit 0):benchmarks/StiffSDE/StochasticHeat.jmd:benchmarks/NonStiffSDE/BasicSDEWeakWorkPrecision.jmd:(2) Non-blocking — PR evidence discrepancy on SRIW1 failure counts. Confirmed against this weave: the per-run lines print
10, 1, 1failed trajectories at2^-16, 2^-17, 2^-18for Euler-Maruyama and RKMil but8, 4, 2for SRIW1, exactly as the review observed. Quoting this weave:The generated verdict still reports three failing step sizes per method, so its conclusion is unaffected; the stale
(10, 1, 1)claim in the Evidence section below referred to an older weave and is corrected here.(3) Non-blocking — pre-existing empty-marker plotting failure. The red-dot scatter in
Oval2Timings.jmd's plot chunk now usesFloat64[...]comprehensions, so the inputs keep a concrete eltype when no explicit method is failure-free and theVector{Union{}}AssertionErrorpath is removed. This bug predates the PR (introduced in4f395dd1); the fix is included here per the review's suggestion.Round-3 review (Codex / gpt-6-astra, VERDICT: CHANGES — both blockers fixed at
9c3a5963)(1) Blocking — "largest failing Δt" reported the smallest failing Δt. The verdict used
findlastover the descending grid2^-16, …, 2^-21, so the index it found was the finest failing step (2^-18), not the coarsest (2^-16). The verdict chunk no longer indexes into the grid at all: for each method it collects the tested rows wherefails > 0and reportsmaximum(dts[failing]), and it selects the coarsest failure-free step asargmaxoverdtsamongfails == 0rows. Everything is computed from the Δt values, so the result is identical for any grid ordering. The printed label now reads "largest failing Δt" (max over failing Δt) and "coarsest failure-free Δt" (max over failure-free Δt) — unambiguous regardless of row order. The red-dots "stable" selection in the plot chunk uses the same order-independentargmaxconstruction. On the re-woven page all three explicit methods now correctly printlargest failing Δt = 2^-16.(2) Blocking — "cheapest failure-free fixed-step run" omitted eligible runs and could print
Inf. The old code minimized over only each explicit method's first failure-free row and ignored implicit runs entirely, then divided by the result unchecked. The chunk now collects every measured failure-free fixed-step run — all three explicit methods across their tested steps and both implicit methods across2^-17, …, 2^-21— and takes the true minimum, printing the winning method and Δt. When no failure-free fixed-step run exists it prints "No failure-free fixed-step run exists …" and, instead of a ratio, "No failure-free fixed-step baseline exists, so no fixed-step/adaptive ratio is reported". On the new weave the global minimum isRKMil at Δt = 2^-19 (30.6 s)— which the old first-row-only logic would have reported as EM's 32.6 s, so the fix changes the printed verdict on real data, not only on the reviewer's synthetic counterexample.Non-blocking (1) — conclusion still partly hardcoded. The Conclusion prose no longer asserts any results (zero implicit failures, slower implicit runs, >10× speedup, load-invariant ordering). It only describes which quantities the summary computes and prints, and directs the reader to the printed lines for what holds in the latest weave. All data-dependent claims now live exclusively in the printed block, which is computed from the stored run data.
Non-blocking (2) — missing risk assessment. Added below, above the footer.
Round-3 review (opencode, VERDICT: MERGE; non-blocking items fixed earlier on this branch)
(2) Twelve copy-pasted
if numfails == 0 && adaptive_time < best_adaptive_timeblocks. Replaced by a singletime_adaptive!(label, alg; abstol, reltol)helper defined in the setup chunk: it runs the same warmup + timed solve, counts failures the same way, pushes a(label, time, numfails)record intoadaptive_runs, and prints the same per-run line as before. Each of the twelve adaptive chunks is now one call, with the label text sitting next to the solve arguments, so a label can no longer drift from its run. The plot chunk and the verdict chunk both derive the fastest failure-free adaptive run fromadaptive_runs. This also fixes the plot's dashed-line legend, which was hardcoded to"ESRK+RSwM3"; it now shows the actual fastest run's label.(3) Conclusion hard-coded the Δt claims. The verdict chunk prints every quantity the conclusion asserts; the prose no longer states any Δt value or speedup itself. (Extended further in the Codex round-3 response above.)
(4)
BasicSDEWeakWorkPrecision.jmd"fixed in" link. Reworded to "a fix is proposed in" since SciML/OrdinaryDiffEq.jl#4612 is still an open draft.(1) Duplicate adaptive chunks (not fixed, as scoped). The review explicitly marked the duplicated
SOSRI 2^-12/2^-15andSOSRI2 2^-13/2^-11chunk pairs "not required for this follow-up"; they still run, now as one-linetime_adaptive!calls.(5) Stale orchestrator output copy of StochasticHeat.md. That file lives outside the repo (
out/markdown/); the PR only touchesbenchmarks/. The CI artifact the review downloaded confirms the new prose matches the woven output.Round-2 review (items already on this branch)
(a) Blocking —
test/core.jltestset "Oval2Timings conclusion is load-invariant" breaks AGENTS.md. The testset never reached master: the squash merge4f395dd1contains notest/core.jldiff, and the file on master has no such testset, so there is nothing to delete. Instead of a text-grepping test,StiffSDE/Oval2Timings.jmdcomputes its verdict from the stored run data (see above).(b) Non-blocking — BasicSDEWeak caveat wording / missing "library fix". The wording issue was already fixed on master ("a factor of about √1000 below"). The upstream fix the caveat needed exists as draft PR SciML/OrdinaryDiffEq.jl#4612 (DiffEqDevTools lives in the OrdinaryDiffEq monorepo). The caveat links to it, now worded as "a fix is proposed in".
(c) Non-blocking — StochasticHeat prose (round-1 non-blocking #3). Superseded by the round-5 fix: the page no longer has hand-written conclusion prose. It prints each solve's stability, the squared errors and the observed convergence ratios from the stored results (see the round-5 section and the quoted weave output).
Evidence
All three changed pages were woven at 4c916ce (the commit before the round-6 follow-ups) with
export TMPDIR=$HOME/tmp; /home/crackauc/.juliaup/bin/julia +1.12 --threads=auto --project=. benchmark.jl <page>; each exited 0. StochasticHeat wove 19 chunks and Oval2Timings 21 chunks (logs end with "Weaved to …/markdown/… .md"). The StochasticHeat and BasicSDEWeak printed summary blocks are quoted in the round-5 section above; the Oval2 verdict block from this weave reads:All 12 adaptive runs report 0 failures on this weave. This supersedes the round-3 weave quoted in the next paragraph (absolute timings are load-dependent).
Earlier round-3 evidence for the verdict-logic work, preserved for context:
New verdict logic was unit-tested on synthetic data before weaving (a scratch-only standalone Julia script running the extracted verdict chunk verbatim — 27 assertions pass): the reviewer's counterexample matrices now print
largest failing Δt = 2^-16andCheapest … ImplicitEM at Δt = 2^-17 (5.0 s)with ratio22.5; the all-fixed-step-fail case prints "No failure-free fixed-step run exists …" and no ratio/Inf; an ascending-order grid produces identical verdicts; a ratio-1 scenario prints no order-of-magnitude note. A mock of the latest weave's failure/timing matrices reproduces the rendered verdict below.Round-3 weave of the edited page (
julia +1.11 --threads=16 --project=. benchmark.jl benchmarks/StiffSDE/Oval2Timings.jmd, ~1 h 55 m on this heavily loaded machine, load ~150–300): all 21 chunks weaved,markdown/StiffSDE/Oval2Timings.mdand the figure produced, log ends with "Building Github Markdown" (generatedmarkdown/,script/deleted before committing). All 12 adaptive runs report 0 failures; the computed verdict block read:Each printed line was checked against the per-run tables on the same page: all three explicit methods fail at
2^-16, 2^-17, 2^-18and succeed from2^-19; both implicit methods are failure-free but slower than every failure-free explicit run;RKMil @ 2^-19at 30.6 s was the true minimum across all successful fixed-step rows on that weave;SOSRI (abstol = 2^-13, reltol = 2^-7)at 0.727 s was the fastest adaptive run on that weave. On that weave the per-run lines printed (10, 1, 1) for Euler-Maruyama and RKMil and (8, 4, 2) for SRIW1 — the same per-method counts as the new weave quoted above.e9f2684dcompleted in ~2 h under load ~300.GROUP=Core julia +1.11 --project=. -e 'using Pkg; Pkg.test()'— 172/172 pass (run at a pre-edit head; all changes on this branch touch only benchmark.jmdsources, not tested code).typoson the changed.jmdfiles: clean.git diff --checkclean.Not fixed / not verified
Risk assessment
.jmdpages (StiffSDE/Oval2Timings, StiffSDE/StochasticHeat, NonStiffSDE/BasicSDEWeakWorkPrecision). No package code, no public API, no Manifest changes — the executable changes are post-hoc reporting code that only reads already-computed results (thefails/times/fails_imp/times_imp/adaptive_runstables in Oval2Timings, the solve results and error means in StochasticHeat, and thewp/seobjects in BasicSDEWeakWorkPrecision) plus the concrete-eltype scatter inputs in Oval2Timings's plot chunk. SemVer does not apply.julia +1.12— all exit 0; the printed summary lines are quoted verbatim above; the verdict logic additionally exercised on synthetic counterexample matrices (27 assertions) covering the reviewer's cases plus reversed grid order and the no-baseline path.~/sandbox/agent-jobs/SciMLBenchmarks.jl/reviews/pr-1916/round6/REVIEW.md,round7/REVIEW.md). Codex gpt-6-astra (round 5) also rated it low with high confidence.🤖 Generated with Devin CLI 3000.11.3 (model: swe-2-max)
Devin CLI local session 1e449d1a-c91c-4c3d-bd02-6aae6f54552f (no shareable URL; transcript in
~/.local/share/devin/cli/sessions.dbon this machine), bridged to https://claude.ai/code/session_01Vrsu4PESdABpNaxYiTBVfd — the same bridged session used by the earlier commits on this branch. Round-5 diff drafted by Codex CLI 0.157.1 (model: gpt-6-sol); its rollout is~/sandbox/tmp_20260923_090949_54257/handoff/cx1916.logon this machine. Earlier sections generated with Devin CLI 3000.11.3 (model: swe-2-high, local session "locrian-drip", transcript at~/.local/share/devin/cli/transcripts/locrian-drip.json).