CudaaduC:
It is not possible to just “use nvcc” to compile the massive Geant4 code base into a fully functional integrated GPU enabled of Geant4.
Geant4 is a multi-purpose highly modular single threaded CPU application which is written in C++. Because it is meant to be very versatile this makes GPU acceleration difficult, as it is thousands of lines of very complicated object-oriented code which was written by many engineers over the course of 15 years.
Currently I am working on a Geant4 project which will enable GPU acceleration for x-ray simulations only, and I am basically writing a plug-in from scratch which will be called from the main application.
Also keep in mind that any Monte Carlo simulation will consist of very complex code, particularly related to how to represent the geometry and detectors. All Geant4 GPU work I am aware of to date uses a voxelized representation of the “world”. Also secondary particle generation is tricky in a parallel architecture, so whoever will be handling this in your group should have a great deal of experience with CUDA programming.
So basically I am saying that this is a much bigger project than you think, and you will need much time and experience (with CUDA and C programming not high-level physics) to complete.
The performance gain will be significant, but nothing this ambitious will be easy, free or quick.
Thanks for your reply.
So your team is also working on GPU with CUDA?
Could you share some experience for how your team doing this project?
I am new for this area and don’t have any background of this.
And now my job is simply going to solve the compile problem.
Do you have any good idea how to do it.
Thank you very much.