Skip to content

Bump compat for OrdinaryDiffEq v7 / SciMLBase v3 ecosystem#87

Open
ChrisRackauckas-Claude wants to merge 2 commits intoSciML:mainfrom
ChrisRackauckas-Claude:bump-ordinarydiffeq-v7-ecosystem
Open

Bump compat for OrdinaryDiffEq v7 / SciMLBase v3 ecosystem#87
ChrisRackauckas-Claude wants to merge 2 commits intoSciML:mainfrom
ChrisRackauckas-Claude:bump-ordinarydiffeq-v7-ecosystem

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown

Summary

Bumps compat bounds to support the OrdinaryDiffEq v7 / SciMLBase v3 ecosystem (refs SciML/OrdinaryDiffEq.jl#3562 and SciML/OrdinaryDiffEq.jl#3565, see NEWS.md).

Compat changes (Project.toml)

Package Before After
SciMLBase "1.8.3, 2" "1.8.3, 2, 3"
OrdinaryDiffEqTsit5 (unset) "1, 2"
Catalyst "15" "15, 16"
ModelingToolkit "9" "9, 10, 11"
SymbolicUtils "3" "3, 4"
Symbolics "6" "6, 7"

Source migration (src/utils.jl)

RecursiveArrayTools v4 (bundled with SciMLBase v3) makes AbstractVectorOfArray <: AbstractArray, changing length and [] indexing semantics:

  • length(sol.u[1])length(sol.u[1].u) in get_raw_moments, get_central_moments, get_cumulantslength of an ODESolution now returns total elements (n_vars * n_timesteps), not number of timesteps.
  • sol[t_pt]sol.u[t_pt] in get_moments_FSP — integer indexing into an ODESolution now returns a scalar element, not the t_pt-th timestep.

Both fixes use the sol.u[i] form that works on both RAT v3 and v4 (documented in NEWS.md as the forward-compatible migration path).

Test plan

  • CI passes on the standard test suite
  • sample_moment_tests.jl exercises get_raw_moments, get_central_moments, get_cumulants
  • fsp_tests.jl exercises get_moments_FSP

🤖 Generated with Claude Code

- SciMLBase: "1.8.3, 2" → "1.8.3, 2, 3" (SciMLBase v3 released)
- OrdinaryDiffEqTsit5: added "1, 2" compat entry (v2 requires SciMLBase v3)
- Catalyst: "15" → "15, 16"
- ModelingToolkit: "9" → "9, 10, 11"
- SymbolicUtils: "3" → "3, 4"
- Symbolics: "6" → "6, 7"
- Fix RecursiveArrayTools v4 breaking changes in src/utils.jl:
  - length(sol.u[1]) → length(sol.u[1].u) for EnsembleSolution
    (AbstractVectorOfArray now <: AbstractArray, length returns total elements)
  - sol[t_pt] → sol.u[t_pt] for ODESolution timestep indexing in get_moments_FSP

Refs SciML/OrdinaryDiffEq.jl#3562, SciML/OrdinaryDiffEq.jl#3565

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Author

Changes overview

Project.toml compat bumps:

src/utils.jl code migration:

RecursiveArrayTools v4 (ships with SciMLBase v3) makes AbstractVectorOfArray <: AbstractArray. This changes length and integer indexing semantics:

  1. length(sol.u[1])length(sol.u[1].u) in get_raw_moments, get_central_moments, get_cumulants:
    sol.u[1] is an ODESolution; length() now returns total elements (n_vars × n_timesteps) not just n_timesteps.

  2. sol[t_pt]sol.u[t_pt] in get_moments_FSP:
    Integer indexing now returns a scalar element, not the t_pt-th timestep.

Note: the runic CI check failure is a pre-existing infrastructure issue with the self-hosted runner (deepsea3-1) not having Julia installed. Local Runic.format_string confirms utils.jl passes formatting.

CI showed that bumping ModelingToolkit to v10/v11 breaks the source code:
- get_noiseeqs was renamed to get_noise_eqs in MTK v10+
- SDESystem semantics changed in MTK v11

These require migration work that is out of scope for an OrdinaryDiffEq v7 /
SciMLBase v3 ecosystem compat bump. Catalyst v15 transitively constrains
ModelingToolkit to v9 and SymbolicUtils/Symbolics to v3/v6, so leaving the
bounds at "9", "3", "6" matches what the dependency graph already enforces.

The remaining changes (SciMLBase v3 allowed, OrdinaryDiffEqTsit5 v2 in extras
for the SciMLBase-v3 build, and the RecursiveArrayTools v4 sol.u indexing
migration in src/utils.jl) are kept.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Author

Iteration update: The first CI cycle revealed that bumping ModelingToolkit = "9, 10, 11" allowed Pkg to resolve to MTK v11, which removed get_noiseeqs (renamed to get_noise_eqs) and refactored SDESystem. Migrating to that API is out of scope for an OrdinaryDiffEq v7 / SciMLBase v3 ecosystem compat bump, so I reverted the MTK / Catalyst / SymbolicUtils / Symbolics bounds back to their original values (commit ca8a802).

The remaining changes — SciMLBase = "1.8.3, 2, 3", OrdinaryDiffEqTsit5 = "1, 2" in [compat], and the RecursiveArrayTools v4 sol.u indexing migration in src/utils.jl — are kept. These are forward-compatible with the existing dependency graph (Catalyst v15 still constrains SciMLBase to v2 transitively), and ready to allow SciMLBase v3 once Catalyst gets its own bump.

The Documentation build is now passing.

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Author

CI status (cycle 2):

  • ✅ Julia LTS (1.10): pass (8m22s)
  • ✅ Documentation build: pass (4m44s)
  • ✅ runic format-check: pass
  • ❌ Julia 1 (1.12): fail — unrelated to this PR
  • ⏳ Julia pre: in progress

The Julia 1 failure is in JumpProcessesOrdinaryDiffEqCoreExt precompilation:

ERROR: LoadError: UndefVarError: `StochasticDiffEqAlgorithm` not defined in `JumpProcessesOrdinaryDiffEqCoreExt`

This is an upstream incompatibility between JumpProcesses' OrdinaryDiffEqCore extension and a newer OrdinaryDiffEqCore that no longer exports StochasticDiffEqAlgorithm/StochasticDiffEqRODEAlgorithm. It happens during precompilation of test deps before any MomentClosure code runs, and the same issue would reproduce on main against the current dependency graph. It is not caused by the compat or src/utils.jl changes in this PR (which only touch SciMLBase + RecursiveArrayTools API surface).

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