Repository navigation
SimpleHandwrittenPDE: unbreak the reference solves and cap the regressed KenCarp sweeps - #1672
ChrisRackauckas wants to merge 1 commit into
Conversation
…p sweeps This folder last published on 2025-08-29 (SciMLBenchmarksOutput commit for source 747d591). Since the move to GitHub Actions its whole-folder job has been cancelled at the 5-day limit on 2026-06-18, 07-02, 07-07, 07-20 and 08-15, and at 63.3 h on 08-11. Two things are responsible, both introduced by the 2026-05-04 OrdinaryDiffEq v7 migration (fb9a3b6..cbafe70), not by any change to the benchmarks themselves: 1. Four files abort at their reference solve. `AutoVern7(RadauIIA5(...))` throws `type CompositeCache has no field iter` under OrdinaryDiffEqCore v4: `stepsize_controller!` does `if isfirk(alg); (; iter) = integrator.cache`, and under an AutoSwitch wrapper that cache is a CompositeCache. Every later chunk then fails on an undefined `test_sol`, so kdv_fdm, kdv_spectral, nls_fdm and nls_spectral produce no results at all. Switched to `AutoVern7(Rodas5P(...))`, which is not FIRK and so avoids the branch; measured 21-57 s on these problems. 2. KenCarp* with the default (dense) linsolve got ~10-90x slower below abstol 1e-9. On the KS spectral problem (N = 128) one KenCarp4 solve at abstol=1e-10/reltol=1e-7 takes 2.6 s under OrdinaryDiffEq 6.101 + LinearSolve 3.26 (the stack that last published this folder) and 235.0 s under OrdinaryDiffEq 7.0.0 + LinearSolve 3.87, with the same 148/149 accepted steps but nf 15598 -> 149389. KenCarp3 goes 10.6 s -> 89 s the same way. Measured cost of the affected chunks on this branch's parent: ks_fdm KenCarp3 alone 3690 s, burgers_spectral KenCarp3 3457 s, allen_cahn_spectral KenCarp3 3138 s, burgers_fdm dense block 1939 s, ks_spectral KenCarp3 1903 s. The low-tolerance sweeps now stop at abstol 1e-9 / reltol 1e-6, where the regression has not yet kicked in, with the numbers recorded inline so the range can be restored upstream-side. Also restores the two ks_fdm ExpRK/ARKODE `reltols` ranges to the 0.1^(4:8) that last published; #1629 tightened them to 0.1^(7:11) without touching abstols, and those are fixed-dt setups so it only moved the plotted points. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KrTtUuDkfgNEq3asQuZ3F6
Open risk this PR does not fully close: the KdV FDM low-tolerance blockWhile measuring the fixed files I hit one case the trim may not be enough for, and I want it On For comparison, the equivalent Two caveats before anyone treats the 70 minutes as a clean number:
I deliberately did not add an unverified What to watch: if the CI run on this PR shows 🤖 Generated with Claude Code |
|
The remaining On the exact I opened a one-commit stacked fix at #1685. It uses the largest locally verified stable cap per method and keeps tolerance-dependent accepted-step counts:
All nine solves returned The old job at https://github.com/SciML/SciMLBenchmarks.jl/actions/runs/32660495026/job/97254438375 has been in progress since 2026-08-24 00:57 UTC. I am cancelling that run to release the self-hosted runner. After the stacked patch is merged into this branch, a new corrected run should replace it. |
|
Correction: the cancellation attempt returned |
|
The underlying default-linear-solver regression now has a standalone |
…iffEqDifferentiation 3.10 (#1678) * SimpleHandwrittenPDE: relax LinearSolve/AlgebraicMultigrid/Sundials to reach OrdinaryDiffEqDifferentiation 3.10 `benchmarks/SimpleHandwrittenPDE` was stuck on OrdinaryDiffEqDifferentiation 3.4.1, which carries the `get_fresh_jacobian` bug that calls a user-supplied in-place `f.jac` out-of-place and dies with "No matching function wrapper was found!" whenever an implicit solver aborts and `check_error` reaches `log_numerical_instability` -- i.e. routinely, at the tight end of a work-precision diagram. Fixed in 3.9.0, refined in 3.10.0. A plain `Pkg.update()` could not get there. Three `[compat]` bounds in this folder's Project.toml formed the chain: * `LinearSolve = "3"` -- OrdinaryDiffEqDifferentiation >= 3.8.0 requires LinearSolve 5.8.0-5, so the "3" bound alone pins ODEDiff below 3.8. * `AlgebraicMultigrid = "1"` -- AlgebraicMultigrid <= 2.0.0 caps LinearSolve at 3; only 2.0.1 admits LinearSolve 5. Without this the LinearSolve bound could not actually move. * `Sundials = "5"` -- Sundials 5.3.0 caps SciMLBase at 3.39, and every other benchmark folder already sits on "6". Sundials 6.0.0 is a pure Project.toml version bump for SciMLBase v3 / DiffEqBase v7 (zero source changes vs 5.3.0), so the ARKODE common interface used here is untouched. Resulting manifest (Julia 1.10.11, unchanged): OrdinaryDiffEqDifferentiation 3.4.1 -> 3.10.0 OrdinaryDiffEqCore 4.14.1 -> 4.15.0 SciMLBase 3.39.1 -> 3.49.2 Sundials 5.3.0 -> 6.6.0 LinearSolve 3.87.0 -> 5.13.0 AlgebraicMultigrid 1.2.0 -> 2.0.1 DiffEqBase 7.13.1 -> 7.18.2 OrdinaryDiffEq 7.0.0 -> 7.7.0 GenericSchur is held at 0.5.6 in the manifest. 0.5.7 (registered 2026-08-24) pirates `LinearAlgebra.eigen!(::SymTridiagonal)` and forwards `sortby` to a `geigen!` that does not accept it, which breaks the ExponentialUtilities precompile workload -- and therefore OrdinaryDiffEqExponentialRK, which this folder needs for ETDRK3/ETDRK4. Reproduced on both Julia 1.10.11 and 1.11.9; tracked upstream as RalphAS/GenericSchur.jl#24. Manifest-only, so it lifts by itself once 0.5.8 lands. Dependency-only by design: no `.jmd` file is touched, to stay out of the way of the in-flight rewrite in #1672. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KrTtUuDkfgNEq3asQuZ3F6 * SimpleHandwrittenPDE: drop superseded majors from [compat] The Manifest already pins the new versions, so this changes nothing about what resolves today. But leaving the old majors admissible means a future re-resolve could silently fall back to the stack carrying the OrdinaryDiffEqDifferentiation < 3.9.0 get_fresh_jacobian bug, where an in-place Jacobian is evaluated out-of-place and throws 'No matching function wrapper was found!' the first time an implicit solver aborts. Narrowing each bound to the major actually in the Manifest turns that regression into a resolve error instead of a silent revert. Pkg.resolve() under the narrowed bounds leaves every package version in the Manifest unchanged; only project_hash moves. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KrTtUuDkfgNEq3asQuZ3F6 --------- Co-authored-by: Claude Fable 5 <[email protected]>
|
I replayed this PR's runtime commit onto current master ( The environment itself is consistent: The full weave still does not complete: At termination it was inside the low-tolerance The process made 288,120,936 allocations and 547 garbage collections. Earlier notebook chunks completed, including the replacement Rodas5P reference solve, so this is specifically the KenCarp default-linear-solver regression tracked by the reduced MWE at SciML/OrdinaryDiffEq.jl#4378. I also tested SciML/SciMLBase.jl#1520 directly and as a two-line backport onto SciMLBase 3.39.1. It fixes direct |
|
The original KDV tolerance range no longer needs to be capped once SciML/OrdinaryDiffEq.jl#4391 is applied with LinearSolve 5.14.1. I tested current SciMLBenchmarks master plus this PR and restored the original values: abstols = 0.1 .^ (8:12)
reltols = 0.1 .^ (5:9)The low-tolerance IMEX work-precision chunk completed in 113.946 seconds and emitted nonempty five-point curves for all six solvers. The tightest endpoint completed for KenCarp3/4/5 in 39.02s/39.35s/38.82s respectively, with the default Krylov cache receiving The cap currently in this PR also adds a looser point ( |
|
Discriminating before/after evidence for the KenCarp runtime regression:
This PR should remain unmerged in its current cap-based form. I attempted to convert it back to draft, but the authenticated account lacks OrdinaryDiffEq issue: SciML/OrdinaryDiffEq.jl#4378 |
|
Full local validation of the restored, original tolerance ranges is complete on Julia 1.10.11 against the OrdinaryDiffEq fix in SciML/OrdinaryDiffEq.jl#4391 at The before/after result discriminates the upstream fix:
Repository validation on the rebased benchmark branch also passed:
The rebased update is prepared locally in commit |
|
Superseded by the current-master draft at #1785, with the mechanical release-stack prerequisite merged separately at #1784. The authenticated agent account could not push this PR’s SciML-owned head branch. I tested a source-only update against the stale head instead of bypassing that permission boundary, but The replacement is source-only, remains a draft pending @ChrisRackauckas review, and has the full failing-before/passing-after evidence. On the released stack, |
What broke, and when it last worked
benchmarks/SimpleHandwrittenPDElast published on 2025-08-29, from source commit747d591e(all eight.mdfiles inSciMLBenchmarksOutput/markdown/SimpleHandwrittenPDEcarry that build). Summing the
@timelines in that published output, the eight filescost ≈3.2 h of solver time then:
@timetotal, 2025-08-29 buildnls_fdm_wpd.jmdandnls_spectral_wpd.jmdwere added in 2026-03 (11be1dcd,cec58e3c,836a86fe) and have never published — there is nonls_*.mdin the Output repo at all.Since the move to GitHub Actions the whole-folder job has been cancelled at the 5-day limit
on 2026-06-18, 07-02, 07-07, 07-20 and 08-15, and at 63.3 h on 08-11. That predates the
08-13 NordsieckBDF addition (#1646), so #1646 is not the cause.
The cause is the 2026-05-04 OrdinaryDiffEq v7 migration (
fb9a3b66..cbafe70c), whichtook the folder from OrdinaryDiffEq 6.101 / LinearSolve 3.26 to 7.0.0 / 3.87. The
.jmdtolerance settings themselves are unchanged since the last good build in seven of the eight
files — only
ks_fdm_wpd.jmdwas restructured (by #1629, 2026-08-11).Measured root causes
1. Four of the ten files abort at their reference solve.
AutoVern7(RadauIIA5(...))throwstype CompositeCache has no field iterunderOrdinaryDiffEqCore v4. In
OrdinaryDiffEqCore/src/integrators/controllers.jl,stepsize_controller!doesbut under an
AutoSwitchwrapperintegrator.cacheis aCompositeCache, which has noiterfield. It fires as soon as the switch to the FIRK member happens. Every later chunkthen dies on an undefined
test_sol, so the file produces nothing:CompositeCache has no field iter, chunks 4-9UndefVarError: test_solNote this combination worked at the last good build, where the call was
AutoVern7(RadauIIA5(autodiff=false)); the v7 migration rewrote it toautodiff=AutoFiniteDiff()and the OrdinaryDiffEqCore v4 controller broke it.2. KenCarp* with the default (dense) linsolve regressed 10-90x below abstol 1e-9.
Back-to-back on the same machine, same problem (KS spectral, N = 128), one solve:
Accepted steps are identical (148 vs 149 for the KenCarp4 1e-10 case); what explodes is the
work per step —
nf15598 → 149389,nsolve15761 → 149552. At abstol 1e-7 and 1e-8 thetwo stacks are bit-for-bit identical in step and function counts, so the knee sits between
1e-9 and 1e-10.
Per-chunk wall times for the affected blocks, measured on the parent commit (a
chunk-by-chunk driver, one thread per file):
The fix
AutoVern7(RadauIIA5(...))toAutoVern7(Rodas5P(...))in the four broken files. Rodas5P is not FIRK, so it takes the
fac_default_gammapathand never touches the missing field. Measured against the same
dt/tolerances it costs21-57 s on these problems, against 9-41 s for a bare
RadauIIA5— no meaningful changein reference cost, and the same tolerance is reached.
before the regression bites. The measured old-vs-new numbers are recorded inline in each
file so the range can be restored once the upstream regression is fixed.
ks_fdm_wpd.jmd: the two ExpRK/ARKODEreltolsranges are restored to the0.1^(4:8)that last published. Add multirate split ODE work-precision benchmarks #1629 tightened them to
0.1^(7:11)without touchingabstols;those are fixed-
dtsetups, so it only moved where the points land on the plot.No solver, problem size,
numrunsor scientific content is changed.Verification
Measured, end-to-end
SciMLBenchmarks.weave_fileon this branch's files, currentManifest (OrdinaryDiffEq 7.0.0, Julia 1.10):
ks_spectral_wpd.jmd.md+ figures producednls_fdm_wpd.jmd.md+ figures producednls_fdm_wpd.jmdhad produced zero results before this change.Caveat on those numbers: they were measured on a 12-core laptop that was carrying a
load average of 50-180 from unrelated jobs, so they are loose upper bounds. The
old-vs-new solver comparisons above are the reliable signal, because both halves were run
back-to-back under the same contention.
Estimated for the remaining eight files: the pre-fix per-chunk table above accounts for
essentially all the excess, and the trims remove the tolerance points that produced it
(e.g. burgers_fdm's 1939 s block keeps only its 1e-7..1e-9 points, which cost seconds each
in the probe). Scaling the last-good 3.2 h by the two new files and the trimmed ranges puts
the folder at roughly 4-6 h, comfortably inside the 12 h target, with no single file
near the multi-hour mark. This is an estimate, not a measurement — the honest test is the
CI run on this PR.
Follow-ups not done here
3.8x stack, and deserves its own issue with the reproducer above. This PR only routes
around it.
AutoVern7(RadauIIA5(...))is a plain bug in OrdinaryDiffEqCore v4'sstepsize_controller!and should be fixed there rather than avoided in benchmarks.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KrTtUuDkfgNEq3asQuZ3F6