Skip to content

Support independent adaptive OrdinaryDiffEq ensembles - #603

Draft
ChrisRackauckas wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas:ensemble-array-independent-ordinary
Draft

ChrisRackauckas wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas:ensemble-array-independent-ordinary

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex Desktop 0.173.0-alpha.4.1 · Model: gpt-6.2-sol
Conversation: local session 01a23c8e-a01f-7d51-8ec1-ea0e28a2e418 (no session URL)

solve(..., EnsembleGPUArray(backend); independent_adaptivity = true) runs an OrdinaryDiffEq integrator per trajectory. Each integrator controls its own physical time, error estimate, and step acceptance. Outstanding RHS, Jacobian, and time-gradient requests are evaluated in batches on the selected backend, including RHS evaluations with the scalar types used by ForwardDiff.

sol = solve(
    ensemble_prob, Rodas5P(), EnsembleGPUArray(backend);
    trajectories = 1000, batch_size = 128, independent_adaptivity = true, saveat = 0.1
)

OrdinaryDiffEq handles stiff linear solves and factorization reuse on the host. This opt-in path supports saved timesteps and saveat, with dense = false and callback = nothing. It uses read-only trajectory parameters and common GPU-compatible RHS and derivative functions. Each stage batch transfers data between the host and device. Throughput has not been benchmarked.

Verification

  • The new regression on the base commit errors with Unrecognized keyword arguments: [:independent_adaptivity]. On this branch, the mixed-rate regression checks that the difficult trajectory rejects steps and takes more accepted steps, the easy trajectory's saved time grid and states match its singleton solve, and the endpoints agree with separate OrdinaryDiffEq solves. The regression runs Tsit5, Rosenbrock23, Rodas5P, and TRBDF2. Additional cases cover per-trajectory time spans, solver-generated derivatives, and cleanup after an RHS failure.
  • Runic 1.13.0 under Julia 1.13.4, typos, and git diff --check passed.
  • GROUP=CPU runs of test/ensemblegpuarray_independent_ordinary.jl passed 78/78 on Julia 1.10.14 and 1.12.7. The GROUP=JLArrays run passed 76/76 on Julia 1.12.7.
  • GROUP=CUDA julia +release --project=<test environment> test/ensemblegpuarray_independent_ordinary.jl passed 76/76 on an RTX PRO 6000 with Julia 1.13.2.
  • The full GROUP=CUDA julia +release --project -e 'using Pkg; Pkg.test()' run passed the new test set and stopped in test/gpu_kernel_de/stiff_ode/gpu_ode_regression.jl with Out of GPU memory on the shared device. An isolated run of that test file reached the same error on both the base commit and this branch.
  • The full GROUP=CPU julia +release --project -e 'using Pkg; Pkg.test()' and GROUP=QA julia +release --project -e 'using Pkg; Pkg.test()' runs passed on Linux Julia 1.13.2.
  • The full julia +release --project=docs docs/make.jl build passed with CUDA on Linux Julia 1.13.2.
  • A separate CPU run of the mixed-rate test passed 17/17 each with FBDF() and AutoTsit5(Rodas5P()) on Julia 1.12.7.

Links


🤖 Posted by an AI agent — harness: Codex Desktop 0.173.0-alpha.4.1 · model: gpt-6.2-sol
Conversation: local session 01a23c8e-a01f-7d51-8ec1-ea0e28a2e418 (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex Desktop 0.173.0-alpha.4.1
Agent-Model: gpt-6.2-sol
Agent-Session: local session 01a23c8e-a01f-7d51-8ec1-ea0e28a2e418 (no session URL)

This branch has not been deployed

No deployments
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.

1 participant