Skip to content

Fix TauLeaping JumpProblem initialization - #4409

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-tauleaping-cache-signature
Aug 30, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-tauleaping-cache-signature

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

What changed and why

TauLeaping JumpProblem initialization could be intercepted by the JumpProcesses OrdinaryDiffEq extension, which unwraps the DiscreteProblem and sends TauLeaping through the ODE cache path. That path requests the 16-argument ODE alg_cache method, while TauLeaping requires stochastic initialization and its 18-argument cache setup.

This keeps JumpProblem solves inside StochasticDiffEqCore after callback merging and adds a narrower pure-jump init dispatch so TauLeaping initialization wins without overwriting the broader JumpProcesses method. The regression test exercises direct init, step!, solve, and the returned retcode. StochasticDiffEqCore receives a patch version bump.

Please ignore this draft until it has been reviewed by @ChrisRackauckas.

Cause

A source bisect across JumpProcesses v9.23.2 to v9.24.0 identified commit 31ca00b1db45b03328669cd669febffa23916a03 as the first commit whose OrdinaryDiffEqCore extension included stochastic algorithms in its intercepting dispatch. A current-source standalone reproducer independently confirmed the resulting call path through JumpProcessesOrdinaryDiffEqCoreExt into OrdinaryDiffEqCore ODE initialization.

Failing before

On the unmodified OrdinaryDiffEq master commit 43a65a5 with Julia 1.12.7:

GROUP=StochasticDiffEq_Interface2 /home/crackauc/.juliaup/bin/julia +1.12.7 --project -e "using Pkg; Pkg.test()"

Result:

Basic Tau Leaping Tests | Error 1
MethodError: no method matching alg_cache(::TauLeaping, ..., ::Val{true}, ::DEVerbosity)

A standalone JumpProblem reproducer containing direct init plus step! and complete solve failed with the same missing 16-argument alg_cache method.

Passing after

Validated on current upstream master commit 52bf8f3 with Julia 1.12.7:

  • The same standalone reproducer exited 0 under --warn-overwrite=yes. Direct init, step!, and solve assertions passed, and no method-overwrite warning appeared.
  • GROUP=StochasticDiffEq_Interface2: Basic Tau Leaping Tests 18/18; Linear SDE Tests 3/3; Two-dimensional Linear SDE Tests 39/39; Element-wise Tolerances Tests 12/12; Zeroed Noise Tests 13/13; Scalar Tests 1/1; Stiffness Detection Test 5/5; Adaptive SDE Linear Tests 16/16; Inplace RODESolution Interpolation Tests 11/11. StochasticDiffEq and the OrdinaryDiffEq umbrella both reported tests passed.
  • GROUP=StochasticDiffEqCore_QA: QA with Aqua and JET 21/21.
  • GROUP=StochasticDiffEq_QA: StochasticDiffEq and the OrdinaryDiffEq umbrella both reported tests passed.
  • GROUP=QA, run sequentially: Quality Assurance Tests 106/106.
  • Runic check passed for both changed Julia files.
  • typos passed over every changed file.
  • git diff --check passed.

Other attempted group

GROUP=StochasticDiffEq_Interface1 was attempted twice on the earlier base commit. Its only error was the independent current-base ISSEM nonlinear-cache regression:

ArgumentError: nlsolve! expects the integrator cache in its third argument, got StochasticDiffEqImplicit.ISSEMCache

That non-JumpProblem failure was fixed independently by OrdinaryDiffEq pull request 4407 before this branch was rebased. It is not included in this focused change.

Not verified

  • GROUP=Everything, GPU jobs, downstream jobs, and allowed-to-fail Julia pre jobs were not run.
  • Documentation was not built because the change does not touch documentation, a docstring, or public API.

Links

🤖 Generated with Claude Code
https://chatgpt.com/codex/tasks/01a03caf-aae8-74c3-9a79-53b836434858

Keep stochastic JumpProblem solves in the stochastic initialization path and resolve direct pure-jump initialization before JumpProcesses can unwrap the problem into the ODE cache path.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Claude <[email protected]>
Claude-Session: https://chatgpt.com/codex/tasks/01a03caf-aae8-74c3-9a79-53b836434858
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 30, 2026 02:04
@ChrisRackauckas
ChrisRackauckas merged commit e07c591 into SciML:master Aug 30, 2026
166 of 170 checks passed
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Fix StochasticDiffEqImplicit import ordering (#4408)
- Fix TauLeaping JumpProblem initialization (#4409)
- Fix dense output for the explicit multirate methods (#4233)
- Let reinit! keep the step-size controller history (#4400)
- Mark an operator Jacobian as updated when calc_W! moves it (#4354)
- Restore weighted preconditioning and tolerances for default Krylov solves (#4391)



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