Skip to content

Add downstream ODE regression test for immutable-outer VectorOfArray - #637

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:test/voa-svector-outer-odesolve
Aug 3, 2026
Merged

Add downstream ODE regression test for immutable-outer VectorOfArray#637
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:test/voa-svector-outer-odesolve

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore until reviewed by @ChrisRackauckas.

Follow-up to #636, which fixed recursivecopy for a VectorOfArray whose outer storage is immutable. With that fix on master the original MWE from SciML/OrdinaryDiffEq.jl#1365 now solves end to end, but nothing in the test suite covers the ODE path — PR #636 only unit-tested recursivecopy. This adds that coverage in test/Downstream/odesolve.jl: an in-place solve of VectorOfArray(SVector{2}([randn(5), randn(5)])) with Tsit5 and Rosenbrock23, checking the return code, that the outer SVector storage is preserved through to sol.u[end], and accuracy against the analytic solution.

Also flips the nested-ArrayPartition Rodas5 @test_broken to @test. That path was fixed upstream in OrdinaryDiffEqRosenbrock v2.6.1, so on current versions the @test_broken reports Unexpected Pass, which errors the testset — test/Downstream is red on master today independent of this PR. Bisected across registered versions locally:

  • OrdinaryDiffEqRosenbrock v2.4.2 and v2.6.0: MethodError: Cannot convert an object of type Vector{Float64} to an object of type ArrayPartition{...}
  • v2.6.1 and v2.6.3: ReturnCode.Success, deterministic over repeated runs

The compat floor in the Downstream test env is raised to 2.6.1 to match.

Verification

Run locally on Julia 1.11.9 against master + this change, RecursiveArrayTools dev'd, OrdinaryDiffEq v7.2.1, OrdinaryDiffEqRosenbrock v2.6.3:

Test Summary:   | Pass  Total     Time
ODE Solve Tests |   11     11  2m11.9s

Before the change the same file errors on the @test_broken:

ODE Solve Tests: Error During Test at test/Downstream/odesolve.jl:55
 Unexpected Pass
 Expression: (solve(ODEProblem(dyn, ArrayPartition(...), (0.0, 1.0)), Rodas5())).retcode == ReturnCode.Success
Test Summary:   | Pass  Error  Total     Time
ODE Solve Tests |   10      1     11  2m13.4s

The new test also fails as expected against released RecursiveArrayTools v4.3.5 (without PR #636), at recursivecopy in src/utils.jl:38:

setindex!(::SVector{2, Vector{Float64}}, ...) is not defined

Runic formatted.

Links

🤖 Generated with Claude Code

https://claude.ai/code/session_018DPqBz4Qyy7bZzXZ3sjF45

Covers the full solve path from SciML/OrdinaryDiffEq.jl#1365: a
VectorOfArray backed by an SVector of vectors, solved in place with
Tsit5 and Rosenbrock23, checking retcode, preserved container type and
accuracy against the analytic solution.

Also un-breaks the nested ArrayPartition Rodas5 test. That path was
fixed by OrdinaryDiffEqRosenbrock v2.6.1, so the @test_broken now
errors with "Unexpected Pass" on current versions; the compat floor in
the Downstream env is raised to match.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review August 3, 2026 17:27
@ChrisRackauckas
ChrisRackauckas merged commit bfeef92 into SciML:master Aug 3, 2026
37 of 43 checks passed
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI confirms the @test_broken diagnosis. tests / Downstream on this PR:

job this PR (#637) #638 (version-string bump only, i.e. master's behavior)
tests / Downstream (julia 1) pass fail
tests / Downstream (julia lts) pass fail
tests / Downstream (julia pre) pass fail

#638 changes nothing but version = "4.3.5""4.3.6", so its red Downstream group is master's current state, and this PR is what makes it green again.

The remaining red checks are identical on both PRs and unrelated to VectorOfArray/recursivecopy — pre-existing breakage from upstream version drift since master last ran CI on 2026-07-24:

  • Downgrade (Core)Unsatisfiable requirements ... no versions left during resolution
  • LabelledArrays.jl/CoreFieldError: type StaticArraysCore.SizedArray has no field y
  • OrdinaryDiffEq.jl/Downstream (DiffEqBase tests) — ArgumentError: array of type Diagonal{Float64, Vector{Float64}} and size (2, 2) under Rosenbrock23 with sparse AD
  • SciMLSensitivity.jl/Core1MethodError: Cannot convert Vector{ReverseDiff.TrackedReal{...}} to ReverseDiff.TrackedArray{...}

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