A GPU Based 3D Particle Tracking Code for Multipacting Simulation

A new GPU based 3D electron tracking code is developed at BNL and benchmarked with both popular existing parallel tracking code and experimental results. The code takes advantage of massive concurrency of GPU cards to track electrons under RF field in 3D Tetrahedron meshed structures. Approximately ten times more FLOPS can be achieved by utilizing GPUs compare to CPUs with same level of power consumption. Different boundary materials can be specified and the 3D EM field can be imported from the result of Omega3P calculation. CUDA_OpenGL interop was implemented so that the emerging of multipactors can be monitored in real time while the simulation is undergoing. Code also has GPU farm version that can run on multiple GPUs to further increase the turnover of multipacting simulation. INTRODUCTION Electron multipacting (MP) study in an SRF cavity and power coupler is of great importance in both designing and operating phase of the device. There are several 2D codes that can handle structures with cylindrical symmetry such as Multipac and Fishpact. To deal with 3D structures we have Track3P solver in the ACE3P package and Particle Studio in the CST suite. For 2D codes the limitation is obvious, especially when we are facing a power coupler problem where the structures are usually lack azimuthal symmetry. The Track3P code is extremely powerful in terms of the range of problems it can handle but it also requires a cluster such as NERSC to fully harness this power. Therefore we developed this GPU based 3D tracking code to increase the turnover of the multipacting simulation in SRF structures with only several GPU cards. This code can run on either PC or workstation as long as a GPU that support Nvidia CUDA computing capability 1.3 and above is available. STRUCTURE OF THE CODE The idea of this code is to take the advantage of high concurrency of the GPU to run a large scale Monte Carlo process to simulate the multipacting phenomenon. There are three primary parts in the code. Main (Master) Function The main function is a host function that runs on CPU and controls the work flow of the program. All the kernels running on GPU are launched from the main host code. First, the input parameters are read into the main function from an input file. Then the geometry model of an RF structure and the field distribution from Omega3P eignesolver are read in. The mesh model will be preprocessed before it is sent to the GPU so that the particles can be more easily located when it is going through the tracking process. Then the main function calls the sequence of the core kernels in the display call back function of the OpenGL so that the tracking process is synchronized with the rendering process. The core tracking kernels will be discussed below.