# Results of SecondOrderODEProblem give ERROR: This object is not a GPU array

**URL:** <https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100>\
**Category:** General Usage\
**Tags:** cuda, differentialequation\
**Created:** [June 2, 2022, 2:02am UTC](https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100 "2022-06-02T02:02:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)\
**Post date:** [June 2, 2022, 2:02am UTC](https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100/1 "2022-06-02T02:02:47Z")

</div>

This is a sample code I found on [DiffEqGPU](https://docs.juliahub.com/DiffEqGPU/8rwkT/1.13.0/#DiffEqGPU).  
I can easily get results using Array(sol) for 1st order ODE, but for 2nd order, it returns “ERROR: This object is not a GPU array”

Thanks for the help!!

`
# -------------------------------
u0 = cu(rand(100))
A = cu(randn(100,100))
f(du,u,p,t) = mul!(du,A,u)
prob = ODEProblem(f,u0,(0.0f0,1.0f0))
sol = solve(prob,Tsit5())
Array(sol)
# -------------------------------
u0 = cu(rand(100))
du0 = cu(rand(100))
A = cu(randn(100,100))
f(ddu,du,u,p,t) = mul!(ddu,A,u)
prob = SecondOrderODEProblem(f,du0,u0,(0.0f0,1.0f0))
sol = solve(prob,Tsit5())
`

`Array(sol)
`

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [June 4, 2022, 11:41am UTC](https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100/2 "2022-06-04T11:41:51Z")

</div>

Seems like there was a missing conversion function. Solved in [Fix ArrayPartition CuArray transformation by ChrisRackauckas · Pull Request #209 · SciML/RecursiveArrayTools.jl · GitHub](https://github.com/SciML/RecursiveArrayTools.jl/pull/209)

---

<div class="post-metadata">

**Author:** ![Molox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/molox/32/35002_2.png) [@Molox](https://discourse.julialang.org/u/Molox)\
**Post date:** [June 6, 2022, 9:02pm UTC](https://discourse.julialang.org/t/results-of-secondorderodeproblem-give-error-this-object-is-not-a-gpu-array/82100/3 "2022-06-06T21:02:47Z")

</div>

Thank you Chris!!
