Mixed Mode Programming in a Star Formation Code
Nikolaos Tryfonidis · 2012
Hybrid architectures have become the standard in HPC systems during the last decade; modern supercomputers contain nodes that consist of multiple cores with shared memory. Mixed-mode programming is a programming model that is perfectly suited for this hybrid architecture in theory, but a definite answer cannot be provided for whether or not it leads to better performance over MPI-only implementations. MG is a Computational Fluid Dynamics code that has been parallelized with MPI. In the present project, the addition of OpenMP threads to MG is investigated, in order to transform it to a mixed-mode implementation and compare its performance to the original MPI-only version. Moreover, since the code uses linked-list traversals, it provides a good opportunity to test the performance of the relatively new OpenMP task construct, which was the biggest addition of OpenMP 3.0. It was found that the manual parallelization of the linked-list traversal led to significant performance benefits for large numbers of PEs, whereas the OpenMP tasks implementation resulted in bad performance. Furthermore, the mixed-mode code showed significantly less memory requirements.