m3g / CellListMap.jl

Flexible implementation of cell lists to map the calculations of particle-pair dependent functions, such as forces, energies, neighbor lists, etc.
https://m3g.github.io/CellListMap.jl/
MIT License
87 stars 4 forks source link

Is GPU support being planned? #59

Open AhmedSalih3d opened 2 years ago

AhmedSalih3d commented 2 years ago

Hi!

Thank you for this incredible tool for working with particle based cases. I am developing a post-processing tool https://github.com/AhmedSalih3d/PostSPH.jl directed at a software package called DualSPHysics (https://dual.sphysics.org/).

I have been using the current implementation of CellListMap (CPU based) and found that it is much faster than anything I have been able to write from hand, so I would of course want to make use of it in my package when post-processing different quantities.

The reason I ask about GPU is that it would be quite impressive being able to switch between CPU/GPU based on task and in the future I hope to write some small SPH simulations, which would greatly benefit from a GPU implementation of this library.

Please do not take me making this issue as a "demand", I just share in your passion about efficient neighbour algorithms for particle simulations! 😊

lmiq commented 2 years ago

That is certainly something I want to explore in the future. I'm not sure if I can provide a reasonable interface for any pairwise computation, as happens currently with the package, but it may be interesting to have a neighborlist function implemented for the GPU. Maybe that will be a new package. But, unfortunately, that is not in the timeline for the near future, I don't think I will be able to get started with that this year, for instance.

AhmedSalih3d commented 2 years ago

Thanks for the response!

Fantastic to hear that you have been having some of the same thoughts and understandable that it is quite difficult to implement (so most likely not this year).

I can atleast share that it will be a huge game changer to have a neighbour list algorithm "built-in" into Julia. I am not aware of any other approach to do this in Julia, other than perhaps ParallelStencil.jl

Kind regards