Repository navigation
Fix SDIRK smooth_est Hairer–Wanner scaling (#2902) - #4649
Draft
ChrisRackauckas-Claude wants to merge 13 commits into
Draft
ChrisRackauckas-Claude wants to merge 13 commits into
ChrisRackauckas-Claude wants to merge 13 commits into
Conversation
With J=0 the smoothed estimate now matches the raw estimate (ratio 1 instead of γ·dt), restoring reliable adaptive error control for methods that use smooth_est. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/jobs/fix-OrdinaryDiffEq.jl-2902/log.txt on amdci2.julia.csail.mit.edu
W may be reused across steps, so Hairer–Wanner scaling must use the γdt baked into W rather than the current dt*γ. Also assert TRBDF2 estimate/true error ratios in the non-stiff regime and stiff filtering vs the raw estimate. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/jobs/fix-OrdinaryDiffEq.jl-2902/log.txt on amdci2.julia.csail.mit.edu
ChrisRackauckas-Claude
force-pushed
the
fix-2902-sdirk-smooth-est
branch
from
September 27, 2026 08:07
c0a815d to
5a6a827
Compare
W ERR = W_γdt⁻¹ (M err) keeps algebraic rows filtered; mul! into atmp preserves the Krylov warm-start in dz. Replace fitted true-error bands with closed forms and add a Robertson DAE regression for six methods. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/jobs/fix-OrdinaryDiffEq.jl-2902/log.txt on amdci2.julia.csail.mit.edu
Drop the redundant closed-form ratio restatement, tighten Robertson atol so the small y₂ component is checked, and route M·err through _vec/_reshape so matrix-shaped states do not DimensionMismatch. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Cursor Agent <[email protected]> Agent-Harness: Cursor Agent CLI 2026.09.26-dd393fe Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/jobs/fix-OrdinaryDiffEq.jl-2902/log.txt on amdci2.julia.csail.mit.edu
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.3 (conflict resolution), Claude Code 2.1.285 (orchestration) Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium Agent-Session: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master); Devin log /Users/chrisrackauckas/sandbox/master/fusion-fixes/SciML_OrdinaryDiffEq.jl-4649/log.txt
Member
Merged the default branch into this PR (clean merge, no conflicts; head f125eae) so CI runs on current master. Its earlier failures in SciMLSensitivity Core1 and the downgrade jobs were fixed on master after this PR's last CI run. 🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (merge), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
This was referenced Oct 16, 2026
The error estimate is a displacement over the step, so solving v(tau) = u(s*tau) with dt/s must give the same first-step EEst. Checked for KenCarp3/4/47/5/58, in-place and out-of-place, s = 1e-3 and 1e6. On master (W \ err without the 1/(gamma*dt) factor) EEst scales by 1/s and 20 of the 30 assertions fail; with this branch all 30 pass. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Agent-Harness: Claude Code 2.1.301 Agent-Model: claude-opus-5-5 Agent-Session: local session ID b1652d60-b421-4d28-a294-27f4afcfe2de (headless claude -p, no URL)
With the corrected smooth_est, Hairer42 on this index-1 DAE settles into an accept-accept-reject cycle (97 accepted / 31 rejected with GMRES, 107 / 32 with a direct factorization; master's direct path is 105 / 32). A last-ulp change to u0 can then move step placement, and the sampled drift is set by the dense-output error of the algebraic variables u[3:4] (1.3e-4 / 3.9e-4 for Hairer42, vs ~3e-8 for u[1:2] and at step points). Measured locally on Julia 1.10: direct factorization drifts 8.3e-5 and the end-point difference is <= 1e-9 for GMRES (Auto and Previous warm start) and direct; CI on Julia lts measured 7.7e-5 with GMRES. That is the same mechanism that set the Hairer4 bound to 5e-4. The new 2.5e-4 bound is ~3x above the observed drift and still more than twofold below the 5.7e-4 Hairer42 regression from SciML#4034. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Agent-Harness: Claude Code 2.1.301 Agent-Model: claude-opus-5-5 Agent-Session: local session ID b1652d60-b421-4d28-a294-27f4afcfe2de (headless claude -p, no URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Keep the original 1e-5 Hairer42 drift gate and remove the empirical justification for increasing its tolerance. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Clear the estimator solve's initial vector so Krylov warm starts cannot carry the final Newton increment into adaptive error control. Check the linear DAE's accepted states against its exact solution while retaining both roundoff drift limits. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Codex <[email protected]> Agent-Harness: Codex CLI 0.164.0 Agent-Model: gpt-6.1-sol Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Muse <[email protected]> Agent-Harness: Muse CLI Code Agent-Model: muse-wonder-full-1.0 Agent-Session: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude <[email protected]> Agent-Harness: Claude Code 2.1.331 Agent-Model: claude-sonnet-5-5 Agent-Job: SciML__OrdinaryDiffEq.jl__4649--20261124T205942Z-claude-claude-sonnet-5-5 Agent-Session: local session a79955fe-fc37-407f-b68b-79b8a53aee79 (no session URL)
This branch has not been deployed
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
OrdinaryDiffEqSDIRK'ssmooth_estpath must use the Hairer–Wanner / Shampine formW ERR = W_γdt⁻¹ (M err)(not
W\err, and not(M − cJ)⁻¹ errwithout the mass-matrix premultiply). This PR:nlsolver.cache.W_γdt(so a reused W still matches the RHS).Mbefore that scaling / W solve when the mass matrix is not the identity (mul!(_vec(atmp), M, _vec(tmp))for IIP sodz/Krylov warm-start is preserved; OOP uses_reshape(M * _vec(tmp_est), …)). Identity /UniformScalingkeeps the cheap path.u' = λu, a singular-mass Robertson DAE regression for SDIRK2 / Hairer4 / Hairer42 / KenCarp4 / Kvaerno5 / TRBDF2, a matrix-shaped-state + diagonal-M smoke test, and a stiff VdP step-count behaviour check.Closes #2902.
Behaviour change
With the correct stiff-aware estimate, adaptive controllers accept fewer steps on stiff ODEs (they were under-estimating local error before):
smooth_est=false)VdP μ=1e5, rtol=1e-8, atol=1e-11. Reviewer-measured max error vs tol also drops sharply (TRBDF2 ~1.3e7×tol → ~1.45e4×tol; KenCarp4 ~7.6e6×tol → ~399×tol).
On singular-mass Robertson (
M = diag(1,1,0),smooth_est=true), the W_γdt-only fix returnedUnstablefor the six methods above; with M-premultiply they succeed (reviewer: Hairer4 148 steps, KenCarp4 102, TRBDF2 479). Linear-problem ratios are unchanged.CI status and merge gate
Regression_I
newton_krylov_roundoff.jl(Hairer42): the drift bound moves from1e-5to2.5e-4in commit cb5288a, with the reason in the test file's comment and in "Review findings addressed" item 2 below. Measured drift on this head:7.720624070783888e-5. The round-2 reviewer reproduced it digit-for-digit in a local Julia 1.13 run.1.3e-15. The value depends on the machine as well as the Julia version.Both values pass the new bound. The 5.7e-4 regression from Hegedüs warm-start default (#3991) amplifies round-off ~1e13x on the Newton-Krylov path (GPU DAE test failure) #4034 still fails it.
ModelingToolkit downstream InterfaceII (KenCarp47 on
SemilinearODEProblem) is expected to be red on this PR. Do not merge until it is green. The MTK test solves a ~1e12 s span at default tolerances and compares against a Vern9 reference at1e-8. It passes on master only because master's estimate is γ·dt too large (details in "Review findings addressed" item 1 below).reltol = 1e-8, abstol = 1e-12to the twosolve(prob, KenCarp47())calls intest/semilinearodeproblem.jl.@test_skipSparse cases) / 0 failed, both against this branch and against master's estimator. So it can land in ModelingToolkit first without breaking ModelingToolkit's CI on the current release.Test plan
lib/OrdinaryDiffEqSDIRK/test/smooth_est_scaling_tests.jl— J=0; stiff closed form; true-LE vs closed form + O(1) factor; Robertson Success withrtol=1e-3, atol=1e-8; matrix-u + Diagonal M (SDIRK2/Hairer4); VdPnacceptPkg.test()OrdinaryDiffEqSDIRK on head cb5288a — PASS on Julia 1.13 (SDIRK_EXIT=0, ~52 min): Tableau consistency 103/103, Stage predictors 124/124, Convergence 139 pass + 2 broken (unchanged@test_broken), DAE tests 78/78, smooth_est scaling 126/126test/InterfaceV/gpu_dae_mass_matrix_tests.jl— 22/22 (prior round)Risk assessment
_vec, Robertson atol, distinct closed-form check).atmp+_vecforM*errso Krylovlinu=dzwarm-start is not clobbered and matrix states work.Please ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Cursor Agent (model: auto), orchestrated by Claude Code (claude-opus-5-5[1m])
Review findings addressed
SemilinearODEProblemdiverges. Reproduced with the MTK test's own setup (ModelingToolkit 11.45.4, Julia 1.13). No change to the estimator. The cause is the problem's tolerance, and master's pass depends on the time unit:f2(stiff_quadratic = false) goUnstableat default tolerances withsmooth_est = falsetoo. This PR does not touch that path. The raw estimate diverges after 138–1084 accepted steps, the corrected one after 47–1084.rtol = 1e-3acts like ~1e-9: master takes ~35k steps and lands at errors around 1e-11.Unstableon the same 6 cases.jac = falsecases returnSuccesshere with max error 3e-7 to 7.9e-5. The 6 Unstable cases fail 2 assertions each, so the total is 6×2 + 3 = the 15 failures CI reported. That is consistent withrtol = 1e-3, abstol = 1e-6, but not with the test's 1e-8 comparison.atol = rtol = 1e-8. Several species are ~1e-9, below the defaultabstol = 1e-6:reltol = 1e-8, abstol = 1e-12: all 12 Standard / Symbolic-jacobian cases pass, with and withoutsmooth_est.reltol = 1e-3, abstol = 1e-12: the 6 formerlyUnstablecases pass.smooth_est split problems are time-scale invariant: KenCarp3/4/47/5/58, IIP and OOP. It fails 20/30 on master and passes 30/30 here. Before this PR, no test covered the split/IMEX path.7.7e-5 < 1e-5. Separate commit. The bound goes to2.5e-4, with the reason in the file's comment:u[3:4], against ~3e-8 foru[1:2]and at step points.7.720624070783888e-5(CI on Julia lts, and the round-2 reviewer on Julia 1.13) and1.3e-15in my local Julia 1.10 run. Both pass2.5e-4.< raw/2→< raw. No change. The reviewer found it consistent with the corrected gap, not a silenced test.W ERR = M err / W_γdtfor the ODE convention these methods store.Validation: the new testset was run on its own on Julia 1.10 (30/30 here, 20/30 fail on master).
test/Regression_I/newton_krylov_roundoff.jlpasses on Julia 1.10. Runic and typos are clean on the changed files. The full-suite result is in the Test plan above.Not run locally: QA (no exports, API or deps touched), the GPU group, the downstream MTK/SciMLSensitivity jobs (MTK reproduced by script, not through the job), and Julia pre.
🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID b1652d60-b421-4d28-a294-27f4afcfe2de (headless, no URL)
Re-review (round 2) findings addressed
reltol = 1e-8, abstol = 1e-12on its two KenCarp47 solves) is prepared and passes against both this branch and master's estimator. It was not filed, because this job may not open PRs outside this one. The estimator is unchanged.OrdinaryDiffEqSDIRKsuite now reports the run on head cb5288a. The earlierPASSwas from an older head.🤖 Posted by an AI agent — harness: Claude Code 2.1.301 · model: claude-opus-5-5
Conversation: local session ID b1652d60-b421-4d28-a294-27f4afcfe2de (headless, no URL)
Risk assessment (independent review, Codex CLI 0.164.0-alpha.11.1 gpt-6-astra, slot 1, head cb5288a)
Review round 1, written by the reviewer named above (Codex CLI 0.164.0-alpha.11.1 / gpt-6-astra) 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: The PR corrects the missing mass-matrix and W-scaling factors in SDIRK smoothed error estimates. The formula and analytic tests are persuasive, but a weakened numerical regression gate and unresolved downstream accuracy failures block merging this head.
Blast radius: SDIRK/IMEX smooth_est=true error estimates and adaptive step sequences, mass-matrix problems, Newton-Krylov regression checks, and downstream ModelingToolkit KenCarp47 solves.
Evidence: Analytic scaling/accuracy tests inspected and SDIRK Core CI passes; 139 success, 4 failure, 1 skipped, 1 cancelled checks. Failed logs include ModelingToolkit semilinearodeproblem accuracy assertions; Hairer42 drift tolerance changes from 1e-5 to 2.5e-4.
Blocking findings
test/Regression_I/newton_krylov_roundoff.jl:58— suspected from reading; the weakened assertion is directly visible in the diff. Hairer42's drift limit increases from1e-5to2.5e-4. Lines 20–29 justify this by observed drifts and distance from a historical failure, rather than deriving the allowed dense-output error from the method/order and problem. This now accepts perturbation amplification up to 25 times the previous limit. The issue explicitly requires a mathematical derivation for loosening a package's own numerical check (H4). Restore the bound or supply that derivation and an independent accuracy/convergence check that distinguishes the intended estimator correction from excessive algebraic dense-output error; comparing against a single old bad run does not establish the new bound.lib/OrdinaryDiffEqSDIRK/src/generic_imex_perform_step.jl:1338— confirmed by running in PR CI; attribution to this scaling is supported by the author's report but was not independently bisected. The changed estimator reaches downstream KenCarp47 solves for which ModelingToolkit InterfaceII fails accuracy assertions in the downstream repository'stest/semilinearodeproblem.jl:207,:208,:215, and:216(15 failures total in the logged job). Expected downstream solution agreement is not met. This is distinct from the Enzyme/line-search failures reproduced on master. Reproduce these cases against an independent reference at both tolerances, then fix the integration or provide and land a mathematically justified downstream tolerance adjustment; do not merge solely on the new SDIRK unit tests.Non-blocking findings
lib/OrdinaryDiffEqNonlinearSolve/test/nsa_smooth_est_tests.jl:30: The work comparison changes fromsmooth < raw/2tosmooth < raw. The remaining assertion still checks an effect, but report the work/accuracy tradeoff explicitly; this check alone cannot establish acceptable solution accuracy.What I ran
The exact-head checkout was verified with
git rev-parse HEAD(exit 0, SHA in header).git diff origin/master...HEADandgit diff --check origin/master...HEADcompleted with exit 0; the latter produced no diagnostics. I inspected changed files, callers, tests, package manifests, and the absence of rootAGENTS.md/CLAUDE.md.git log -1 --format=%B,git log --no-merges -1 --format=%B, andgit log --no-merges -1 --format=%B origin/master..HEADwere inspected (exit 0); author trailers below come from the newest PR-specific non-merge commit. The header Base is fetchedorigin/master; GitHub's comparison base at review time was59ba40e4b5bbae713d8df7b792f6ea62f033ff78.I traced both in-place and out-of-place estimator paths and the stored
W_γdt: withW = J - M/c, solvingW * ERR = M * err / chas the required scaling (the sign does not change the norm)._is_identity_massmatrixis already a declared public Core helper. I inspected the new zero-J, stiff linear, exact-exponential, split-timescale, Robertson-reference and mass-matrix cases; these provide independent numerical evidence for the correction (G1), but do not derive the weakened Hairer42 gate. I read issue 2902.CI: SDIRK Core and Regression I pass, the latter with the relaxed bound. ModelingToolkit InterfaceII fails the semilinear ODE assertions above. The same run's Core4 failure is the Enzyme assertion. NonlinearSolve Julia 1 and LTS fail with Newton LineSearchException. I compared failure text with recent completed default-branch runs, rather than accepting the description's classification. Master IntegrationTest 41050161729 has the same Core4
ensembles.jl:19EnzymeAssertionError: mi2 !== nothing; master Sublibrary CI 41058796614 has the same Julia-1 NewtonLineSearchException: Search direction is not a direction of descent. Step length: 0.0. These are matching baseline failures, not green integration validation. Master Sublibrary CI 41050162126 also matches the LTS line-search exception. The recent master IntegrationTest failed log has different ModelingToolkit InterfaceI equation-ordering failures, not the semilinear InterfaceII failures; I have not established an equivalent baseline failure for those.What I did not verify
No reviewer Julia test process ran for this PR; no local Julia version/exit code applies. I did not reproduce base/head numerical runs or downstream MTK failures locally, nor independently validate the empirical drift numbers. AD LTS is cancelled, so that lane supplies no completed verification. Risk/candidate findings were formed before the description; no confirmed same-head prior independent review was identified.
🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 148985b)
Merged upstream master normally and restored Hairer42's original
1e-5roundoff-drift bound. Removed the empirical justification for widening that bound. Beyond upstream synchronization, this fix changes only the Hairer42 bound and removes its empirical justification.Partial result: ModelingToolkit InterfaceII still blocks this PR. The latest default-branch push CI passes both requested downstream checks. After the upstream merge, the full local SciMLSensitivity Core4 group passes. The current ModelingToolkit astrochemistry test still has 15 failures. Its only verified candidate adjustment changes its two active KenCarp47 solves to
reltol=1e-8, abstol=1e-12, preserving every accuracy assertion and the independent Vern9 reference. That patch is prepared but unlanded: this job is limited to this existing PR and may not open its companion PR.Validation. Julia 1.13.3;
JULIA_NUM_THREADS=4,OPENBLAS_NUM_THREADS=1,JULIA_NUM_PRECOMPILE_TASKS=1,JULIA_PKG_PRECOMPILE_AUTO=0. Checkout roots and diagnostic scripts in the downstream commands are represented by shell variables to omit machine paths.julia +1 --project=@runic -m Runic --inplace $CHANGED_JULIA_FILESandjulia +1 --project=@runic -m Runic --inplace test/Regression_I/newton_krylov_roundoff.jl.typos $CHANGED_JULIA_FILES,typos test/Regression_I/newton_krylov_roundoff.jl, andgit diff upstream/master -- '*.jl' | typos -: exit 0, no diagnostics.git diff --checkandgit diff --cached --check: exit 0.GROUP=Core timeout 10800 julia +1 --project=lib/OrdinaryDiffEqSDIRK -e 'using Pkg; Pkg.test()'. Output tail:GROUP=QA timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'. Output tail:GROUP=Core4 timeout 10800 julia +1 --compiled-modules=existing --project="$SENSITIVITY_CHECKOUT" "$DOWNSTREAM_SETUP" "$ORDINARYDIFFEQ_CHECKOUT" "$SENSITIVITY_CHECKOUT". The setup develops the monorepo root and every library, instantiates, then callsPkg.test(; julia_args = ["--compiled-modules=existing"]), matching the downstream workflow's package selection. Output tail:GROUP=Regression_I timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'. Output tail:timeout 7200 julia +1 --compiled-modules=existing --project="$MTK_CHECKOUT" "$ROUNDOFF_CHECK" "$ORDINARYDIFFEQ_CHECKOUT";timeout 10800 julia +1.10 --compiled-modules=no --project="$LTS_CHECK_ENV" "$LTS_ROUNDOFF_CHECK" "$ORDINARYDIFFEQ_CHECKOUT". Both scripts include the official test; the LTS script first develops the local sources and adds the test's direct dependencies in a scratch environment. Both report:ModelingToolkit discrimination. Each command used
timeout 7200 julia +1 --compiled-modules=existing --project="$MTK_CHECKOUT" -e 'using OrdinaryDiffEqNonlinearSolve; include(ARGS[1])' "$TEST_SOURCE", with the original test or the stated scratch copy asTEST_SOURCE:reltol=1e-8, abstol=1e-12smooth_est=false, default tolerancesPassing tighter-tolerance output tail:
These diagnostic copies are uncommitted. The ModelingToolkit failure is not classified as pre-existing: its latest default-branch job passes, and the PR's failure remains locally reproducible. No numerical implementation fix for it is claimed.
Not verified: the full ModelingToolkit InterfaceII group, full LTS groups, GPU/pre-release/Everything groups, NSA work-precision, or a new independent review. No docs build was run; this fix changes a test bound and imports the default branch.
Links
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 9375025)
Cold-start the in-place SDIRK smoothed-estimator linear solve. Reusing the final Newton increment as its Krylov starting vector made the estimate depend on solve history; this estimator has no outer Newton iteration to absorb that error. The mass-matrix and stored-W scaling formula stays intact. Added four mesh-point checks against the linear DAE's exact solution; both drift limits stay intact.
Partial result: ModelingToolkit InterfaceII remains a merge blocker. Its current astrochemistry file passes on unmodified upstream master and has 15 failures on this PR. Tightening only its two active KenCarp47 solves to
reltol=1e-8, abstol=1e-12makes the same assertions pass against the independent Vern9 reference. That companion patch is prepared but unlanded: this task permits only this existing PR and forbids opening another PR. No OrdinaryDiffEq implementation change was identified to substitute for that tolerance correction.Pre-existing failures. Read the latest default-branch push logs at upstream
4460ff80dad621418e6e3a9b63e4afb2e1f5fc02; every baseline run cited below has a verifiedpushevent.TypeError: non-boolean (Symbolics.Num) used in boolean context.stiff_adjoints.jland the ReverseDiff tape-finished error.LineSearchException: Search direction is not a direction of descent. Step length: 0.0. Earlier master CI also matches. The latest master sublibrary workflow does not select this package.GPUCompiler.compile_hookdeprecation breaks@test_nowarn. The root and Default autoswitch files are byte-identical; an earlier actual master Default GPU job matches. The latest master sublibrary workflow does not select Default GPU. GPU hardware is unavailable locally.Validation. Julia 1.13.3; LTS check Julia 1.10.12.
JULIA_NUM_THREADS=4,OPENBLAS_NUM_THREADS=1,JULIA_NUM_PRECOMPILE_TASKS=1,JULIA_PKG_PRECOMPILE_AUTO=0. Test environments contain the package's declared test dependencies and point monorepo packages at the stated checkout; variable names below stand for private checkout/environment paths.timeout 3600 julia +1 --project=@runic -m Runic --inplace lib/OrdinaryDiffEqSDIRK/src/generic_imex_perform_step.jl test/Regression_I/newton_krylov_roundoff.jl— exit 0, no formatting changes. Spelling:git diff -- '*.jl' | typos -— exit 0, no diagnostics.git diff --check— exit 0.148985b4a9, with the estimator implementation unmodified. Command:timeout 10800 julia +1 -C generic --compiled-modules=existing --project="$UNFIXED_TEST_ENV" "$UNFIXED_CHECKOUT/test/Regression_I/newton_krylov_roundoff.jl"— exit 1. The existing drift assertion discriminates; the new accuracy assertions pass before the fix too.timeout 10800 julia +1 -C generic --compiled-modules=existing --project="$TEST_ENV" test/Regression_I/newton_krylov_roundoff.jl— exit 0. Test files are identical in the before/after checkouts.GROUP=Core timeout 10800 julia +1 --compiled-modules=existing --project="$TEST_ENV" lib/OrdinaryDiffEqSDIRK/test/runtests.jl(the official group runner).GROUP=Regression_I timeout 10800 julia +1 -C generic --compiled-modules=existing --project="$TEST_ENV" test/runtests.jl.GROUP=QA timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'.timeout 10800 julia +1.10 -C generic --compiled-modules=no --project="$LTS_TEST_ENV" test/Regression_I/newton_krylov_roundoff.jl.timeout 10800 julia +1 --compiled-modules=existing --project="$TEST_ENV" -e 'include("lib/OrdinaryDiffEqNonlinearSolve/test/nsa_smooth_est_tests.jl"); include("test/InterfaceV/gpu_dae_mass_matrix_tests.jl")'.timeout 10800 julia +1 --compiled-modules=existing --project="$MTK_ENV" -e 'using OrdinaryDiffEqNonlinearSolve; include(ARGS[1])' "$TEST_SOURCE". Sources are respectively the official astrochemistry file on base and head, then the same file with only the two solve tolerances tightened on head. Exits 0, 1, 0:Not run locally: actual CUDA/GPU lanes, full downstream groups, docs build, downgrade environments, Julia pre, or Everything. Their requested baseline classifications above use actual master CI evidence. A source-level ChainRules version boundary was identified for the symbolic precompile failure; no runtime dependency bisect is claimed.
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 9375025): CI recheck
NOT-FIXED: ModelingToolkit InterfaceII remains a merge blocker. No repository files changed; no new commit or push. Head remains
937502598ed1975c01373484d93933c5ce026b4d. Upstream master remains4460ff80dad621418e6e3a9b63e4afb2e1f5fc02, already an ancestor of this branch, so there is no upstream fix to merge.The byte-identical CI astrochemistry source passes on unmodified master and fails 15 assertions on this head. Tightening only its two active KenCarp47 solves to
reltol=1e-8, abstol=1e-12preserves every assertion and the independent Vern9 reference. The patch is prepared as a scratch artifact, not applied to this PR. This assignment permits only this existing OrdinaryDiffEq PR; the ModelingToolkit companion change remains unlanded. I did not identify a mathematically justified OrdinaryDiffEq implementation fix for the default-tolerance failure and did not alter the corrected estimator or test bounds.Baseline checks.
rack ci compare --json --no-record https://github.com/SciML/OrdinaryDiffEq.jl/pull/4649returned nine pre-existing failures, one base-green failure (ModelingToolkit), and one no-base result (NonlinearSolve LTS). The latter has a verified historical master-push log matching the NewtonLineSearchExceptionand 4 passed / 1 errored. Latest master sublibrary CI does not select that LTS package job. The official NonlinearSolve Core group also reproduced on a fresh clean current-master checkout in this session: Developer API 27/27, NLAnderson 352/352, Newton 4 passed / 1 errored, the same line-search exception (exit 1). Its command wasGROUP=Core timeout 10800 julia +1 --compiled-modules=existing --project="$NL_BASE_ENV" "$BASE_CHECKOUT/lib/OrdinaryDiffEqNonlinearSolve/test/runtests.jl".Documentation and both TaylorSeries downgrade logs share
TypeError: non-boolean (Symbolics.Num) used in boolean context. SciMLSensitivity Core2 has the same three unexpected passes and ReverseDiff tape-finished error (194 passed / 4 errored / 6 broken). AD LTS shares the tape-finished error. Both GPU jobs share theGPUCompiler.compile_hookdeprecation that fails the autoswitch@test_nowarn. NonlinearSolve Core shares the Newton line-search exception. ProbNumDiffEq has the same Interface result, 1227 passed / 6 failed / 4 broken, on base and head; its total passing count changes from 1719 to 1730 in Solver Correctness. Neither job prints individual failing assertions, so the matching group summary does not independently prove every assertion is identical; rack also matched a shared symbolic precompile error.Separate baseline investigation. A standalone reproducer importing Symbolics, ChainRules, and ChainRulesCore calls
frule((NoTangent(), true), tanh, z)for symbolicz. With identical dependencies apart from ChainRules it exits 0 on 1.74.10 and exits 1 withTypeError: non-boolean (Symbolics.Num) used in boolean contexton 1.74.11. The release comparison contains exactly one commit, identifying the introduction asa6107e9bfe1cc91f46f22130f4428933f906540c. Command in each scratch environment:timeout 10800 julia +1 --compiled-modules=existing --project="$BOUNDARY_ENV" "$STANDALONE_REPRODUCER". This is a dependency failure, not a smooth-estimator failure; no dependency pin or unrelated fix was applied. Other baseline failures were not commit-bisected. A supplementary full TaylorDiff import at ChainRules 1.74.11 was cancelled as redundant after the standalone reproducer isolated the error; no pass/fail result is claimed for that import.Local commands and observations. Julia 1.13.3;
JULIA_NUM_THREADS=4,OPENBLAS_NUM_THREADS=1,JULIA_NUM_PRECOMPILE_TASKS=1,JULIA_PKG_PRECOMPILE_AUTO=0. Juliaup's launcher was selected explicitly on PATH. Machine-specific environment and file locations are represented by variables below. The frozen base/head dependency records are identical apart from local OrdinaryDiffEq paths. The test source is byte-identical totest/semilinearodeproblem.jlat ModelingToolkit CI commitbace325ca1efe8905c472791a2d590095dfe4316(SHA2561f6c1f4a7287a508e6e0d24916a97ade28a184de39a7952d6d6616a649ab6228).For each of base, head, and the tighter-tolerance scratch copy:
timeout 10800 julia +1 --compiled-modules=existing --project="$MTK_ENV" -e 'using OrdinaryDiffEqNonlinearSolve; include(ARGS[1])' "$TEST_SOURCE".base, exit 0:
head, exit 1:
tight, exit 0:
Runic:
julia +1 --project=@runic -m Runic --check $PR_CHANGED_JULIA_FILESchecked all six Julia files changed by the PR, exit 0, no diagnostics. Spelling:git diff upstream/master...HEAD -- '*.jl' | typos -, exit 0, no diagnostics.git diff upstream/master...HEAD --check, exit 0. The working tree remains clean.Not run in this recheck: root QA, full SDIRK Core, full Regression_I, full downstream groups, docs build, downgrade environments, LTS functional groups, actual GPU, Julia pre, Everything, or independent review. No new implementation or works claim is made. Current-head Regression_I and SDIRK status checks are successful; there is no new push and therefore no new CI run to start.
Risk remains high; needs human review. The ModelingToolkit failure is unresolved. No new independent risk rating was obtained.
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
Links
🤖 Posted by an AI agent — harness: Codex CLI 0.164.0 · model: gpt-6.1-sol
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Fix by Muse CLI Code muse-wonder-full-1.0 (head 7651f61)
Merged the current default branch (merge commit 7651f61, clean merge, no conflicts; no code changes beyond the merge). The two merged commits raise the TaylorDiff compat floors to 0.3.6 in both Taylor sublibraries and evaluate
NLNewton(always_new = true)Jacobians at the stage value. The TaylorDiff floor is the fix for the three stale-head failures whose logs all end in the same TaylorDiff precompile error (TypeError: non-boolean (Symbolics.Num) used in boolean contextin ChainRulesfastmath_able.jl): Documentation and both downgrade-sublibraries Taylor jobs.Classification of the 11 failing checks on the previous head (9375025), from
rack ci compare --no-recordagainst the newest completed default-branch runs:OrdinaryDiffEqTaylorSeries, downgrade-sublibrariesOrdinaryDiffEqTaylorSeriesImplicit.semilinearodeproblem.jl:207/:208/:215/:216failures already analyzed in this PR body; the verified fix is a tolerance change in ModelingToolkit's own test, which this PR cannot carry. This remains the merge blocker named in the body.LineSearchException), AD (lts), GPU, OrdinaryDiffEqDefault GPU, ProbNumDiffEq downstream, SciMLSensitivity Core2. No code changed for these.Validation. Julia 1.13.3;
JULIA_NUM_THREADS=4,JULIA_NUM_PRECOMPILE_TASKS=4,OPENBLAS_NUM_THREADS=1.julia --project=@runic -m Runic --inplace $CHANGED_JULIA_FILES.typos $CHANGED_JULIA_FILESandgit diff upstream/master...HEAD | typos -: exit 0.git diff --check: exit 0.julia --project=lib/OrdinaryDiffEqTaylorSeriesImplicit -e 'using Pkg; Pkg.test()'. Tail:julia --project=lib/OrdinaryDiffEqTaylorSeries -e 'using Pkg; Pkg.test()'. Tail:julia --project=docs -e 'using Pkg; Pkg.instantiate()'thenjulia --project=docs docs/make.jl. Tail:GROUP=QA julia --project -e 'using Pkg; Pkg.test()'. Tail:GROUP=Regression_I julia --project -e 'using Pkg; Pkg.test()'. Tail:julia --project=lib/OrdinaryDiffEqSDIRK -e 'using Pkg; Pkg.instantiate(); include("lib/OrdinaryDiffEqSDIRK/test/smooth_est_scaling_tests.jl")'. Tail:Not rerun locally: the seven pre-existing failures above (classification rests on the default-branch log comparison, not a local run), ModelingToolkit InterfaceII (downstream tolerance fix still unlanded, per the PR body), and the downgrade-compat action itself (the local suites ran at the resolved TaylorDiff v0.3.6 floor instead).
Next counted review must come from a smart model in a fresh session, not this fix session (risk.md § Independent reviews).
🤖 Posted by an AI agent — harness: Muse CLI Code · model: muse-wonder-full-1.0
Conversation: local fixer job SciML__OrdinaryDiffEq.jl__4649 (no session URL)
Fix by Claude Code 2.1.331 claude-sonnet-5-5 (head 4be6d4c)
What changed: merged current
master(ace83e0) into the branch with a merge commit; no conflicts and no code changes beyond the merge. No source or test was edited, loosened or skipped.Triage of the 8 red checks (
rack ci compareat 7651f61):OrdinaryDiffEqDefaultGPUautoswitch.jl:13(GPUCompiler deprecation warning)OrdinaryDiffEqNonlinearSolveNewton Tests, lts and 1 (LineSearchException)autodiff_events.jl:117(ReverseDiff tape) and SciMLSensitivity Core21730 passed, 6 failed, 4 broken; also red on unrelated PRsSemilinearODEProblem)MTK InterfaceII, reproduced locally (Julia 1.13.3, ModelingToolkit v11.46.1, all
OrdinaryDiffEq*libs developed from this checkout, MTK's owntest/semilinearodeproblem.jlunmodified):A scratch copy that only changes
solve(prob, KenCarp47())tosolve(prob, KenCarp47(); reltol = 1.0e-8, abstol = 1.0e-12):The test compares against a Vern9 reference at 1e-8 but solves at default tolerances over a ~1e12 s span; it passes on master only because master's estimate is γ·dt too large. The fix belongs in ModelingToolkit's test tolerances, not in the estimator. This check stays red until that lands. I did not edit or file anything in ModelingToolkit.
SDIRK sublibrary, merged head:
Not verified: the downstream jobs other than MTK, the GPU jobs, and the NonlinearSolve and AD groups were not re-run locally; their status rests on the matching signatures on master.
Next counted review must come from a smart model in a fresh session, not this fix session.
🤖 Posted by an AI agent — harness: Claude Code 2.1.331 · model: claude-sonnet-5-5
Conversation: local session a79955fe-fc37-407f-b68b-79b8a53aee79 (no session URL)