Fix mass-matrix Rosenbrock test (Float32 dt) and raise downgrade compat floors#462
Merged
ChrisRackauckas merged 1 commit intoJun 23, 2026
Conversation
The CPU/JLArrays/OpenCL/QA test groups all errored on the first test,
test/gpu_kernel_de/stiff_ode/gpu_ode_mass_matrix.jl, with a
`Cannot convert StaticWOperator{Float64} to StaticWOperator{Float32}`
MethodError. The reference CPU bench solve used `dt = 0.1` (Float64) on
an otherwise all-Float32 problem (u0, p, tspan, tolerances are Float32,
and the GPU solve already uses `dt = 0.1f0`). OrdinaryDiffEqRosenbrock's
JacReuseState types its `cached_W` slot from the state eltype (Float32),
but with a Float64 dt `calc_W` builds a Float64 StaticWOperator that
cannot be stored, erroring at OrdinaryDiffEqDifferentiation
derivative_utils.jl:922 (`jac_reuse.cached_W = W`). Use a type-consistent
`dt = 0.1f0` for the bench solve; the GPU-vs-reference tolerance
assertions are unchanged. Verified locally on Julia 1.12 with GROUP=CPU:
the mass-matrix safetestset passes 2/2.
Also raise three compat floors so the Downgrade job can get past the
ModelingToolkit unsatisfiability it currently hits (StaticArrays was
pinned to its 1.9 floor at downgrade, which forced MTK below v11 while
the test pins MTK >= 11.17):
- StaticArrays 1.9 -> 1.9.14 (MTK 10.18-11 needs StaticArrays >= 1.9.14)
- SciMLBase 3 -> 3.1 (lowest MTK compatible with SciMLBase 3 is 11.22;
JumpProcesses 9.25.1+ needs SciMLBase >= 3.1.0, excluding 3.0.0)
- ModelingToolkit 11.17.0 -> 11.23.0 (test; lowest MTK consistent with
the SciMLBase 3.1 and OrdinaryDiffEqRosenbrock 2 floors)
Verified the floor set resolves on Julia 1.10 (SciMLBase 3.1.0 / MTK
11.23.0 / StaticArrays 1.9.14 / OrdinaryDiffEqRosenbrock 2.0.0) and that
normal latest-version resolution is unaffected (SciMLBase 3.21, MTK
11.28, StaticArrays 1.9.18). The Downgrade job may still hit the
pre-existing, maintainer-noted ForwardDiff/LogExpFunctions strict-floor
wall, which is an upstream issue tracked separately.
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
On
master, the CPU / JLArrays / OpenCL / QA test groups (all Julia versions) error on the first test,test/gpu_kernel_de/stiff_ode/gpu_ode_mass_matrix.jl, so every group goes red before reaching anything else:Root cause
The reference CPU bench solve used
dt = 0.1(Float64) on an otherwise all-Float32problem (u0,p,tspan, tolerances areFloat32; the GPU solve already usesdt = 0.1f0).OrdinaryDiffEqRosenbrock'sJacReuseState(added in Rosenbrock 1.31.1 / all 2.x) types itscached_Wslot from the state eltype (Float32), but with aFloat64dt,calc_Wbuilds aFloat64StaticWOperatorthat cannot be stored into theFloat32slot. This is a genuine upstream mixed-precision bug, surfaced here by the test mixing aFloat64dtinto aFloat32problem.Fix
Mass-matrix test: use a type-consistent
dt = 0.1f0for the reference bench solve (matches the Float32 problem and the GPU solve). The GPU-vs-reference tolerance assertions are unchanged — nothing is loosened, skipped, or broken.Downgrade compat floors (the Downgrade job hit a
ModelingToolkitunsatisfiability: at downgradeStaticArrayswas pinned to its1.9floor, forcing MTK below v11 while the test pins MTK ≥ 11.17):StaticArrays1.9→1.9.14(MTK 10.18–11 requires StaticArrays ≥ 1.9.14)SciMLBase3→3.1(lowest MTK compatible with SciMLBase 3 is 11.22; JumpProcesses 9.25.1+ requires SciMLBase ≥ 3.1.0, excluding 3.0.0)ModelingToolkit11.17.0→11.23.0(test; lowest MTK consistent with the SciMLBase 3.1 and OrdinaryDiffEqRosenbrock 2 floors)Verification (local)
GROUP=CPU:GPU Kernelized Stiff ODE Mass Matrixsafetestset passes 2/2..jlis Runic-clean.Notes / out of scope
DimensionMismatch,Rodas5no longer auto-exported by OrdinaryDiffEq v7, and a new ModelingToolkit problem representation that is not GPU-inline-allocatable) that are separate from this PR.Please ignore until reviewed by @ChrisRackauckas