Adaptive kernel: ContinuousCallback just before a tstop suppresses the tstop's DiscreteCallback
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Run the CPU reproducer and inspect step! together with change_t_via_interpolation! in src/ensemblegpukernel/integrators/integrator_utils.jl. Trace how the tstop index is consumed when the continuous event rewinds time, then add a regression test based on the shown case. Done means the tstop DiscreteCallback fires and each trajectory ends near 11.25.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In an adaptive EnsembleGPUKernel solve, a DiscreteCallback keyed to a tstop is silently skipped when a ContinuousCallback fires shortly before that stop.
Reproducer (CPU backend, no GPU needed):
using DiffEqGPU, SciMLBase, StaticArrays, KernelAbstractions, Test
cc = ContinuousCallback((u, t, i) -> t - 0.8749f0, i -> (i.u += SVector(1f0, 1f0)); save_positions = (false, false))
dc = DiscreteCallback((u, t, i) -> t == 0.875f0, i -> (i.u += SVector(10f0, 10f0)); save_positions = (false, false))
prob = ODEProblem{false}((u, p, t) -> SVector(1f0, 1f0), SVector(0f0, 0f0), (0.75f0, 1f0))
sol = solve(EnsembleProblem(prob), GPUTsit5(), EnsembleGPUKernel(CPU(), 0.0); trajectories = 2,
adaptive = true, dt = 0.0625f0, tstops = Float32[0.8125, 0.875, 0.9375],
callback = CallbackSet(cc, dc), merge_callbacks = true, abstol = 1f-9, reltol = 1f-6,
save_everystep = false)
@test all(s -> s.u[end] ≈ SVector(11.25f0, 11.25f0), sol.u) # 0 + 0.25 + 1 (cc) + 10 (dc)
Julia 1.12.7, final state (expected 11.25):
| revision | final state |
|---|---|
b3d6a17 (before https://github.com/SciML/DiffEqGPU.jl/pull/544) |
1.2499999 |
master 8118688 |
1.25 |
| https://github.com/SciML/DiffEqGPU.jl/pull/556 head | 1.25 |
The continuous event fires, but the tstop callback does not. The review that found this suggests, from reading the source, that the tstop index is consumed in step! before the continuous callback rewinds time to the event (change_t_via_interpolation! in src/ensemblegpukernel/integrators/integrator_utils.jl). The stop at 0.875 is then never revisited. That is not confirmed by a bisect or a fix.
Found during review of https://github.com/SciML/DiffEqGPU.jl/pull/556, which does not change this behaviour.
🤖 Generated with Claude Code (model: claude-opus-5-5[1m])
- 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
-
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
-
Adaptive GPUTsit5 accepts an initial step past tf and reports an incorrect final stateForse già presa @Saswatsusmoy l’ha presa 61 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
SciML/DiffEqGPU.jl#535 ·
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