Skip to content

Enable vector time for adaptive OrdinaryDiffEq ensembles - #604

Draft
ChrisRackauckas wants to merge 4 commits into
SciML:masterfrom
ChrisRackauckas:ensemble-array-vector-time
Draft

ChrisRackauckas wants to merge 4 commits into
SciML:masterfrom
ChrisRackauckas:ensemble-array-vector-time

Conversation

@ChrisRackauckas

@ChrisRackauckas ChrisRackauckas commented Dec 3, 2026 •

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)

independent_adaptivity = true packs each EnsembleGPUArray batch into an ODEProblem with device-backed start and end vectors. Standard init and solve! advance one OrdinaryDiffEq integrator per batch. Each trajectory has an independent physical clock, timestep, PI history, retry state, and save times.

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

The mode supports Tsit5 and Rodas5P, with a scalar or per-trajectory initial dt. It uses dense = false and callback = nothing. Requested saveat times are step endpoints. Rodas5P uses an identity mass matrix. DiffEqGPU configures the packed algorithm's linsolve with the device factorization, and the regular Rosenbrock cache reuses the factors across a trial. Rodas5P() retains its default AutoForwardDiff() on the device RHS. Analytic jac and tgrad are optional.

Registry-only CI requires the companion OrdinaryDiffEq releases. OrdinaryDiffEqCore 4.21, OrdinaryDiffEqTsit5 2.2, and OrdinaryDiffEqRosenbrock 2.8 are absent from General. The paired environment develops both source branches directly.

Verification

  • The feature regression on the base commit errors with Unrecognized keyword arguments: [:independent_adaptivity].

  • In a paired source environment, GROUP=CPU julia --project="$PAIRED_ENV" test/ensemblegpuarray_vector_time.jl passed 139/139. The same command with GROUP=CUDA passed 133/133 on a Jetson AGX Orin. The tests cover default Rodas5P with both RHS forms, comparison to scalar references, independent retry grids, staggered endpoints, stiff failure isolation, and saved physical times.

  • Runic, typos, and git diff --check passed.

  • The full GROUP=CPU and GROUP=QA suites passed with julia --project="$PAIRED_ENV" -e 'using Pkg; Pkg.test("DiffEqGPU")' on Linux Julia 1.13.2.

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)

ChrisRackauckas and others added 2 commits December 3, 2026 19:06
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)
Initialize an ODEProblem with the backend's start and end vectors.
Advance it with solve! and read per-trajectory statistics from Core.

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)
@ChrisRackauckas

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

The follow-up commit constructs a standard ODEProblem with (tstarts, tends) on the selected backend and advances it with init and solve!. The public integration test passed 97/97 on CPU and 91/91 on a CUDA Jetson AGX Orin with the companion sources. Registry-only CI depends on the companion OrdinaryDiffEq releases.

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)

Evaluate the ordinary ForwardDiff path through the existing device RHS.
Cover coupled nonautonomous trajectories, staggered spans, and both
in-place and out-of-place RHS functions with default Rodas5P.

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)
@ChrisRackauckas

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

The follow-up commit tests the default Rodas5P() on independent-clock ensembles with in-place and out-of-place RHS functions. OrdinaryDiffEq's ForwardDiff passes use the existing device RHS kernel. The tests compare scalar solves, check independent rejection histories and accepted time grids, and include staggered physical spans with saveat.

The paired integration file passed 139/139 on CPU and 133/133 on CUDA on a Jetson AGX Orin. Registry-only CI still needs the companion package releases.

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)

Configure the packed trajectory algorithm with SciMLBase.remake so
OrdinaryDiffEq initializes its regular Rosenbrock cache and selects the
backend factorization while retaining the default autodiff algorithm.

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)
@ChrisRackauckas

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

This update puts the device factorization on Rodas5P.linsolve through SciMLBase.remake. Rodas5P() uses its regular cache and default ForwardDiff in the paired OrdinaryDiffEq source. The integration file passed 139/139 on CPU and 133/133 on CUDA, including both RHS forms.


🤖 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)

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