Optimising Field Solves in GS2 plasma physics simulation codeeCSE02-08
PI/Co-I: Dr. David Dickinson - University of York; Dr Colin Roach - Culham Centre for Fusion Energy
Technical: Dr. Adrian Jackson - EPCC
This project worked on the plasma physics simulation code GS2, which is used to simulate plasma both from astronomical simulations (i.e. simulating the sun) and for fusion science. The aim was to reduce the computational cost of parallelising the code using large numbers of cores on ARCHER, thereby reducing the time required to run a given simulation.
GS2 is an open source gyrokinetic simulation code that is extensively used in plasma physics research internationally to study the linear and non-linear dynamics of magnetically confined plasma in laboratory and astrophysical situations.
GS2 solves the gyrokinetic system of equations for the evolution of the perturbed distribution function, g, and the perturbed electromagnetic fields, Φ, B. GS2 is parallelised with MPI, and can scale well to thousands of processes, depending on the simulation being run.
However, there is part of the code, the part that calculates and updates the data on the plasma's electromagnetic fields, which is not efficient when using large numbers of cores. The purpose of this project was to optimise the electromagnetic field-solve algorithm that had been limiting scalability.
The optimisation of the field-solve algorithm has successfully improved the scalability of GS2 at high process counts. This is illustrated by the fact that a representative short simulation on 4096 cores (at the upper limit to the code's scalability) now runs approximately 5 times faster than the original code, and a representative long simulation runs approximately twice as fast as the original code.
Such improved performance means that we can use GS2 for much more detailed plasma simulations, examining the behaviour of both electron and ion scale phenomena in the plasma, and can thereby gain a better understanding of the turbulence features in the plasma.
Understanding, and controlling, turbulence in plasma is one of the key requirements for building a usable fusion reactor, and codes like GS2 can help in the design and understanding of such reactors. Fusion energy has the potential to provide a clean source of electricity for future generations.
Summary of the software
The GS2 source code is available at sourceforge: https://sourceforge.net/projects/gyrokinetics/.
Code development was performed in an SVN branch on the main GS2 repository, and has now been integrated back into the GS2 trunk.
There is a centrally installed version of GS2 on ARCHER (a package version) which has been updated with the most recent version of the source code providing the functionality implemented in the eCSE to users on ARCHER.