CUDA EGS

CUDA EGS is a parallel implementation of EGSnrc‘s photon transport mechanism for graphics processing units (GPUs) using NVIDIA’s Compute Unified Device Architecture (CUDA). EGSnrc is a well-known Monte Carlo simulation package for coupled electron-photon transport that is widely used in medical physics applications. CUDA EGS is specifically designed for imaging applications in the diagnostic energy range and does not model electrons. No approximations or simplifications of the original EGSnrc code were made other than using single floating-point precision instead of double precision and a different random number generator. The photons leaving the simulation geometry are propagated to a virtual detector, and separate images for primary and scattered photons are generated, allowing a detailed analysis of the amount and distribution of x-ray scattering. CUDA EGS was found to be 20 to 40 times faster than EGSnrc while producing equivalent results.

For more information about CUDA EGS and a comparison of CUDA EGS to EGSnrc, see the following paper:

Jonas Lippuner and Idris A. Elbakri (2011), A GPU implementation of EGSnrc’s Monte Carlo photon transport for imaging applications, Phys. Med. Biol. 56, 1745; doi:10.1088/0031-9155/56/22/010

Note: After the paper was published, a bug was found in the code that resulted in every random number being calculated twice. This bug was fixed and made CUDA EGS roughly 20% faster (based on a few simple runs).

Download & Installation

The source code along with a user manual and some sample input files can be downloaded below. Currently, CUDA EGS only supports Windows. Detailed installation instructions can be found in the user manual.

Note that a working installation of CUDA and a GPU with CUDA capability 2.0 or higher is required. See the manual for more details.

Source code, user manual and example input files: CUDA_EGS_1.0.0.zip (ZIP, 653 kB)
Only the user manual for CUDA EGS: CUDA_EGS_Manual_1.0.0.pdf (PDF, 194 kB)

License

CUDA EGS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

CUDA EGS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.