Science Education Home Home Teachers Students Games Videos VA SOL Programs

Undergraduate Research at Jefferson Lab

Increasing Efficiency of Compton Scattering Simulations through MPI Parallelization on a CPU Cluster

Student: Trenton Hagerman

School: Old Dominion University

Mentored By: Balša Terzić

When a laser beam of light interacts with a beam of high energy electrons, multiple inverse Compton scattering events take place. The resulting radiation has many practical applications; therefore, it is important to be able to predict/model the emitted spectrum. Python code for simulating the expected spectrum was developed by Dr. Terzic and other members of Old Dominion University's Center of Accelerator Science. The simulation was optimized to run on a single machine that has 40 central processing unit (CPU) cores, using the python module multiprocessing. The simulation currently requires one hour and twenty-three minutes to simulate the spectra of 103 particles on the 40-core machine. The focus of this project was to increase the speed of the simulation. An increase in speed was achieved by using a distributed cluster of CPUs. The module multiprocessing is unable to communicate to a distributed cluster of CPUs, therefore the python module mpi4py was used. With mpi4py, the simulation can run on all of the available CPUs simultaneously, and each instance of the simulation receiving independent input so that the machine does not produce duplicate output. After implementing mpi4py and running the simulation on the CPU cluster, the spectra of 104 particles in one hour and thirty-seven minutes. In comparison, to simulate 104 particles on the 40-core machine would approximately take over 13 hours. This increase in speed will allow for the accuracy of the simulation to be increased, and for more theoretical studies of inverse Compton scattering.

Increasing Efficiency of Compton Scattering Simulations<br>through MPI Parallelization on a CPU Cluster

Citation and linking information

For questions about this page, please contact Steve Gagnon.