I've found problem on another system, but for MRE I reproduce it with lorenz equation, and got the same behavior.
Batch solve failed
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] #112
@ ~/.julia/packages/DiffEqGPU/0Jmg9/src/solve.jl:181 [inlined]
[3] (::DiffEqGPU.var"#112#128"{SciMLBase.EnsembleProblem{SciMLBase.ODEProblem{StaticArraysCore.SVector{3, Float32}, Tuple{Float32, Float32}, false, StaticArraysCore.SVector{3, Float32}, SciMLBase.ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.var"workspace#2".lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, var"#27#28"{typeof(SciMLBase.remake), StaticArraysCore.SVector{3, Float32}, DataType, typeof(*)}, typeof(SciMLBase.DEFAULT_OUTPUT_FUNC), typeof(SciMLBase.DEFAULT_REDUCTION), Nothing}, DiffEqGPU.GPUTsit5, Matrix{Float32}})(i::Int64)
@ DiffEqGPU ./none:0
[4] iterate
@ ./generator.jl:48 [inlined]
[5] collect(itr::Base.Generator{Base.OneTo{Int64}, DiffEqGPU.var"#112#128"{SciMLBase.EnsembleProblem{SciMLBase.ODEProblem{StaticArraysCore.SVector{3, Float32}, Tuple{Float32, Float32}, false, StaticArraysCore.SVector{3, Float32}, SciMLBase.ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.var"workspace#2".lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, var"#27#28"{typeof(SciMLBase.remake), StaticArraysCore.SVector{3, Float32}, DataType, typeof(*)}, typeof(SciMLBase.DEFAULT_OUTPUT_FUNC), typeof(SciMLBase.DEFAULT_REDUCTION), Nothing}, DiffEqGPU.GPUTsit5, Matrix{Float32}}})
@ Base ./array.jl:791
[6] batch_solve(ensembleprob::SciMLBase.EnsembleProblem{SciMLBase.ODEProblem{StaticArraysCore.SVector{3, Float32}, Tuple{Float32, Float32}, false, StaticArraysCore.SVector{3, Float32}, SciMLBase.ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.var"workspace#2".lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, var"#27#28"{typeof(SciMLBase.remake), StaticArraysCore.SVector{3, Float32}, DataType, typeof(*)}, typeof(SciMLBase.DEFAULT_OUTPUT_FUNC), typeof(SciMLBase.DEFAULT_REDUCTION), Nothing}, alg::DiffEqGPU.GPUTsit5, ensemblealg::DiffEqGPU.EnsembleGPUKernel{CUDA.CUDAKernels.CUDABackend}, I::UnitRange{Int64}, adaptive::Bool; kwargs::@Kwargs{unstable_check::DiffEqGPU.var"#100#106", dt::Float64})
@ DiffEqGPU ~/.julia/packages/DiffEqGPU/0Jmg9/src/solve.jl:175
[7] macro expansion
@ ./timing.jl:421 [inlined]
[8] __solve(ensembleprob::SciMLBase.EnsembleProblem{SciMLBase.ODEProblem{StaticArraysCore.SVector{3, Float32}, Tuple{Float32, Float32}, false, StaticArraysCore.SVector{3, Float32}, SciMLBase.ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.var"workspace#2".lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, var"#27#28"{typeof(SciMLBase.remake), StaticArraysCore.SVector{3, Float32}, DataType, typeof(*)}, typeof(SciMLBase.DEFAULT_OUTPUT_FUNC), typeof(SciMLBase.DEFAULT_REDUCTION), Nothing}, alg::DiffEqGPU.GPUTsit5, ensemblealg::DiffEqGPU.EnsembleGPUKernel{CUDA.CUDAKernels.CUDABackend}; trajectories::Int64, batch_size::Int64, unstable_check::Function, adaptive::Bool, kwargs::@Kwargs{dt::Float64})
@ DiffEqGPU ~/.julia/packages/DiffEqGPU/0Jmg9/src/solve.jl:55
[9] solve(::SciMLBase.EnsembleProblem{SciMLBase.ODEProblem{StaticArraysCore.SVector{3, Float32}, Tuple{Float32, Float32}, false, StaticArraysCore.SVector{3, Float32}, SciMLBase.ODEFunction{false, SciMLBase.AutoSpecialize, typeof(Main.var"workspace#2".lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, var"#27#28"{typeof(SciMLBase.remake), StaticArraysCore.SVector{3, Float32}, DataType, typeof(*)}, typeof(SciMLBase.DEFAULT_OUTPUT_FUNC), typeof(SciMLBase.DEFAULT_REDUCTION), Nothing}, ::DiffEqGPU.GPUTsit5, ::Vararg{Any}; kwargs::@Kwargs{trajectories::Int64, dt::Float64})
@ DiffEqBase ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:1221
[10] solve
@ ~/.julia/packages/DiffEqBase/qvEPa/src/solve.jl:1218 [inlined]
[11] ##function_wrapped_cell#823
@ ~/.julia/pluto_notebooks/Tiny magic.jl#==#42d6c72a-62d0-4f32-9b32-c373ccda448d:1 [inlined]
Describe the bug 🐞
When I trying to solve in backward direction I always get a batch solve failed with collapsed bounds of
tspan(e.g. if I set uptspan = (-1.0, -3.0)it will show thattspanis-1.0f0andts = [-1.0, -1.0]). I've tried to use either positive or negative values ofdt, several kernels (GPUTsit5, GPUVern9, etc).Expected behavior
The negative
tspandirection should work the same way as positive.Minimal Reproducible Example 👇
I've found problem on another system, but for MRE I reproduce it with lorenz equation, and got the same behavior.
Error & Stacktrace⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)versioninfo()