The Barcelona Supercomputing Center (BSC) hosts one of the Advanced Computing Hub (ACH) that EUROfusion has created to improve fusion codes following its European Research Roadmap. These codes are essential for advancing fusion energy research, which is a promising sustainable energy source for the future.
EUROfusion, the European Consortium for the Development of Fusion Energy, coordinates and funds European fusion research. Its European Research Roadmap to the Realisation of Fusion Energy outlines the necessary steps to achieve commercial fusion energy. This roadmap emphasizes advancing simulation models to guide the operation of ITER and the design of DEMO, the demonstration fusion power plant.
EUROfusion has established Theory, Simulation, Validation, and Verification tasks (TSVV) and Advanced Computing Hubs (ACH) as part of this roadmap. TSVVs focus on fundamental research and scientific modeling, while ACHs provide the computational expertise to enhance these models. The collaboration between TSVVs and ACHs is essential for successful fusion research. TSVVs identify scientific requirements and areas for code improvement, while ACHs provide the computational expertise needed to achieve it.
The BSC-ACH was created to provide its high-performance computing (HPC) expertise in fusion energy research. Fusion energy requires complex simulations to understand and predict plasma behavior and so simulate models to guide ITER operation and DEMO design. The BSC-ACH task is to enhance fusion simulations by improving fusion codes’ performance, portability, and scalability, adopting modern software engineering practices, and leveraging HPC systems efficiently.
In particular, our BSC-ACH undertakes various activities to perform this task:
- Code Optimization: Enhancing the efficiency and performance of existing fusion codes, e.g. finding bottlenecks in the code to remove them.
- Porting to New Architectures: Ensuring codes run efficiently on the latest hardware, including GPUs, taking profit from all levels of parallelism offered by supercomputers.
- Software Engineering: giving advice to developers to ensure code quality.
These tasks involve three different teams working collaboratively within the center: Operations, Best Practices for Performance and Programmability group (BePPP) and Fusion. The Fusion group provides the scientific expertise required for the fusion codes. The Operations team contributes knowledge of the different computer architectures. And finally, the BePP team brings experience in modifying and updating the codes according to best practices to ensure high quality.
Next, here are some examples of our work in optimizing and enhancing fusion codes at BSC-ACH:
- SPICE2: A parallel Poisson solver has been implemented using the PETSc library to overcome the limitations of the existing serial solver, allowing the code to handle larger grid sizes efficiently.
- ERO2.0: A comprehensive performance assessment identified load imbalance and serialization issues. Some solutions were implemented that resulted in performance gains. Moreover, a first version with GPU support was introduced using OpenACC and CUDA, focusing on the most time-consuming routines.
- KNOSOS: Detailed profiling and tracing were performed to identify bottlenecks, particularly in subroutines related to linear equation solving. As a result, a parallelization with OpenMP was applied to improve load balancing and reduce computation time, and the use of vectorization in the code further boosted code performance.
These efforts from our ACH have improved the efficiency and scalability of these codes. For this reason, the ACHs play a crucial role in advancing sustainable fusion energy, ensuring fusion codes can run on modern HPC systems and enabling faster and more accurate simulations. For more detailed information about this topic, please refer to the recent paper published by our ACH team with Xavier Sáez as the lead author in the Plasma Physics and Controlled Fusion journal.
Acknowledgments: This work has been carried out within the framework of the EUROfusion Consortium, funded by the European Union via the Euratom Research and Training Program (Grant Agreement No 101052200 – EUROfusion). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them. The research group Fusion Group at BSC is grateful for the support received from the Departament de Recerca i Universitats de la Generalitat de Catalunya with code 2021 SGR 00908, and from the Spanish National R&D Project PID2019-110854RBI00 funded through MCIN/AEI/10.13039/501100011033.