Repository navigation
Document GPU ensembles and native mass-action tau leaping - #650
Draft
ChrisRackauckas-Claude wants to merge 6 commits into
Draft
ChrisRackauckas-Claude wants to merge 6 commits into
ChrisRackauckas-Claude wants to merge 6 commits into
Conversation
ChrisRackauckas-Claude
force-pushed
the
docs/gpu-tau-leaping
branch
from
September 5, 2026 13:01
d6c93c3 to
8af6775
Compare
Generate the regular rate/update interface for pure discrete mass-action problems and support the fixed-step ensemble kernel. Preserve explicit RegularJump inputs for general kinetics. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a070e6-21f2-7dd3-bf52-2ddaf108ac53
Remove constructor conversion to RegularJump. Use native mass-action data in fixed-step CPU and GPU solves and expose propensity, stoichiometry, and fused drift operations for downstream solvers, including single-reaction inputs. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a070e6-21f2-7dd3-bf52-2ddaf108ac53
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a070e6-21f2-7dd3-bf52-2ddaf108ac53
Combine the solver examples around shared kinetics, describe native reaction data handling, and document fixed stepping for the incomplete Cao selector. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a070e6-21f2-7dd3-bf52-2ddaf108ac53
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Codex <noreply@openai.com> Agent-Harness: Codex CLI 0.153.4 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a070e6-21f2-7dd3-bf52-2ddaf108ac53
ChrisRackauckas-Claude
force-pushed
the
docs/gpu-tau-leaping
branch
from
September 12, 2026 09:46
8af6775 to
0694d22
Compare
Resolve Project.toml version to 9.33.1 and keep both RateBounds and massaction helper exports. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Agent-Harness: Cursor CLI 2026.09.23-86fc751 Agent-Model: Composer Agent-Session: /home/crackauc/sandbox/fleet-master-jobs/nw-jumpprocesses-650/log.txt Co-authored-by: Cursor <cursoragent@cursor.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document GPU ensembles and tau-leaping methods around a shared
MassActionJumpmodel. The same problem is solved by JumpProcesses and StochasticDiffEq methods;RegularJumpis an additional interface for custom kinetics in the solvers that support it. The guide includes executable examples, solver/input tables, GPU constraints, and the current limitation of the Cao adaptive selector.The solver changes live in #652 and SciML/OrdinaryDiffEq.jl#4523 . This branch includes the JumpProcesses prerequisite. Documentation requires JumpProcesses 9.33 and StochasticDiffEqLeaping 2.2; registry-only documentation CI must wait for those releases. StochasticDiffEqLeaping is MIT licensed, matching JumpProcesses.
GPU support covers SSA, fixed tau leaping, and adaptive explicit mass-action tau leaping. Adaptive implicit, trapezoidal, and switching methods are CPU-only. No GPU capability is inferred from the CPU interface.
Verification
Both commands exited 0. The final
adaptive = falseoption in the general Cao example was checked by rerunning both example groups after the full build had read that page; those 40 checks passed.The standalone local check executes the guide's two Documenter example groups. The full build uses the locally developed prerequisite versions. Runic on changed Julia lines,
typosover changed files, andgit diff --checkpassed. CUDA examples were not executed on GPU hardware. The native implementation's CPU/kernel-backend validation is recorded in the prerequisite PR.Source discussions: #649 , #643 , and #524 .
Ignore this PR until reviewed by @ChrisRackauckas.
🤖 Generated with Codex CLI 0.153.4 (model: gpt-6-astra; local session ID: 01a070e6-21f2-7dd3-bf52-2ddaf108ac53).
CI triage (2026-09-24)
StochasticDiffEqLeapingrestricted to2.2but General registry only has1.0.0–2.1.0. Master Documentation is green (run 35274730731 on97e4d259). Prerequisite OrdinaryDiffEq#4523 still open; package version on master remains2.1.0. No safe fix without lowering compat, adding git sources, or waiting for registration.0694d223before mergeMerged
master(97e4d259) intodocs/gpu-tau-leapingasa5e49763to clear conflicts. Conflict resolution:Project.tomlversion9.33.1; exports keep bothRateBounds(master) andmassaction_*helpers (PR).Risk assessment
StochasticDiffEqLeaping 2.2is registered after OrdinaryDiffEq#4523 merges.Project.tomlversion string;src/JumpProcesses.jlexport list. No solver logic changed in the merge resolution.massaction_leaping29/29 andbracketing36/36 passed after merge; Runic/typos clean on resolved files.🤖 Posted by an AI agent — harness: Cursor CLI 2026.09.23-86fc751 · model: Composer
Conversation: /log.txt
Risk assessment
SimpleTauLeaping, on CPU or throughEnsembleGPUKernel. Also the master docs build and deploy, which would go red after merge untilStochasticDiffEqLeaping 2.2is registered. The PR adds three exported functions to the public API (massaction_rates!,massaction_stoichiometry_mul!,massaction_drift!). It also changes behaviour in two places:validate_pure_leaping_inputsnow requiresjump_prob.prob isa DiscreteProblem. APureLeaping+RegularJumpproblem built on any other problem type used to pass this check and now raises an error.SimpleTauLeapingused to be!isnothing(rj.mark_dist) == nothing, which is always false, so it never fired. The fixed check means aRegularJumpwith a mark distribution now raises an error instead of running silently.Documentation / Build and Deploy Documentationfails on heada5e49763(https://github.com/SciML/JumpProcesses.jl/actions/runs/36088043611/job/107924192969) withUnsatisfiable requirements … StochasticDiffEqLeaping restricted to versions 2.2.0 - 2 — no versions left. This is caused by the PR's newdocs/Project.tomlcompat lineStochasticDiffEqLeaping = "2.2". The same check passes on master:3c8c8edc(https://github.com/SciML/JumpProcesses.jl/actions/runs/36326777401),97e4d259,60f3a489,5cd72a32and9093dc19. The only master failure is26b9c57f(https://github.com/SciML/JumpProcesses.jl/actions/runs/36326709524), and the next master commit's docs run passed.StochasticDiffEqLeaping 2.2release) and Preserve native mass-action data for tau-leaping solvers #652.StochasticDiffEqLeaping 2.2and the open Use MassActionJump directly in stochastic tau-leaping solvers OrdinaryDiffEq.jl#4523.src/massaction_rates.jl,src/simple_regular_solve.jl,src/problem.jl🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI / fusion-claude-opus-5-5-high-sidekick-swe-2-medium; dispatched by Devin CLI 3000.11.3 fleet-master caretaker, model Fusion (claude-opus-5-5 medium + swe-2 medium)
Conversation: local transcript (no session URL)
Risk assessment (independent review, Codex CLI (gpt-6.1-sol), local job oss-reviews-2026-10-22-SciML-JumpProcesses-jl-650-a5e4976 (no session URL), head a5e4976)
Executed review notes (head a5e4976):
Review of #650 (head a5e4976)
Public API: adds three exported mass-action operations and narrows fixed-step input validation to DiscreteProblem; additive API and compatibility changes need review.
Numerics/algorithms: new integer-state propensity evaluation silently overflows before conversion to the floating-point rate type.
Dependencies/compat: adds a docs-only StochasticDiffEqLeaping 2.2 requirement that cannot resolve against the available registry; no runtime dependency added. The dependency's installed release uses an MIT license; the unavailable 2.2 release was not inspected.
Tests changed or missing: existing assertions are retained; new interface and CPU kernel tests pass, but large integer populations are untested.
Performance/GPU/AD paths: modifies CPU and KernelAbstractions fixed-step execution; CPU backend and ForwardDiff tests pass, hardware GPU execution and performance are unverified.
Downstream reach: fixed-step leaping users, consumers of the new exported operations, and documentation builds.
Findings
using JumpProcesses; maj = MassActionJump([1.0], [[1 => 3]], [[1 => -3]]); massaction_rates!(zeros(1), maj, [3_000_000]). Observed 1.4255381543827412e18, whereas exact-integer evaluation of n*(n-1)*(n-2)/6 gives 4.499995500001e18. The same call with [3_000_000.0] gives the correct value. This corrupts both the new public rate/drift operations and the newly supported integer-state SimpleTauLeaping route; the kernel route accumulates in a floating-point rate type instead. Accumulate in an appropriate promoted rate type without losing AD support, and add high-population integer/float equivalence tests. The base implementation lacks these helpers and rejects mass-action inputs to this solver; this finding concerns the newly added functionality, not a claimed regression of existing SSA behavior.possible versions are: 1.0.0 - 2.1.0 or uninstalledandrestricted to versions 2.2.0 - 2 ... no versions left. The local General registry also lists only through 2.1.0. The supplied checks report Documentation failing, consistent with this local failure. The PR's base master commit 97e4d25 has neither this direct dependency nor this constraint; its docs environment was inspected but not built locally. Keep the PR unmerged until the required implementation is registered and the examples and full docs build pass using released dependencies; lowering the bound alone would not establish that the documented mass-action support exists.What I ran
git -C repo diff 97e4d259 HEAD --check: exit 0. Compared changed validation and docs dependencies with base master 97e4d25; local master points to later work, so it was not used as the PR's historical base.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --project=@runic -m Runic --check repo/docs/pages.jl repo/ext/JumpProcessesKernelAbstractionsExt.jl repo/src/JumpProcesses.jl repo/src/massaction_rates.jl repo/src/problem.jl repo/src/simple_regular_solve.jl repo/test/massaction_fixed_tau_kernel.jl repo/test/massaction_leaping.jl repo/test/runtests.jl: exit 0, no diagnostics.typos pr.diff: exit 0, no diagnostics.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/review-env -e 'using Pkg; Pkg.develop(path="repo"); Pkg.instantiate()': exit 0. Resolved runtime is Julia 1.13.2. No tracked project or test files were edited.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/review-env tmp/run-tests.jl: exit 0; massaction_leaping.jl 29/29, massaction_fixed_tau_kernel.jl on CPU() 12/12, regular_jumps.jl 88/88. Used separate SafeTestsets for these files.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/review-env tmp/check-overflow.jl: exit 0; Int64 propensity 1.4255381543827412e18 versus exact reference 4.499995500001e18 (ratio 0.31678657331600096); Float64 propensity matches reference.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/review-env tmp/check-compat.jl: exit 0 with caught exception; ODE-backed RegularJump rejected withSimpleTauLeaping requires a PureLeaping JumpProblem with a MassActionJump or a RegularJump.Did not establish a previously working supported solve, so this is not a separate confirmed regression finding.JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/docs-env -e 'using Pkg; Pkg.develop(path="repo"); Pkg.instantiate()': exit 1, unsatisfiable StochasticDiffEqLeaping 2.2 requirement, as quoted above.GROUP=QA JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 timeout 3600 julia +release --startup-file=no --project=tmp/review-env repo/test/runtests.jl: exit 0; QA Tests 20/20, 14.4 seconds after obtaining a shared Julia slot.Not verified
Independent review by an AI agent — harness: codex-cli 0.162.1 · model: gpt-6.1-sol · Codex exec session 01a149f5-a65e-72f1-b87c-0bf86822cc66 · 2026-10-17 13:14 UTC. Not posted to GitHub.
🤖 Posted by an AI agent — harness: Codex CLI · model: gpt-6.1-sol (independent reviewer; appended by Antigravity CLI · model: gemini-4-argon-high)
Conversation: local job oss-reviews-2026-10-22-SciML-JumpProcesses-jl-650-a5e4976 (no session URL)
Risk assessment (independent review, Codex Desktop (Codex core 0.164.0-alpha.11.1) gpt-6.1-sol, slot 1, head a5e4976)
Review round 2, written by the reviewer named above (Codex Desktop (Codex core 0.164.0-alpha.11.1) / gpt-6.1-sol) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands.
Summary: Adds tau-leaping/GPU guides with native mass-action solver/API changes and a governing AGENTS.md. Integer propensities overflow on valid large populations, and the docs dependency requirement cannot resolve.
Blast radius: Documentation environment, native mass-action CPU/GPU leaping paths, solver-author APIs, and repository agent guidance.
Evidence: InterfaceI reports 29/29 mass-action leaping checks; InterfaceII reports 12/12 fixed-step CPU-kernel checks. GPU CI is marked successful, but that status alone is not treated as proof of every documented GPU capability. The docs failure is specifically the added StochasticDiffEqLeaping 2.2 requirement, verified against the live General registry file. The inspected GPU job explicitly reports GPU fixed-step mass-action kernel 12/12, satisfying G2 for that path. Post-freeze comparison identified the previously reported integer overflow; the reviewer independently reproduced its exact arithmetic and inspected the identical helper.
Blocking findings
src/massaction_rates.jl:185— confirmed by running. The falling-factorial product starts with one(eltype(u)), so integer states overflow before the final multiplication by the floating rate constant. For MassActionJump([1.0], [[1=>3]], [[1=>-3]]) and u=[3_000_000], the propensity is 1.4255381543827412e18; the independent BigInt binomial reference and Float64-state call both give 4.499995500001e18. A post-freeze package probe confirms this at sibling Preserve native mass-action data for tau-leaping solvers #652; the exact helper body in this head is byte-identical, and an exact-helper probe is also recorded below. Accumulate in a suitable promoted rate type that preserves AD, and commit integer/high-population regression tests. This affects new functionality; the base has no such helper.docs/Project.toml:35— confirmed by running. Documentation CI fails with Unsatisfiable requirements for StochasticDiffEqLeaping: the environment requires 2.2 but the live General Versions.toml lists releases only through 2.1.1. A sampled default docs run is green. Release/register the companion dependency before merging this environment, or separate/gate the unreleased examples using an explicit supported source arrangement; do not lower compat unless those examples actually work on the older release.Non-blocking findings
AGENTS.md:1— Separate the governing instructions and the solver prerequisite from the prose change to make the authority change and numerical implementation independently reviewable. The current diff is substantially broader than its docs title.What I ran
HEADwas verified equal toa5e497632d0f6fe27e18769f9ec91ef04048765d.git diff --checkexited 0. The diff was compared to the recorded live base through its merge base, not directly against unrelated base-only commits. Root/nested agent instructions and surrounding changed-code callers were inspected. Author metadata above is from the newest non-merge commit only; absent trailers are intentionallyunknown.Before the post-freeze probes below, test evidence came from inspected CI logs; source/diff checks were run locally.
CI inspection:
gh run view <run-id> --repo SciML/JumpProcesses.jl --log-failed, and for selected green jobsgh run view <run-id> --job <job-id> --repo SciML/JumpProcesses.jl --log. Default-branch samples usedgh run list --repo SciML/JumpProcesses.jl --branch master --event push --limit 5 --json databaseId,conclusion,headSha,url,name; completed failing runs were read rather than assuming equivalence from status alone.14 checks successful/skipped/neutral; 1 checks failed/cancelled/pending at the captured snapshot. These counts include external status checks.
Post-freeze reviewer probes, Julia 1.13.0, sequential execution, exit 0. Filesystem locations below are normalized because the issue prohibits machine paths. Executed the exact
massaction_propensitydefinition from this head usingjulia --startup-file=no --compiled-modules=no <exact-helper-probe>; constants are the unit-rate third-order reaction coefficient 1/6.Sampled current default-branch runs (status alone is not used to waive failures):
What I did not verify
The full docs build was not rerun locally; the resolver failure occurs before it. No local GPU hardware run, cross-package StochasticDiffEq 2.2 example execution, or complete numerical convergence study was performed.
This review continues the interrupted Codex session 01a18dad-6f75-7ae1-b6dc-3a84553833ec, retaining its exact-head checkouts, CI logs and sequential test evidence. The continuation session is 01a18db8-25fc-7b72-9d35-a1341e0ae484. Initial risk ratings were saved before author descriptions; those descriptions contained embedded earlier reviews, so complete prior-review blindness was not maintained. The initial findings were frozen before the explicit same-head review comparison; additional corroboration is identified as post-freeze. This limitation is disclosed rather than claiming full blind-first compliance.
🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: https://claude.ai/code/session_01379heiiB35TtywhR7uSU74