arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.13804cs.DC
收藏

MPI派生数据类型真的有用吗?一项针对共享内存通信的单节点跨实现研究

Do MPI Derived Datatypes Actually Help? A Single-Node Cross-Implementation Study on Shared-Memory Communication

School of Mathematics;Statistics University of Edinburgh

Temitayo Adefemi

AI总结:

本文针对MPI派生数据类型(DDT)的实际性能争议,在单节点上跨四种主流MPI实现、三类二维应用开展基准测试,发现DDT无跨场景性能优势,建议同时剖析两种通信方案。

摘要:

MPI的派生数据类型(DDT)承诺可实现非连续数据更简便、无拷贝的通信,但其实际性能仍存在争议,且相关性能报告通常仅针对单一MPI栈给出。我们使用三个二维应用开展跨实现评估:雅可比计算流体动力学(CFD)求解器、康威生命游戏、基于格点的图像重建。每个应用均编写两个版本:(i)BASIC版本,对非连续区域进行手动打包与解包;(ii)DDT版本,使用MPI_Type_vector与MPI_Type_create_subarray,并通过MPI_Type_create_resized设置正确的真实范围。为保证API对等性,我们对完全相同的通信语义开展基准测试:非阻塞点对点通信(Irecv/Isend + Waitall)、邻域集合通信(MPI_Neighbor_alltoallw)、MPI-4持久化操作(*_init)。我们在1-4个进程上开展强可扩展性与弱可扩展性测试,验证了位级一致的halo区域,在单个ARCHER2节点上评估了四种广泛使用的MPI实现:MPICH、Open MPI、Intel MPI、MVAPICH2。测试结果喜忧参半:DDT有时能达到最快速度,例如在Intel MPI与MPICH上运行图像重建代码时,但在其他MPI栈上也可能属于最慢的方案之列,例如在Open MPI与MVAPICH2上运行同一代码时。对于CFD求解器,BASIC版本在各类通信语义下的性能普遍优于DDT版本,而生命游戏的性能排名则随MPI库的不同发生反转。我们还观察到特定栈的异常现象,例如MPICH在DDT邻域模式与持久化模式下出现性能下降。总体而言,没有哪种策略在所有程序、通信语义与MPI栈上均占优;DDT的性能可移植性无法得到保证。因此我们建议,在目标MPI实现与通信模式下,同时对基于DDT的设计与手动打包设计进行性能剖析。本研究局限于单节点场景,未分析内存开销;多节点与GPU感知路径的相关研究留待未来工作开展。

英文摘要:

MPI's derived datatypes (DDTs) promise easier, copy-free communication of non-contiguous data, yet their practical performance remains debated and is often reported only for a single MPI stack. We present a cross-implementation assessment using three 2D applications: a Jacobi CFD solver, Conway's Game of Life, and a lattice-based image reconstruction. Each application is written in two ways: (i) a BASIC version with manual packing and unpacking of non-contiguous regions and (ii) a DDT version using MPI_Type_vector and MPI_Type_create_subarray with correct true extent via MPI_Type_create_resized. For API parity, we benchmark identical communication semantics: non-blocking point-to-point (Irecv/Isend + Waitall), neighborhood collectives (MPI_Neighbor_alltoallw), and MPI-4 persistent operations (*_init). We run strong and weak scaling on 1-4 ranks, validate bitwise-identical halos, and evaluate four widely used MPI implementations: MPICH, Open MPI, Intel MPI, and MVAPICH2 on a single ARCHER2 node. Results are mixed. DDTs can be fastest, for example for the image reconstruction code on Intel MPI and MPICH, but can also be among the slowest on other stacks, such as Open MPI and MVAPICH2 for the same code. For the CFD solver, BASIC variants generally outperform DDTs across semantics, whereas for Game of Life the ranking flips depending on the MPI library. We also observe stack-specific anomalies, for example MPICH slowdowns with DDT neighborhood and persistent modes. Overall, no strategy dominates across programs, semantics, and MPI stacks; performance portability for DDTs is not guaranteed. We therefore recommend profiling both DDT-based and manual-packing designs under the intended MPI implementation and communication mode. Our study is limited to a single node and does not analyze memory overhead; multi-node and GPU-aware paths are left for future work.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑