P4IRS: An intermediate representation and compiler for parallel and performance-portable particle simulations
RRL Machado and J Eitzinger and H Köstler, INTERNATIONAL JOURNAL OF HIGH PERFORMANCE COMPUTING APPLICATIONS (2025).
DOI: 10.1177/10943420251405928
Various physics simulations today rely on simulating particle interactions, where particles can represent point masses (Molecular Dynamics), rigid bodies (Discrete Element Method) or even massive bodies such as planets. Evaluating and calculating the required particle interactions in a simulation is computationally expensive, hence suitable algorithms and proper optimizations to exploit available parallelism in the target hardware are important to reach good performance. However, it is difficult to maintain flexible implementations while keeping state-of-the-art performance, as most packages are developed individually and have their own hard-coded, fine- tuned implementations. To combine flexibility and optimal performance, we introduce P4IRS, an intermediate representation and compiler for particle simulations which aims at generating high-performing code. We describe P4IRS and its features, provide some usage examples for MD and DEM fields and discuss the benefits we can obtain with code generation. Finally, we evaluate the performance and scalability from the code generated by P4IRS on modern processors, accelerators and supercomputers.
Return to Publications page