[Paper Review] MPI Derived Datatypes: Performance Expectations and Status Quo
This paper evaluates the performance of MPI derived datatypes against fundamental expectations, revealing that common MPI libraries often violate basic performance guidelines—such as equivalent performance across semantically identical datatypes—due to suboptimal type normalization. It demonstrates that the choice of MPI type constructor significantly impacts performance, with some libraries like MVAPICH2-2.1 underperforming, and shows that even simple layouts benefit from careful datatype description using full type constructors like MPI_Type_create_struct for optimal efficiency.
We examine natural expectations on communication performance using MPI derived datatypes in comparison to the baseline, "raw" performance of communicating simple, non-contiguous data layouts. We show that common MPI libraries sometimes violate these datatype performance expectations, and discuss reasons why this happens, but also show cases where MPI libraries perform well. Our findings are in many ways surprising and disappointing. First, the performance of derived datatypes is sometimes worse than the semantically equivalent packing and unpacking using the corresponding MPI functionality. Second, the communication performance equivalence stated in the MPI standard between a single contiguous datatype and the repetition of its constituent datatype does not hold universally. Third, the heuristics that are typically employed by MPI libraries at type-commit time are insufficient to enforce natural performance guidelines, and better type normalization heuristics may have a significant performance impact. We show cases where all the MPI type constructors are necessary to achieve the expected performance for certain data layouts. We describe our benchmarking approach to verify the datatype performance guidelines, and present extensive verification results for different MPI libraries.
Motivation & Objective
- To investigate whether MPI derived datatypes meet natural performance expectations, especially in comparison to raw packing/unpacking.
- To evaluate whether the MPI standard's performance equivalence between contiguous and repeated datatypes holds in practice.
- To assess the impact of different MPI type constructors (e.g., MPI_Type_create_struct, MPI_Type_indexed) on communication performance.
- To identify shortcomings in current MPI library heuristics for type normalization at MPI_Type_commit time.
- To provide a benchmarking framework for verifying datatype performance guidelines across diverse MPI implementations.
Proposed method
- Designing synthetic, parameterized benchmarks for non-contiguous, tiled data layouts (e.g., submatrices with strides) to test performance under controlled conditions.
- Formulating and testing four concrete performance guidelines (GL1–GL4) based on prior work, focusing on semantic equivalence, normalization, and performance consistency.
- Implementing ping-pong communication benchmarks across multiple MPI libraries (NEC MPI, MVAPICH2, Open MPI) to measure latency and bandwidth for different datatype descriptions.
- Comparing performance across three distinct derived datatype representations of the same data layout: fully indexed, contiguous-and-indexed, and struct-based.
- Analyzing results to detect violations of expected performance equivalence and to evaluate the effectiveness of type normalization heuristics.
- Using a combination of synthetic patterns and real-world layout motifs to ensure relevance to actual HPC applications.
Experimental results
Research questions
- RQ1Do MPI libraries consistently achieve equivalent performance for semantically identical derived datatypes, as required by the MPI standard?
- RQ2To what extent do common MPI libraries violate basic performance expectations, such as the equivalence between a single contiguous type and its repeated constituent type?
- RQ3How does the choice of MPI type constructor (e.g., MPI_Type_create_struct vs. MPI_Type_indexed) affect communication performance for the same data layout?
- RQ4Are the heuristics used by MPI libraries during MPI_Type_commit sufficient to ensure optimal performance, or do they fail to normalize types effectively?
- RQ5Can performance differences between datatype descriptions be attributed to implementation-level inefficiencies rather than algorithmic or architectural constraints?
Key findings
- The performance of derived datatypes is sometimes worse than the semantically equivalent use of MPI_Pack and MPI_Unpack, contradicting the expectation that datatypes should be at least as efficient.
- The MPI standard's guarantee of performance equivalence between a single contiguous datatype and its repeated constituent type does not hold universally across all MPI libraries.
- MVAPICH2-2.1 exhibits significantly worse performance than NEC MPI-1.3.1 and Open MPI-1.10.1 for the same datatype descriptions, especially for larger strides.
- The RowCol-struct representation, which uses MPI_Type_create_struct, consistently outperforms both RowCol-fully-indexed and RowCol-contiguous-and-indexed, achieving up to a factor of two speedup in some cases.
- The heuristics used in MPI_Type_commit are insufficient to normalize datatypes into optimal internal representations, leading to performance disparities based on user-defined description.
- Normalization cannot be performed efficiently on-the-fly during communication calls due to high computational cost, making pre-commit normalization critical and underscoring the need for better query and guidance mechanisms in MPI.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.