rest-for-physics / restG4

A generic Geant4 code project that uses the REST Geant4 library to define the simulation conditions and collect the simulated results as a ROOT file, in the form of REST c++ objects. restG4 just requires two inputs, and RML file defining the simulation conditions and a GDML geometry file.
3 stars 5 forks source link

Are there any ongoing development for GPU processing? #111

Open girardcarillo opened 1 year ago

girardcarillo commented 1 year ago

Hi everyone,

I was wondering if there was any ongoing development on GPU processing, to accelerate simulation production, for example.

Thanks, Cloe

lobis commented 1 year ago

I was also interested on this topic in the past and to my knowledge currently it's not possible to leverage the GPU in radiation transport simulations, atleast not in a stable way.

Searching GitHub there are some abandoned projects related to this, such as https://github.com/studouglas/GEANT4-GPU.

In my limited knowledge I think this is very hard to do because even though GPUs excel at parallel computation, there are other things at play here such as data transfer overhead from the CPU to the GPU (since GPUs use their own memory) which I suspect heavily limits the performance. I guess theoretically this could be overcome by code designed to use the GPU from the start, but all the radiation transport codes such as Geant4 were created before GPU usage was as widespread as today.

I am also surpriced that there has not been a significant effort to rewrite simulation codes for the GPU so I suspect the overheads I mentioned (or some other) may make this not worth it, but I have not read a paper that clearly outlines this, if you find it let me know!

JCCPort commented 1 year ago

@lobis this would be for optical photon processing mainly.

You might not be aware of this project: https://github.com/simoncblyth/opticks

It looks promising, but is very early in development with a pretty painful installation process/instructions...