PHANTOM is a publicly available smoothed particle hydrodynamics and magnetohydrodynamics code for astrophysics, developed by Prof. Daniel Price’s research group at Monash University. It features implementations of hydrodynamics, magnetohydrodynamics, self-gravity, sink particles, general relativistic hydrodynamics, radiation hydrodynamics, multiple species dust-gas hydrodynamics, and more. While the science team continually strives to enhance the code’s capabilities with a focus on scientific applications, less scientific aspects like improving MPI scaling often receive lower priority compared to physics improvements.
The primary aim of this project was to scope out the necessary work to improve the MPI scaling of the PHANTOM code. Achieving this required the development of an extensive testing framework to verify results throughout code changes, and profiling to establish a performance baseline for future optimisations.
A key achievement of this project was transitioning the entire PHANTOM test suite to the GitHub Actions Continuous Integration framework. This transition integrates testing processes into the developers’ Pull Request workflow. Now, every proposed code change undergoes automatic testing, ensuring new contributions maintain the code’s integrity and functionality.
To support the rigorous testing demands, custom GitHub runners were deployed. These runners, supported by the Swinburne Openstack cluster, execute the test suite and benchmarks. A dedicated web server was set up to host PHANTOM data files and display nightly build and benchmarking results. This server serves as a centralised location for accessing essential data and tracking the performance and stability of the PHANTOM code through regular updates.
During the project, several critical issues in the existing PHANTOM code were identified and resolved. These issues, previously unknown, caused incorrect results when running in MPI mode. Resolving these issues was crucial for conducting accurate scaling tests and ensuring the code’s reliability in parallel computing environments. Leveraging their extensive experience with developing and debugging scientific codes, ADACS developers effectively handled these issues and contributed changes back to the main codebase, benefiting all PHANTOM users.
Comprehensive scaling tests were conducted on the OzSTAR and Gadi supercomputers, using hybrid OpenMP and MPI configurations. These tests evaluated the performance and scalability of the PHANTOM code, providing valuable insights for future optimisations and improvements.
This preliminary work sets a foundation for future efforts to optimise the PHANTOM code. By establishing a robust testing framework and addressing critical issues, the project has created a performance baseline that will guide further enhancements.
Project Image: PHANTOM logo.
Check out some of our other projects.
ADACS provided a solid foundation on which the GOTO-XBs team could further build the web app, and provided instructional information to up-skill the team.
ADACS developers collaborated with the Parallel Bilby team to overhaul their code, improving its structure, establishing tests for reproducibility, and instilling good development practices. This work set the foundations for future improvements to th
The HORMONE simulation code makes use of a novel self-gravity solver. ADACS implemented MPI parallelisation into the code, enabling it to scale across multiple compute nodes, facilitating larger and more detailed simulations.