Skip to content

Fix default SDE dt vector lengths - #4454

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/diffeqdevtools-sde-default-dts
Sep 4, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/diffeqdevtools-sde-default-dts

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Ignore this PR until it has been reviewed by @ChrisRackauckas.

What changed

The SDE/ensemble WorkPrecisionSet paths constructed each setup's default dts vector from the number of setups instead of that setup's number of tolerances. A single setup with two tolerance levels therefore allocated one dt and failed on the second tolerance. Both equivalent paths now size their default dts from _abstols[k], and the stochastic work-precision tests cover this case.

This code previously lived in the now-archived SciML/DiffEqDevTools.jl repository. A bisect there identified SciML/DiffEqDevTools.jl@0522051 as the introducing commit.

Fail before

With the regression test applied but the source change reverted:

$ GROUP=Core julia +1.11.9 --project=lib/DiffEqDevTools -e 'using Pkg; Pkg.test()'
[ Info: Error calculation: 1/1
Analyticless Stochastic WP: Error During Test at .../lib/DiffEqDevTools/test/runtests.jl:29
  Got exception outside of a @test
  BoundsError: attempt to access 1-element Vector{Float64} at index [2]
  Stacktrace:
    [1] throw_boundserror(A::Vector{Float64}, I::Tuple{Int64})
    [2] getindex
    [3] WorkPrecisionSet(...)
      @ DiffEqDevTools .../lib/DiffEqDevTools/src/benchmark.jl:941
    [4] top-level scope
      @ .../lib/DiffEqDevTools/test/analyticless_stochastic_wp.jl:7
Test Summary:              | Error  Total   Time
Analyticless Stochastic WP |     1      1  23.6s

Pass after

The same official test and full declared Core group passed after the fix:

$ GROUP=Core julia +1.11.9 --project=lib/DiffEqDevTools -e 'using Pkg; Pkg.test()'
Test Summary:              | Pass  Total      Time
Analyticless Stochastic WP |    3      3  30m29.6s
...
Test Summary: | Pass  Total  Time
Timeout       |    7      7  4.4s
     Testing DiffEqDevTools tests passed

The required QA and static gates also passed:

$ GROUP=QA julia +1.11.9 --project=lib/DiffEqDevTools -e 'using Pkg; Pkg.test()'
Test Summary: | Pass  Total   Time
Aqua          |   15     15  30.5s
     Testing DiffEqDevTools tests passed

$ julia +1.11.9 --project=../.tools/runic -e 'using Runic; exit(Runic.main(copy(ARGS)))' -- --check lib/DiffEqDevTools/src/benchmark.jl lib/DiffEqDevTools/test/analyticless_stochastic_wp.jl
$ typos lib/DiffEqDevTools/src/benchmark.jl lib/DiffEqDevTools/test/analyticless_stochastic_wp.jl
$ git diff --check

All three static commands exited successfully with no output. A docs build was not run because this changes neither public API nor documentation. GPU and downstream jobs were not run locally.

🤖 Generated with Claude Code
https://chatgpt.com/codex/tasks/01a03a17-ad6f-7131-82fc-d0fd57ea6512

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review September 4, 2026 21:26
@ChrisRackauckas
ChrisRackauckas merged commit c22aea4 into SciML:master Sep 4, 2026
132 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Fix SciMLBase reexport QA on Julia LTS (#4450)
- Preserve conditioning in OOP no-init solves (#4438)
- Read the test group from GROUP like the CI passes it (#4447)
- Raise root GPU test timeout (#4449)
- Fix default SDE dt vector lengths (#4454)
- Bump DiffEqDevTools to 3.6.2 (#4461)
- DiffEqBase: wrap mass-matrix problems on the finite-difference promote_f path (#4459)
- Preserve the DAE step start during callback interpolation (#4466)
- Release DiffEqBase 7.20.1 (#4474)
- Release OrdinaryDiffEqCore 4.16.1 (#4475)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas referenced this pull request Sep 7, 2026
* Resolve symbolic idxs in the integrator interpolant

`integrator(t; idxs = sym)` passed `idxs` straight to the dense-output
interpolant, which only accepts integer component indices, so any symbolic index
threw `ArgumentError: invalid index` and an observed equation could never be
retrieved. `sol(t; idxs = sym)` has resolved both for a long time.

Symbolic `idxs` now route to `SciMLBase.symbolic_interpolation`, which evaluates
the current step's interpolant and applies the symbolic getter to it. Integer,
`nothing`, and in-place calls are unchanged.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam

* Route symbolic idxs for DelayDiffEq integrators too

`DDEIntegrator` has the same gap `ODEIntegrator` did: `integrator(t; idxs = sym)`
went straight to the dense-output interpolant, which only accepts integer
component indices, so symbolic indexes threw and observed equations were
unreachable.

The predicate moves to the public `SciMLBase.has_symbolic_idxs` rather than
staying an OrdinaryDiffEqCore internal, since DelayDiffEq, Sundials and
ODEInterfaceDiffEq all need the same decision.

`HistoryODEIntegrator` is deliberately left alone: it implements none of the
`SymbolicIndexingInterface` methods a `DEIntegrator` needs, so symbolic indexing
against it is unsupported before and after this change.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam

* Require SciMLBase 3.53 for has_symbolic_idxs

`has_symbolic_idxs` did not make it into the 3.52.0 release, so the floor moves
to the version that carries it.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019wKpyZHy9u4QhR4ePiVmam

---------

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Sep 11, 2026
- Preserve conditioning in OOP no-init solves (#4438)
- Read the test group from GROUP like the CI passes it (#4447)
- Raise root GPU test timeout (#4449)
- Fix default SDE dt vector lengths (#4454)
- Bump DiffEqDevTools to 3.6.2 (#4461)
- DiffEqBase: wrap mass-matrix problems on the finite-difference promote_f path (#4459)
- Preserve the DAE step start during callback interpolation (#4466)
- Release DiffEqBase 7.20.1 (#4474)
- Release OrdinaryDiffEqCore 4.16.1 (#4475)
- Release OrdinaryDiffEqNonlinearSolve 2.9.5 (#4476)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Sep 11, 2026
- Add serial SDC solver family (OrdinaryDiffEqSDC) (#4208)
- Give each threaded complex stage its own JVP operator (#4430)
- Fix the adaptive error estimates of MRIGARKERK22a and MIS (#4232)
- Skip sparsity prep for matrix-free jac_prototype operators (#4445)
- Format differentiation tests (#4446)
- Fix SciMLBase reexport QA on Julia LTS (#4450)
- Preserve conditioning in OOP no-init solves (#4438)
- Read the test group from GROUP like the CI passes it (#4447)
- Raise root GPU test timeout (#4449)
- Fix default SDE dt vector lengths (#4454)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

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