SciML / DiffEqGPU.jl

GPU-acceleration routines for DifferentialEquations.jl and the broader SciML scientific machine learning ecosystem
https://docs.sciml.ai/DiffEqGPU/stable/
MIT License
272 stars 27 forks source link

Problem with EnsembleGPUArray() when updating library #254

Closed martin-abrudsky closed 1 year ago

martin-abrudsky commented 1 year ago

Hi, I updated the library to version v2.1.0 and the codes that previously worked for me with the EnsembleGPUArray() now throw me the following error

MethodError: no method matching EnsembleGPUArray()
Closest candidates are:
  EnsembleGPUArray(!Matched::Float64) at [~/.julia/packages/DiffEqGPU/USGaj/ext/CUDAExt.jl:8](https://vscode-remote+ssh-002dremote-002bnabucodonosor-002eccad-002eunc-002eedu-002ear.vscode-resource.vscode-cdn.net/users/mabrudsky/FAMAF/Beca_CIN_Trabajo_Final/skymap/GPU_Julia/~/.julia/packages/DiffEqGPU/USGaj/ext/CUDAExt.jl:8)
  EnsembleGPUArray(!Matched::Any) at [~/.julia/packages/DiffEqGPU/USGaj/src/DiffEqGPU.jl:458](https://vscode-remote+ssh-002dremote-002bnabucodonosor-002eccad-002eunc-002eedu-002ear.vscode-resource.vscode-cdn.net/users/mabrudsky/FAMAF/Beca_CIN_Trabajo_Final/skymap/GPU_Julia/~/.julia/packages/DiffEqGPU/USGaj/src/DiffEqGPU.jl:458)
  EnsembleGPUArray(!Matched::Backend, !Matched::Float64) where Backend at [~/.julia/packages/DiffEqGPU/USGaj/src/DiffEqGPU.jl:337](https://vscode-remote+ssh-002dremote-002bnabucodonosor-002eccad-002eunc-002eedu-002ear.vscode-resource.vscode-cdn.net/users/mabrudsky/FAMAF/Beca_CIN_Trabajo_Final/skymap/GPU_Julia/~/.julia/packages/DiffEqGPU/USGaj/src/DiffEqGPU.jl:337)
ChrisRackauckas commented 1 year ago

Yes, there was a breaking change, which is why a new major version was released which signals a breaking update.

@utkarsh530 did you not update the docs?

utkarsh530 commented 1 year ago

@martin-abrudsky You'll need to provide a backend for the GPU codes to compile. For Nvidia GPUs, do something like this:

using CUDA

backend = CUDA.CUDABackend()

solve(monteprob, Tsit5(), EnsembleGPUArray(backend), ...)

Or else reference the tests; they have the updated API. https://github.com/SciML/DiffEqGPU.jl/blob/master/test/ensemblegpuarray.jl#L23 I will update the docs by this weekend.

ChrisRackauckas commented 1 year ago

I enabled doctests so you get build failures for this in the future, and wrote a page on the backends. @utkarsh530 complete https://github.com/SciML/DiffEqGPU.jl/pull/255 and then we can close this.

ChrisRackauckas commented 1 year ago

The new documentation is fully tested at build time and is updated to v2, so after about 20 minutes https://github.com/SciML/DiffEqGPU.jl/pull/255 will have solved this. Thanks for bringing this to my attention.