The International Conference for High Performance Computing, Networking, Storage, and Analysis

Workshops Archive

MPPI - Type safe C++ Datatypes for MPI


Workshop: ExaMPI25: Workshop on Extreme Scale MPI

Authors: Mike Söhner and Christoph Niethammer (University of Stuttgart, Germany)

Abstract: MPI provides a flexible C-API to communicate data of various types between a set of distributed processes over high-speed interconnects in HPC systems. Data buffers are described using MPI-Datatypes, which specify the type and layout of the data to be transmitted. To construct these datatypes, users must manually describe the memory layout of buffer elements via the MPI-API. However, modern applications are typically written in object-oriented C++, which offers significant advantages over C, including type safety and metaprogramming capabilities. In this work, we introduce a new C++-API and datatype engine that leverage C++ language features such as concepts, ranges, and the upcoming reflection to extract the necessary datatype information for the user at compile-time. This approach simplifies the user’s work, enhances code safety by eliminating manual datatype construction and offers previously unavailable possibilities. Our measurements demonstrate that this interface introduces no performance overhead and, in some cases, even improves performance.


Back to ExaMPI25: Workshop on Extreme Scale MPI Archive Listing Back to Full Workshop Archive Listing