Repository navigation
Standardize QA test environments across sublibraries - #3439
Merged
ChrisRackauckas merged 2 commits intoApr 15, 2026
Merged
ChrisRackauckas merged 2 commits into
ChrisRackauckas merged 2 commits into
Conversation
Moves JET, Aqua, and AllocCheck tests into test/qa/ with an isolated
Project.toml per sublibrary, following the pattern established by
test/gpu/. Removes inline Pkg.add("JET")/Pkg.add("Aqua") calls from
test files so heavy tooling lives only in the QA env, not in each
sublibrary's [extras]. Documents the "one Project.toml per test group"
convention in CONTRIBUTING.md and compute_affected_sublibraries.jl.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
They were also left in [targets].test when removed from [extras] — Pkg's project validator rejects a target that names a package not declared in deps/weakdeps/extras, which broke every job that Pkg.develops BDF (docs build, all sublibrary tests). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/OrdinaryDiffEq.jl
that referenced
this pull request
Apr 15, 2026
…ly import
The package imports SVector from StaticArraysCore rather than full
StaticArrays, which only supplies the tuple-form constructor and
leaves out the varargs constructor and getindex. In the isolated QA
test environment (no transitive StaticArrays) this surfaced two
distinct failures:
1. SERK2, ESERK4, ESERK5 cache construction failed because the
struct fields ms/Cᵤ/Cₑ were typed as SVector{N, Int} but the
tableaus returned plain Vector{Int}, and no Vector -> SVector
convert method was available.
2. ROCK2 and ROCK4 cache construction failed because the tableaus
called SVector{N, Int}(args...) with 46 / 50 varargs, a
constructor not defined in StaticArraysCore.
3. ROCK4 perform_step failed with CanonicalIndexError on
SVector{6, Float64} because StaticArraysCore does not define
getindex for SArray.
Switch the ms / fp1 / fp2 / Cᵤ / Cₑ struct fields to plain Vector
(they are built once per cache at solve time and indexed, so the
SVector specialization is not buying anything in the hot loop) and
drop the SVector wrapping from the ROCK2 / ROCK4 tableaus. Convert
the ROCK4 per-step tableau blocks from SVector{N, T} to NTuple{N, T}
to preserve the static-length, tuple-indexable shape without
requiring the full StaticArrays package.
Also fix a separate JET regression introduced in SciML#3420 (TSRKC3):
dtsw0 and d2tsw0 are defined only in the non-rkcstep branch but
read unconditionally in a later if (!rkcstep) block; JET flagged
them as possibly-undefined. Initialize both to
zero(typeof(cache.tsw0)) (and the constantcache variant) before
the branch so the definitions dominate every use.
Fixes CI failures in the OrdinaryDiffEqStabilizedRK_QA sublibrary
job exposed by SciML#3439 and the TSRKC3 JET failure introduced by SciML#3420.
Co-Authored-By: Chris Rackauckas <[email protected]>
2 of 3 tasks
ChrisRackauckas
added a commit
that referenced
this pull request
Apr 15, 2026
…ly import (#3442) The package imports SVector from StaticArraysCore rather than full StaticArrays, which only supplies the tuple-form constructor and leaves out the varargs constructor and getindex. In the isolated QA test environment (no transitive StaticArrays) this surfaced two distinct failures: 1. SERK2, ESERK4, ESERK5 cache construction failed because the struct fields ms/Cᵤ/Cₑ were typed as SVector{N, Int} but the tableaus returned plain Vector{Int}, and no Vector -> SVector convert method was available. 2. ROCK2 and ROCK4 cache construction failed because the tableaus called SVector{N, Int}(args...) with 46 / 50 varargs, a constructor not defined in StaticArraysCore. 3. ROCK4 perform_step failed with CanonicalIndexError on SVector{6, Float64} because StaticArraysCore does not define getindex for SArray. Switch the ms / fp1 / fp2 / Cᵤ / Cₑ struct fields to plain Vector (they are built once per cache at solve time and indexed, so the SVector specialization is not buying anything in the hot loop) and drop the SVector wrapping from the ROCK2 / ROCK4 tableaus. Convert the ROCK4 per-step tableau blocks from SVector{N, T} to NTuple{N, T} to preserve the static-length, tuple-indexable shape without requiring the full StaticArrays package. Also fix a separate JET regression introduced in #3420 (TSRKC3): dtsw0 and d2tsw0 are defined only in the non-rkcstep branch but read unconditionally in a later if (!rkcstep) block; JET flagged them as possibly-undefined. Initialize both to zero(typeof(cache.tsw0)) (and the constantcache variant) before the branch so the definitions dominate every use. Fixes CI failures in the OrdinaryDiffEqStabilizedRK_QA sublibrary job exposed by #3439 and the TSRKC3 JET failure introduced by #3420. Co-authored-by: ChrisRackauckas-Claude <[email protected]>
2 tasks
singhharsh1708
pushed a commit
to singhharsh1708/OrdinaryDiffEq.jl
that referenced
this pull request
Apr 16, 2026
* standardize QA test environments across all sublibraries
Moves JET, Aqua, and AllocCheck tests into test/qa/ with an isolated
Project.toml per sublibrary, following the pattern established by
test/gpu/. Removes inline Pkg.add("JET")/Pkg.add("Aqua") calls from
test files so heavy tooling lives only in the QA env, not in each
sublibrary's [extras]. Documents the "one Project.toml per test group"
convention in CONTRIBUTING.md and compute_affected_sublibraries.jl.
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
* fix: drop JET and Aqua from OrdinaryDiffEqBDF test target
They were also left in [targets].test when removed from [extras] — Pkg's
project validator rejects a target that names a package not declared in
deps/weakdeps/extras, which broke every job that Pkg.develops BDF
(docs build, all sublibrary tests).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
---------
Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
singhharsh1708
pushed a commit
to singhharsh1708/OrdinaryDiffEq.jl
that referenced
this pull request
Apr 16, 2026
…ly import (SciML#3442) The package imports SVector from StaticArraysCore rather than full StaticArrays, which only supplies the tuple-form constructor and leaves out the varargs constructor and getindex. In the isolated QA test environment (no transitive StaticArrays) this surfaced two distinct failures: 1. SERK2, ESERK4, ESERK5 cache construction failed because the struct fields ms/Cᵤ/Cₑ were typed as SVector{N, Int} but the tableaus returned plain Vector{Int}, and no Vector -> SVector convert method was available. 2. ROCK2 and ROCK4 cache construction failed because the tableaus called SVector{N, Int}(args...) with 46 / 50 varargs, a constructor not defined in StaticArraysCore. 3. ROCK4 perform_step failed with CanonicalIndexError on SVector{6, Float64} because StaticArraysCore does not define getindex for SArray. Switch the ms / fp1 / fp2 / Cᵤ / Cₑ struct fields to plain Vector (they are built once per cache at solve time and indexed, so the SVector specialization is not buying anything in the hot loop) and drop the SVector wrapping from the ROCK2 / ROCK4 tableaus. Convert the ROCK4 per-step tableau blocks from SVector{N, T} to NTuple{N, T} to preserve the static-length, tuple-indexable shape without requiring the full StaticArrays package. Also fix a separate JET regression introduced in SciML#3420 (TSRKC3): dtsw0 and d2tsw0 are defined only in the non-rkcstep branch but read unconditionally in a later if (!rkcstep) block; JET flagged them as possibly-undefined. Initialize both to zero(typeof(cache.tsw0)) (and the constantcache variant) before the branch so the definitions dominate every use. Fixes CI failures in the OrdinaryDiffEqStabilizedRK_QA sublibrary job exposed by SciML#3439 and the TSRKC3 JET failure introduced by SciML#3420. Co-authored-by: ChrisRackauckas-Claude <[email protected]>
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.
Summary
Builds on #3383 to finish the QA refactor and standardize the pattern. Now that every solver subpackage has
test/qa/Project.tomlfor AllocCheck, move JET and Aqua into the same isolated environment instead of inlinePkg.addcalls, and apply the same layout to the remaining sublibraries that were not touched by #3383.jet.jl,qa.jl, andallocation_tests.jlintotest/qa/across every sublibrary that has QA tests (~35 packages).test/qa/Project.tomlwithJETandAquadeps (with[sources]entries resolving internal deps to in-tree paths, like thegpu/envs do).using Pkg; Pkg.add("JET")/Pkg.add("Aqua")shims from test files.JETandAquafrom each sublibrary's main[extras]and[compat]— they no longer need to live in the main test env, only in the QA env.runtests.jlin each sublibrary so the QA group activatestest/qa/once and runs alloc + JET + Aqua against it.test/qa/environment to the sublibraries that were skipped by feat: add AllocCheck.jl allocation tests across all solver packages #3383 (they had inlinePkg.addonly):ImplicitDiscreteSolve,SimpleImplicitDiscreteSolve,OrdinaryDiffEqCore,OrdinaryDiffEqDefault,OrdinaryDiffEqDifferentiation,OrdinaryDiffEqNonlinearSolve,OrdinaryDiffEqRKIP.Project.tomlper test group" convention inCONTRIBUTING.mdand references it from.github/scripts/compute_affected_sublibraries.jl.Why
Pkg.addat test time is flaky (hits the registry on every run, can install versions outside the compat ranges declared elsewhere, and mutates whatever environment happens to be active).[extras]was dead weight — nothing in[targets].testused them.gpu/group already demonstrates the "isolatedtest/<group>/Project.toml" pattern; this PR makes it the standard for every group that needs extra deps.Test plan
ODEDIFFEQ_TEST_GROUP=QA julia --project=. -e 'using Pkg; Pkg.test()'locally onOrdinaryDiffEqCore→ AllocCheck / JET (30 pass, 1 broken) / Aqua (9 pass) all green.OrdinaryDiffEqSDIRK→ Allocation Tests (29 broken, matching main), JET (1 pass), Aqua (11 pass), Convergence (80 pass, 2 broken), DAE (8 pass).OrdinaryDiffEqTsit5→ Allocation (1 pass), JET (1 pass, 2 broken), Aqua (11 pass).ImplicitDiscreteSolve→ JET (1 pass), Aqua (10 pass).