diff --git a/test/GPU/Project.toml b/test/GPU/Project.toml index 6a151241..56f541d8 100644 --- a/test/GPU/Project.toml +++ b/test/GPU/Project.toml @@ -3,6 +3,8 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" RecursiveArrayToolsArrayPartitionAnyAll = "172d604e-c495-4f00-97bf-d70957099afa" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" @@ -17,6 +19,8 @@ Adapt = "4" ArrayInterface = "7.17.0" CUDA = "6" KernelAbstractions = "0.9.36" +LinearAlgebra = "1.10" +OrdinaryDiffEq = "6.31, 7" RecursiveArrayTools = "4" RecursiveArrayToolsArrayPartitionAnyAll = "1" Test = "1" diff --git a/test/GPU/ode_gpu.jl b/test/GPU/ode_gpu.jl index e8f3f00c..be30cdab 100644 --- a/test/GPU/ode_gpu.jl +++ b/test/GPU/ode_gpu.jl @@ -1,4 +1,4 @@ -using CUDA, LinearAlgebra, OrdinaryDiffEq +using CUDA, LinearAlgebra, OrdinaryDiffEq, Test u0 = cu(rand(100)) @@ -10,7 +10,8 @@ prob = ODEProblem(f, u0, (0.0f0, 1.0f0)) sol = solve(prob, Tsit5()) -Array(sol) +@test SciMLBase.successful_retcode(sol) +@test size(Array(sol), 1) == 100 # https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100 @@ -26,4 +27,5 @@ prob = SecondOrderODEProblem(f, du0, u0, (0.0f0, 1.0f0)) sol = solve(prob, Tsit5()) -CuArray(sol) +@test SciMLBase.successful_retcode(sol) +@test size(CuArray(sol), 1) == 200 diff --git a/test/runtests.jl b/test/runtests.jl index 0c4148f8..b50e7b45 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -60,7 +60,8 @@ run_tests(; ], body = function () @time @safetestset "VectorOfArray GPU" include("GPU/vectorofarray_gpu.jl") - return @time @safetestset "ArrayPartition GPU" include("GPU/arraypartition_gpu.jl") + @time @safetestset "ArrayPartition GPU" include("GPU/arraypartition_gpu.jl") + return @time @safetestset "ODE GPU" include("GPU/ode_gpu.jl") end, ), "NoPre" => (;