Skip to content

Fix OrdinaryDiffEq 7 solver re-export breakage (import KenCarp4 from OrdinaryDiffEqSDIRK)#151

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-ode7-solver-imports
Jun 7, 2026
Merged

Fix OrdinaryDiffEq 7 solver re-export breakage (import KenCarp4 from OrdinaryDiffEqSDIRK)#151
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-ode7-solver-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Ignore until reviewed by @ChrisRackauckas.

Problem

OrdinaryDiffEq 7.0.0 intentionally dropped its blanket solver re-exports to cut TTFS (dependency count 30 → 6; documented in ODE's NEWS.md). The documented downstream migration is to import non-default solvers from their sub-packages.

KenCarp4 moved to OrdinaryDiffEqSDIRK and is no longer exported by using OrdinaryDiffEq. examples/heat_equation.jl (run by test/runtests.jl) uses a bare KenCarp4, so under ODE 7 it fails with:

UndefVarError: `KenCarp4` not defined

Fix

  • examples/heat_equation.jl: add using OrdinaryDiffEqSDIRK: KenCarp4 alongside the existing using OrdinaryDiffEq.
  • Project.toml: add OrdinaryDiffEqSDIRK to [extras], the test target, and [compat] ("1, 2", which keeps the existing OrdinaryDiffEq = "6, 7" downgrade space intact — SDIRK 1.x pairs with the ODE 6 sub-package ecosystem, 2.x with ODE 7).

Tsit5, Rosenbrock23, ODEProblem, solve, ReturnCode, etc. are still exported by ODE 7, so no other example needed changing. The solve(...) calls in the other tutorials are FEniCS's own solve, not the ODE solver.

Verification

Reproduced and verified the solver path in an isolated depot on Julia 1.10 with OrdinaryDiffEq 7.0.0:

  • Before: using OrdinaryDiffEq; KenCarp4UndefVarError: KenCarp4 not defined.
  • After: using OrdinaryDiffEqSDIRK: KenCarp4 resolves; KenCarp4(autodiff = AutoFiniteDiff()) constructs and OrdinaryDiffEq.solve(prob, alg, reltol=1e-6, abstol=1e-6) returns ReturnCode.Success (decay test e^{-0.1} ≈ 0.90484 matches).
  • The exact edited import block from heat_equation.jl (using Test / using OrdinaryDiffEq / using OrdinaryDiffEqSDIRK: KenCarp4 / using ADTypes: AutoFiniteDiff) loads cleanly and the KenCarp4 solve path passes.
  • Test-environment deps co-resolve: OrdinaryDiffEq = 7.0.0, OrdinaryDiffEqSDIRK = 2.7.0, ADTypes = 1.22.0, ExplicitImports.

CI caveat: FEniCS.jl wraps Python FEniCS through PyCall and using FEniCS requires the cmhyett/julia-fenics container, which is not available in this local environment. The full Pkg.test (which loads FEniCS and runs the meshing/solve body of the example) was therefore not run locally — only the OrdinaryDiffEq import/solve path that this change affects was verified. The remaining body of heat_equation.jl is unchanged and exercises FEniCS, which is what CI's container provides.

Runic v1.7.0 check passes on the edited .jl file.

🤖 Generated with Claude Code

…sub-package

OrdinaryDiffEq 7.0.0 intentionally dropped blanket solver re-exports to cut
TTFS (deps 30 -> 6). KenCarp4 now lives in OrdinaryDiffEqSDIRK and is no
longer exported by `using OrdinaryDiffEq`, so examples/heat_equation.jl hit
`UndefVarError: KenCarp4 not defined` under ODE 7.

Import KenCarp4 explicitly from OrdinaryDiffEqSDIRK in the example and add the
sub-package to the test [extras]/target and [compat]. The compat `1, 2` keeps
the existing `OrdinaryDiffEq = "6, 7"` downgrade space intact.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 7, 2026 19:17
@ChrisRackauckas ChrisRackauckas merged commit a5424a6 into SciML:master Jun 7, 2026
4 of 6 checks passed
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.

2 participants