Adaptive GPUTsit5 accepts an initial step past tf and reports an incorrect final state
I maintainer di solito rispondono entro 2 giorni
@Saswatsusmoy ci sta già lavorando.
Dal 12/9/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- julia
- Ambito
- backend, testing-qa
Direzione di ricerca
Inizia dal punto di ingresso del passo adattivo di GPUTsit5 e riproduci il fallimento usando scratch/short_public_probe.jl con il comando indicato nell’issue. Assicurati che un passo accettato non possa superare il tempo finale, preservando al contempo la corretta gestione dello stato; quindi verifica che la probe pubblica abbia esito positivo ed esamina gli altri kernel adattivi con la stessa struttura di accettazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
On clean master https://github.com/SciML/DiffEqGPU.jl/commit/f1d1f81a2d2a756bd7352c935cc6f1756c8a9af9, adaptive GPUTsit5 can accept an initial step larger than the entire integration interval, then report the final time without correcting the computed state.
Public API reproducer
Julia 1.10.12 (LTS), CPU kernel backend, local environment with DiffEqGPU developed at the clean commit above plus SciMLBase, StaticArrays, and KernelAbstractions:
using DiffEqGPU, SciMLBase, StaticArrays, KernelAbstractions, Test
rhs(u,p,t)=SVector(-u[1],-100*u[2])
prob=ODEProblem{false}(rhs,SVector(1f0,1f0),(0f0,.01f0),SVector(1f0))
sol=solve(EnsembleProblem(prob;prob_func=(prob,ctx)->remake(prob)),GPUTsit5(),EnsembleGPUKernel(CPU(),0.0);trajectories=2,adaptive=true,dt=.1f0,abstol=1f-5,reltol=1f-2,save_everystep=false)
println((t=sol.u[1].t,u=sol.u[1].u,exact=exp.(-SVector(1f0,100f0)*.01f0)))
@test sol.u[1].u[end] ≈ exp.(-SVector(1f0,100f0)*.01f0) rtol=1f-2
Run: julia +lts --project=scratch/short-base-env scratch/short_public_probe.jl.
Two trajectories intentionally exercise EnsembleGPUKernel; the single-trajectory path delegates to an ordinary solver.
Observed, exit status 1:
(t = Float32[0.0, 0.01], u = SVector{2, Float32}[[1.0, 1.0], [0.98403025, 0.20528531]], exact = Float32[0.99004984, 0.36787945])
Test Failed:
Expression: sol.u[1].u[end] ≈ exp.(-SVector(1f0,100f0)*.01f0) rtol=1f-2
Evaluated: Float32[0.98403025, 0.20528531] ≈ Float32[0.99004984, 0.36787945] (rtol=0.01)
A direct integrator probe reports accepted dt = 0.016098652f0 but t = 0.01f0. The initial proposal is 0.1f0; local error rejection reduces it but not enough to fit the interval.
Cause and source history
The adaptive step! reads dt = integ.dtnew without limiting it to tf - t before stage evaluation. Acceptance only limits the next proposal, and if (tf - t - dt) < tolerance sets integ.t = tf while retaining the oversized-step state.
A source-history search traces this structure to the original adaptive Tsit5 kernel added in https://github.com/SciML/DiffEqGPU.jl/commit/c537f8159d168de4f21dd7d6f45bce95b7417c0f and preserved in the integrator extraction https://github.com/SciML/DiffEqGPU.jl/commit/9cc16ac3f949ee267e8585b4d31ca0bcf4ee3e72. This is source provenance, not a completed historical runtime bisect: the original kernel uses CUDA block/thread APIs, and I did not run that 2022 GPU environment. No earlier passing runtime baseline was established.
Diagnostic repair
In an isolated worktree, adding dt = min(dt, tf - t) immediately after loading tf in the adaptive Tsit5 step makes the identical public test pass (exit status 0):
(t = Float32[0.0, 0.01], u = SVector{2, Float32}[[1.0, 1.0], [0.99004984, 0.3680994]], exact = Float32[0.99004984, 0.36787945])
This establishes the forward-time fix direction. A production repair should handle time direction consistently and audit the other adaptive kernels with the same acceptance structure. Only CPU GPUTsit5 was executed here; GPU hardware, reverse-time cases, other solvers, and the full suite were not tested. No main feature worktree was changed.
AI investigation: Codex (harness version unknown; exact model ID unknown). Local session ID: 01a07fcc-1c4f-7ee3-9a1e-51eaab7df293; no shareable conversation URL exposed.
- Lingua principale
- Julia
- Stelle
- 331
- Fork
- 43
- Merge medio
- 1g 20h
- PR unite (30g)
- 10
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SciML/DiffEqGPU.jl
-
Adaptive kernel steppers: t += dt rounding decouples time from integrated length at large tForse già presa @ChrisRackauckas-Claude l’ha presa 42 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SciML/DiffEqGPU.jl#567 ·
I maintainer di solito rispondono entro 2 giorni
-
Adaptive kernel: ContinuousCallback just before a tstop suppresses the tstop's DiscreteCallbackAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
SciML/DiffEqGPU.jl#558 ·
I maintainer di solito rispondono entro 2 giorni
-
GPUVern7 Float32 dense output is ~60 ulps off at mid-step for a constant RHS (visible at tstops)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
SciML/DiffEqGPU.jl#554 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SciML/DiffEqGPU.jl#546 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
SciML/DiffEqGPU.jl#540 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di SciML/DiffEqGPU.jl
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
I maintainer di solito rispondono entro 3 giorni
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
FluxML/Optimisers.jl#253 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno