Skip to content

Bump compat for OrdinaryDiffEq v7 / SciMLBase v3 ecosystem#1466

Open
ChrisRackauckas-Claude wants to merge 5 commits intoSciML:masterfrom
ChrisRackauckas-Claude:bump-ordinarydiffeq-v7-ecosystem
Open

Bump compat for OrdinaryDiffEq v7 / SciMLBase v3 ecosystem#1466
ChrisRackauckas-Claude wants to merge 5 commits intoSciML:masterfrom
ChrisRackauckas-Claude:bump-ordinarydiffeq-v7-ecosystem

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

Cascade the major-version compat relaxations required by the OrdinaryDiffEq v7 / SciMLBase v3 ecosystem release:

Compat changes

Package Before After
OrdinaryDiffEqBDF "1" "1, 2"
OrdinaryDiffEqCore "3.22" "3.22, 4"
OrdinaryDiffEqDefault "1" "1, 2"
OrdinaryDiffEqRosenbrock "1" "1, 2"
OrdinaryDiffEqSDIRK "1" (docs only) "1, 2"
OrdinaryDiffEqTsit5 "1" "1, 2"
OrdinaryDiffEqVerner "1" "1, 2"
SciMLBase "2.84" "2.84, 3"
StochasticDiffEq "6.101" "6.101, 7"

Applied to: Project.toml, docs/Project.toml, test/extensions/Project.toml.

Source migrations

Two breaking-change sites were found and fixed:

  1. verbose = false removed (test/simulation_and_solving/hybrid_models.jl):
    In v7, Bool is no longer accepted for the verbose kwarg — must use ODEVerbosity(...). Since these calls were only suppressing output in tests, the kwarg was removed.

  2. EnsembleSolution iteration (test/simulation_and_solving/simulate_SDEs.jl):
    RAT v4 (RecursiveArrayTools v4, part of SciMLBase v3) changed EnsembleSolution to subtype AbstractArray, so for sol in ensemble_sol now iterates over scalar elements rather than trajectory solutions. Fixed by iterating ensemble_sol.u instead.

Test plan

  • CI passes on OrdinaryDiffEqTsit5 v2, OrdinaryDiffEqRosenbrock v2, OrdinaryDiffEqBDF v2, OrdinaryDiffEqDefault v2, OrdinaryDiffEqVerner v2, StochasticDiffEq v7, SciMLBase v3
  • CI passes on legacy v1/v6/v2 versions too (compat allows both)
  • No regressions in existing tests

🤖 Generated with Claude Code

Cascade major-version compat relaxations for the OrdinaryDiffEq v7
ecosystem release (SciML/OrdinaryDiffEq.jl#3562 + #3565):

Project.toml / docs/Project.toml / test/extensions/Project.toml:
- OrdinaryDiffEqBDF:        "1" → "1, 2"
- OrdinaryDiffEqCore:   "3.22" → "3.22, 4"
- OrdinaryDiffEqDefault:    "1" → "1, 2"
- OrdinaryDiffEqRosenbrock: "1" → "1, 2"
- OrdinaryDiffEqSDIRK:      "1" → "1, 2"  (docs only)
- OrdinaryDiffEqTsit5:      "1" → "1, 2"
- OrdinaryDiffEqVerner:     "1" → "1, 2"
- SciMLBase:             "2.84" → "2.84, 3"
- StochasticDiffEq:     "6.101" → "6.101, 7"

Source migrations for removed/changed APIs:
- test/simulation_and_solving/hybrid_models.jl: remove `verbose = false`
  from `solve` calls (Bool no longer accepted; use ODEVerbosity in v7)
- test/simulation_and_solving/simulate_SDEs.jl: iterate
  `cat_sol.u` / `hand_sol.u` instead of the EnsembleSolution directly
  (RAT v4: iterating EnsembleSolution now yields scalar elements, not
  trajectory solutions)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>

# Solves and checks values of solution (do this before integrator mutation test
# since integrator mutation affects shared parameter state).
sol = solve(prob, Tsit5(); maxiters = 10, verbose = false)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is verobes = false now the default for solve?

Comment thread test/simulation_and_solving/hybrid_models.jl Outdated
Comment thread test/simulation_and_solving/hybrid_models.jl Outdated
ChrisRackauckas and others added 3 commits April 29, 2026 03:39
Co-authored-by: Christopher Rackauckas <accounts@chrisrackauckas.com>
Catalyst was capping DiffEqBase at "6.165.0" only; widening to "6.165.0, 7"
so the v7 stack (DiffEqBase v7 ships as a sublibrary in OrdinaryDiffEq v7)
can be resolved. Existing PR commits already widened SciMLBase to "2.84, 3"
and several OrdinaryDiffEq sublibraries; this completes the compat surface.

This commit is compat-only. Test failures still need separate fixes
(JumpProcesses SSAIntegrator missing `ps` accessor in
test/simulation_and_solving/simulate_jumps.jl).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
…aram updates

JumpProcesses.SSAIntegrator does not expose a `ps` accessor (only
`derivative_discontinuity` is in its property list under SciMLBase v3),
so `integrator.ps[:k] = value` fails with FieldError. The four affected
callbacks were the actual cause of the 4 errors in
`Tests (*, Simulation)` jobs:

  Higher-order MAJ parameter updates (combinatoric=true)   — line 451
  Higher-order MAJ parameter updates (combinatoric=false)  — line 500
  Mixed-order MAJ parameter updates (combinatoric=true)    — line 545
  Combinatoric true/false equivalence (3X→Y)               — line ~645

Migration: capture the parameter setter via SymbolicIndexingInterface.setp
once at problem-construction time, then call it inside the callback. SII
is implemented on the integrator interface (not via getproperty), so it
flows through SSAIntegrator correctly:

    setk! = setp(jprob_cb, :k)
    function affect_cb!(integrator)
        setk!(integrator, 24.0)
        reset_aggregated_jumps!(integrator)
    end

This is the v3-canonical pattern for symbolically-indexed parameter
updates inside callbacks; same shape works on ODEIntegrator,
SDEIntegrator, and SSAIntegrator alike.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@isaacsas
Copy link
Copy Markdown
Member

isaacsas commented May 4, 2026

Please remove format related changes from this PR so we can see a clean diff of what is being changed. Format related changes should be restricted to standalone PRs that do not change any code.

du[2] = 0.0
du[3] = 0.0
du[4] = 0.0
return du[4] = 0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the three subsequent added returns are not correct. If a return is added it should be to return nothing.

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.

4 participants