Skip to content

SimpleHandwrittenPDE: unblock the dependency stack to reach OrdinaryDiffEqDifferentiation 3.10 - #1678

Merged
ChrisRackauckas merged 2 commits into
masterfrom
deps/simplehandwrittenpde-unblock
Aug 26, 2026
Merged

ChrisRackauckas merged 2 commits into
masterfrom
deps/simplehandwrittenpde-unblock

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

What this does

Dependency-only refresh of benchmarks/SimpleHandwrittenPDE so it can reach
OrdinaryDiffEqDifferentiation >= 3.9.0. Only Project.toml and Manifest.toml change;
no .jmd file is touched.

OrdinaryDiffEqDifferentiation < 3.9.0 carries a real bug: get_fresh_jacobian evaluates a
user-supplied in-place Jacobian out-of-place as f.jac(u, p, t), hitting a
FunctionWrappersWrapper that only carries the in-place signature and throwing
ERROR: No matching function wrapper was found!. It fires whenever an implicit solver aborts
and check_error calls log_numerical_instability (which verbose cannot suppress) — which
is exactly what a work-precision diagram does at its tight end. Fixed in 3.9.0, refined in 3.10.0.

What was actually capping it

A full Pkg.update() on master leaves this folder at ODEDiff 3.4.1 / SciMLBase 3.39.1.
Pkg.status(; outdated=true, mode=PKGMODE_MANIFEST) shows four [compat]-capped entries;
three of them form the blocking chain, and all three had to move together:

bound why it blocks
LinearSolve = "3" OrdinaryDiffEqDifferentiation >= 3.8.0 requires LinearSolve = 5.8.0-5. This bound alone pins ODEDiff below 3.8, in this folder and in the five siblings that share it.
AlgebraicMultigrid = "1" AlgebraicMultigrid <= 2.0.0 declares LinearSolve = 2-3; only 2.0.1 admits LinearSolve 5. Without relaxing this, relaxing the LinearSolve bound does nothing. This folder is one of only three with an AMG dep, so this step is specific to it.
Sundials = "5" Sundials 5.3.0 declares SciMLBase = 3.35.0-3.39. This folder is the only one still on "5" — every other benchmark folder is already on "6".

The fourth, OrdinaryDiffEqMultirate = "2.7" (v3.0.0 available), is left alone: it blocks
nothing in the chain and moving it is an independent decision.

Changed:

-AlgebraicMultigrid = "1"
+AlgebraicMultigrid = "1, 2"
-LinearSolve = "3"
+LinearSolve = "3, 4, 5"
-Sundials = "5"
+Sundials = "6"

API-breakage audit across the three major crossings

Sundials 5 → 6 — no break. v5.3.0...v6.0.0 is a one-line diff: Project.toml only,
a major bump taken purely for SciMLBase v3 / DiffEqBase v7 compat. Zero source changes, so
the whole common interface is untouched. The only later behaviour change is 6.6.0 narrowing
the SciMLBase re-exports from ~420 names to an explicit list; the .jmd files here get their
SciMLBase names from using OrdinaryDiffEq, not through Sundials.

All ten .jmd files use Sundials, exclusively as
ARKODE(Sundials.Implicit(), order=…, linear_solver=:GMRES|:Band|:Dense, jac_upper=…, jac_lower=…)
plus CVODE_BDF(). Every one of those constructor forms was built and run under 6.6.0
(see verification below). IDA, CVODE_Adams, KINSOL, prec=, psetup=, prec_side=
do not appear anywhere in the folder.

AlgebraicMultigrid 1 → 2 — no break for this usage. 2.0.0's breaking changes are (a) custom
smoothers must now dispatch setup_smoother/smooth! and (b) the coarse solver moved from Pinv
to SPQR. The folder only uses built-ins — ruge_stuben, aspreconditioner, and
AlgebraicMultigrid.Jacobi(rand(n)) as pre/post-smoother, in allen_cahn_fdm_wpd.jmd and
burgers_fdm_wpd.jmd. All three were constructed and applied via ldiv! under 2.0.1.
(b) can shift the preconditioner slightly on non-SPD matrices, so AMG-preconditioned curves may
move a little; that is a numerical-result change, not a breakage.

LinearSolve 3 → 5 — one break found, and it is pre-existing. allen_cahn_fdm_wpd.jmd and
burgers_fdm_wpd.jmd pass 9-argument preconditioner builders
((W, du, u, p, t, newW, Plprev, Prprev, solverdata)) as KrylovJL_GMRES(; precs = …).
LinearSolve calls precs(A, p) — 2 arguments. The 9-argument form is
OrdinaryDiffEq's algorithm-level precs kwarg (OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl),
not LinearSolve's, so KrylovJL_GMRES(precs = <9-arg fn>) is a misuse.

I verified this is not a regression introduced here: LinearSolve 3.87.0, the version on
master today, calls precs(A, p) at src/common.jl:520 exactly as 5.13.0 does at line 881, and
running master's own committed manifest gives

master stack: LinearSolve 3.87.0
MASTER 9-arg precs via KrylovJL_GMRES: BROKEN -> MethodError: no method matching inc_lu(::WOperator{…}, ::Tuple{…})

So those chunks are already dead on master. Fixing them means either moving precs to the
algorithm (KenCarp3(precs = …, concrete_jac = true)) or rewriting the builders to (A, p) -> (Pl, Pr)
— a .jmd edit, and therefore #1672's call, not this PR's.

GenericSchur 0.5.6 hold (please read before re-running Pkg.update())

The manifest holds GenericSchur at 0.5.6. 0.5.7, registered 2026-08-24, pirates
LinearAlgebra.eigen!(::SymTridiagonal) and forwards sortby to a geigen! that does not
accept it. That breaks the ExponentialUtilities precompile workload —

MethodError: no method matching geigen!(::SymTridiagonal{Float64, SubArray{…}}, ::QRIteration; sortby::typeof(identity))

— which takes down OrdinaryDiffEqExponentialRK, a direct dep this folder needs for ETDRK3/ETDRK4.
I bisected it: EU 1.35.0 + GS 0.5.6 loads fine, EU 1.31.0 + GS 0.5.7 fails, so the fault is
entirely GenericSchur's. It reproduces on Julia 1.10.11 and 1.11.9. Tracked upstream as
RalphAS/GenericSchur.jl#24.

This is a manifest-only hold — no [compat] entry, no new [deps] entry — so it disappears on its
own once 0.5.8 lands. CI instantiates the committed manifest (Pkg.instantiate() in
src/SciMLBenchmarks.jl), so CI is deterministic. The scheduled update.yml job will re-break
this folder until GenericSchur is fixed.
Eleven other folders carry GenericSchur in their manifest
(ComplicatedPDE, StiffODE, Jumps, HybridJumps, Symbolics, DiffEqGPU, ParameterEstimation,
BayesianInference, PINNOptimizers, PINNErrorsVsTime, AutomaticDifferentiationTuring), so this will
bite them too.

Julia version

Unchanged. The manifest's julia_version stays 1.10.11, so CI's derived Julia version does not
move. Everything below was resolved and run under julia +1.10.11.

Resulting versions

package before after
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
SciMLLogging 1.10.1 2.1.0
GenericSchur 0.5.6 0.5.6 (held)

Verified locally

Julia 1.10.11, macOS aarch64, against this branch's manifest:

  • Pkg.instantiate() + Pkg.precompile() clean, no errors.
  • using of all 24 direct deps succeeds.
  • AMG: ruge_stuben + aspreconditioner, and ruge_stuben(W; presmoother/postsmoother = Jacobi(rand(n))),
    both constructed and applied through ldiv!.
  • IncompleteLU.ilu(W; τ = 50.0) + ldiv!.
  • All three ARKODE forms used in the folder (:GMRES, :Band with jac_upper/jac_lower, :Dense).
  • A WorkPrecisionSet on a stiff 1-D heat problem with a user-supplied in-place jac, over
    abstol 1e-4…1e-10 / reltol 1e-1…1e-7, spanning KenCarp3/4/5 (dense and KrylovJL_GMRES with
    (A, p) preconditioner builders — ILU and AMG), ARKODE(Implicit(), :GMRES) and CVODE_BDF(),
    against a RadauIIA5 reference at 1e-14 — plus plot(wp). This is the path that used to throw
    "No matching function wrapper was found!"; it now runs clean.
  • SplitODEProblem path: ETDRK3, ETDRK4, CNAB2(linsolve = KrylovJL_GMRES()) all return Success
    (this is what exercises ExponentialUtilities, hence the GenericSchur hold).

Not verified — for CI

  • No .jmd file was woven. Weaving this folder is currently a multi-day job; that is SimpleHandwrittenPDE: unbreak the reference solves and cap the regressed KenCarp sweeps #1672's subject.
    Runtimes, published figures and the accuracy of every benchmark curve are unverified here.
  • Numerical results will shift somewhat: OrdinaryDiffEq 7.0.0 → 7.7.0, LinearSolve 3 → 5 and the AMG
    coarse-solver change (Pinv → SPQR) all move solver output.
  • The 9-arg precs chunks in allen_cahn_fdm_wpd.jmd / burgers_fdm_wpd.jmd remain broken — as they
    already are on master.

Relationship to #1672

#1672 rewrites all ten .jmd files in this folder (reference solves, KenCarp tolerance sweeps).
This PR deliberately touches only Project.toml and Manifest.toml, so the two should merge
without conflict in either order.

Cross-check #1672 asked about, answered: the OrdinaryDiffEqCore CompositeCache bug survives this bump.
#1672 works around type CompositeCache has no field iter in stepsize_controller! — under an
AutoSwitch wrapper, isfirk(alg) is true for the FIRK member but integrator.cache is a
CompositeCache. The refresh moves OrdinaryDiffEqCore 4.14.1 → 4.15.0, but
src/integrators/controllers.jl between those two versions differs only in Runic formatting —
the if isfirk(alg); (; iter) = integrator.cache block is byte-identical, and isfirk itself is
unchanged in alg_utils.jl. So #1672's AutoVern7(RadauIIA5(...)) fix is still required; do not
drop it on the strength of this bump. (I could not trigger the failure on a synthetic KdV/heat problem
on either stack, so I am reporting this from the source diff, not from a reproduction.)

Also worth noting

LSODA is dead weight here. It is in [deps] with [compat] LSODA = "1", and grep -n "LSODA\|lsoda"
across all ten .jmd files returns nothing. Dropping it would remove a dep and its Parameters 0.12
transitive pin. I left it in to keep this PR strictly to the unblocking change — happy to drop it here
or in a follow-up if you prefer.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KrTtUuDkfgNEq3asQuZ3F6

…o 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
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
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.

1 participant