A highly optimized Monte Carlo (MC) code package for simulating light
transport is developed on the latest graphics processing unit (GPU) built
for general-purpose computing from NVIDIA - the Fermi GPU. In biomedical
optics, the MC method is the gold standard approach for simulating light
transport in biological tissue, both due to its accuracy and its flexibility
in modelling realistic, heterogeneous tissue geometry in 3-D. However, the
widespread use of MC simulations in inverse problems, such as treatment
planning for PDT, is limited by their long computation time. Despite its
parallel nature, optimizing MC code on the GPU has been shown to be a
challenge, particularly when the sharing of simulation result matrices among
many parallel threads demands the frequent use of atomic instructions to
access the slow GPU global memory. This paper proposes an optimization
scheme that utilizes the fast shared memory to resolve the performance
bottleneck caused by atomic access, and discusses numerous other
optimization techniques needed to harness the full potential of the GPU.
Using these techniques, a widely accepted MC code package in biophotonics,
called MCML, was successfully accelerated on a Fermi GPU by approximately
600x compared to a state-of-the-art Intel Core i7 CPU. A skin model
consisting of 7 layers was used as the standard simulation geometry. To
demonstrate the possibility of GPU cluster computing, the same GPU code was
executed on four GPUs, showing a linear improvement in performance with an
increasing number of GPUs. The GPU-based MCML code package, named GPU-MCML,
is compatible with a wide range of graphics cards and is released as an
open-source software in two versions: an optimized version tuned for high
performance and a simplified version for beginners ().