Skip to content

Fix OrdinaryDiffEqSIMDRK precompilation: explicit SciMLBase imports - #4174

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/simdrk-explicit-scimlbase-imports
Aug 8, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/simdrk-explicit-scimlbase-imports

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore until reviewed by @ChrisRackauckas.

What changed and why

OrdinaryDiffEqSIMDRK does not precompile at all on master: src/perform_step.jl:45 defines a method on ODEFunction, but the package reached that name only through @reexport using OrdinaryDiffEqCore and OrdinaryDiffEqCore stopped re-exporting SciMLBase in #4119 (4ca8a4c2ca24c871b0cd9308399473ffed3a2277, 2026-08-05). This adds explicit using SciMLBase: ... imports in src/ and in the three test files that referenced SciMLBase names the same way, plus SciMLBase to [deps]/[compat] — the reexport removal is the intended v7 behavior, so nothing is restored in OrdinaryDiffEqCore.

Failing before

Base commit: 7b1ad0368280061076d10db82b37ff747486efce ("Zero AdaptiveRadau's stage-value slots at initialization (#4160)"), clean clone of master, no local modifications.

$ julia +1.12 --project=lib/OrdinaryDiffEqSIMDRK -e 'using Pkg; Pkg.instantiate(); using OrdinaryDiffEqSIMDRK'
              ✗ OrdinaryDiffEqSIMDRK
ERROR: The following 1 direct dependency failed to precompile:
Failed to precompile OrdinaryDiffEqSIMDRK [dc97f408-7a72-40e4-9b0d-228a53b292f8] ...
ERROR: LoadError: UndefVarError: `ODEFunction` not defined in `OrdinaryDiffEqSIMDRK`
Suggestion: check for spelling errors or missing imports.
Hint: a global variable of this name also exists in SciMLBase.
Stacktrace:
  [1] top-level scope
    @ .../lib/OrdinaryDiffEqSIMDRK/src/perform_step.jl:45

Its own test suite therefore never runs a single test:

$ cd lib/OrdinaryDiffEqSIMDRK && GROUP=ALL julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
              ✗ OrdinaryDiffEqSIMDRK
  7 dependencies successfully precompiled in 28 seconds. 215 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
ERROR: LoadError: UndefVarError: `ODEFunction` not defined in `OrdinaryDiffEqSIMDRK`

Full list of unreachable names

Every SciMLBase name lib/OrdinaryDiffEqSIMDRK referenced without being able to reach it (found by grep plus repeated load/test attempts until the suite ran clean, so the list is closed, not just the first error):

File Names Import added
src/perform_step.jl:45 (method definition) ODEFunction using SciMLBase: ODEFunction in src/OrdinaryDiffEqSIMDRK.jl
test/adaptivity_tests.jl ODEProblem, solve using SciMLBase: ODEProblem, solve
test/convergence_tests.jl ODEFunction, ODEProblem using SciMLBase: ODEFunction, ODEProblem
test/qa/allocation_tests.jl ODEProblem, init, step! using SciMLBase: ODEProblem, init, step!

This matches the SIMDRK rows of the repo-wide scan in #4169.

New dependency (please look at this)

SciMLBase was not in lib/OrdinaryDiffEqSIMDRK/Project.toml; it was reached transitively through OrdinaryDiffEqCore. Since src/ defines a method on SciMLBase.ODEFunction, SciMLBase is a genuine direct dependency, so this PR adds it to [deps] with SciMLBase = "3.39", the same floor every other sublibrary in the monorepo uses (OrdinaryDiffEqCore, OrdinaryDiffEqTsit5, OrdinaryDiffEqBDF, ...). Both the resolved version and the compat floor declare all five names public:

$ julia +1.12 -e 'using Pkg; Pkg.add(name="SciMLBase", version="3.39.0"); using SciMLBase;
                  for n in (:ODEFunction,:ODEProblem,:solve,:init,:step!)
                      println(n, " => ", Base.ispublic(SciMLBase, n))
                  end'
ODEFunction => true
ODEProblem => true
solve => true
init => true
step! => true
3.39.0

(The same check against the version actually resolved here, SciMLBase v3.43.0, also returns true for all five.)

That also means a patch release of OrdinaryDiffEqSIMDRK is required for this to reach users — the registered v2.1.1 has OrdinaryDiffEqCore = "4", so it is broken against OrdinaryDiffEqCore 4.14. I left the version number alone here since this repo bumps sublibrary versions in batch release PRs.

Passing after

The package loads:

$ julia +1.12 --project=lib/OrdinaryDiffEqSIMDRK -e 'using Pkg; Pkg.instantiate(); using OrdinaryDiffEqSIMDRK; println("LOADED OK")'
   5073.6 ms  ✓ OrdinaryDiffEqSIMDRK
  1 dependency successfully precompiled in 6 seconds. 111 already precompiled.
LOADED OK

and its whole suite runs to completion:

$ cd lib/OrdinaryDiffEqSIMDRK && GROUP=ALL julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
Test Summary:     | Pass  Total   Time
Convergence Tests |    3      3  27.8s
Test Summary:    | Pass  Total  Time
Adaptivity Tests |    3      3   6.7s
Test Summary:    | Broken  Total   Time
Allocation Tests |      2      2  34.2s
Test Summary: | Pass  Total   Time
JET Tests     |    1      1  35.4s
     Testing OrdinaryDiffEqSIMDRK tests passed

The two Broken results in Allocation Tests are the pre-existing @test length(allocs) == 0 broken = true in test/qa/allocation_tests.jl; I did not add or widen any broken/skip marker.

Re-run after rebasing onto 0651ac96544c67492d01c588fff18eaf0ae94e3e (current master), same result:

Test Summary:     | Pass  Total     Time
Convergence Tests |    3      3  4m31.3s
Test Summary:    | Pass  Total  Time
Adaptivity Tests |    3      3   7.3s

$ GROUP=QA julia +1.12 --project=. -e 'using Pkg; Pkg.test()'
Test Summary:    | Broken  Total     Time
Allocation Tests |      2      2  1m28.0s
Test Summary: | Pass  Total     Time
JET Tests     |    1      1  1m53.1s
     Testing OrdinaryDiffEqSIMDRK tests passed

Formatting/spelling: Runic.main(["--check", "--diff", <the four .jl files>]) exits 0; typos lib/OrdinaryDiffEqSIMDRK exits 0.

Is SIMDRK in CI? Yes — and CI caught this; the PR was merged red

This is not an un-built sublibrary. SublibraryCI selected it (it depends on the changed OrdinaryDiffEqCore) and all three of its jobs failed on #4119 with exactly this error, and it was merged anyway:

Job on #4119 Result
sublibrary-ci / lib/OrdinaryDiffEqSIMDRK / Julia 1 / Tests - Core https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/30973546781/job/92206612343 FAILURE
sublibrary-ci / lib/OrdinaryDiffEqSIMDRK [QA] / Julia 1 / Tests - QA https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/30973546781/job/92206612284 FAILURE
downgrade-sublibraries / test (lib/OrdinaryDiffEqSIMDRK) https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/30973546776/job/92206568910 FAILURE

Both sublibrary-ci logs contain ERROR: LoadError: UndefVarError: `ODEFunction` not defined in `OrdinaryDiffEqSIMDRK` . So no CI wiring change is proposed here — the gap was in merging past red required-looking checks, not in coverage.

Not verified

  • Julia 1.12.6 only. Not run on lts or pre (SIMDRK has no test_groups.toml, so CI gives it Core on [lts, 1, pre] and QA on [lts, 1]).
  • The downgrade-sublibraries job was not reproduced locally; I only checked that SciMLBase 3.39.0 declares the five names public, not that the full downgraded resolve succeeds.
  • No other sublibrary, no root test group, no docs build, no downstream, no GPU. The src/ change is one using line in a package nothing else in the monorepo depends on.

OrdinaryDiffEqSIMDRK failed to precompile: src/perform_step.jl defines a
method on ODEFunction, which it only reached through
`@reexport using OrdinaryDiffEqCore` before Core dropped its blanket
SciMLBase reexport in SciML#4119. Import ODEFunction (and ODEProblem, solve,
init, step! in the three affected test files) explicitly, and add
SciMLBase to [deps]/[compat] since src/ extends a SciMLBase type.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 8, 2026 12:48
@ChrisRackauckas
ChrisRackauckas merged commit 345ed12 into SciML:master Aug 8, 2026
105 of 123 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Aug 9, 2026
…leasable

Registered OrdinaryDiffEqSIMDRK 2.1.1 does `@reexport using OrdinaryDiffEqCore`
and uses `ODEFunction` unqualified. SciML#4119 removed Core's blanket
`@reexport using SciMLBase`, so that name is no longer in Core's export surface
and 2.1.1 cannot precompile against Core master. SciML#4174 fixed the source but did
not bump the version, so the fix is not releasable.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01F75XsVeZ94QH3PmCuq6QUF
ChrisRackauckas added a commit that referenced this pull request Aug 9, 2026
…ble (#4183)

Registered OrdinaryDiffEqSIMDRK 2.1.1 does `@reexport using OrdinaryDiffEqCore`
and uses `ODEFunction` unqualified. #4119 removed Core's blanket
`@reexport using SciMLBase`, so that name is no longer in Core's export surface
and 2.1.1 cannot precompile against Core master. #4174 fixed the source but did
not bump the version, so the fix is not releasable.



Claude-Session: https://claude.ai/code/session_01F75XsVeZ94QH3PmCuq6QUF

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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