[论文解读] MPI Derived Datatypes: Performance Expectations and Status Quo
本文评估了MPI派生数据类型在实际应用中相对于基本性能预期的表现,揭示了常见MPI库往往因次优的类型归一化而违反基本性能准则(如语义上等价的数据类型应具有相当的性能)。研究发现,MPI类型构造函数的选择对性能有显著影响,例如MVAPICH2-2.1等某些库表现欠佳;同时表明,即使在简单布局中,通过使用完整的类型构造函数(如MPI_Type_create_struct)精心描述数据类型,也能实现最优效率。
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.
研究动机与目标
- 调查MPI派生数据类型是否满足自然性能预期,特别是与原始打包/解包操作相比的表现。
- 评估MPI标准中关于连续类型与重复类型之间性能等价性的保证在实际中是否成立。
- 评估不同MPI类型构造函数(如MPI_Type_create_struct、MPI_Type_indexed)对通信性能的影响。
- 识别当前MPI库在MPI_Type_commit时用于类型归一化的启发式策略的不足之处。
- 提供一个基准测试框架,用于在多种MPI实现中验证数据类型性能准则。
提出的方法
- 设计用于非连续、分块数据布局(如具有步长的子矩阵)的合成参数化基准,以在受控条件下测试性能。
- 基于前期工作提出并验证四项具体性能准则(GL1–GL4),重点关注语义等价性、归一化和性能一致性。
- 在多个MPI库(NEC MPI、MVAPICH2、Open MPI)上实现乒乓通信基准,测量不同数据类型描述下的延迟和带宽。
- 比较同一数据布局下三种不同的派生数据类型表示方式:完全索引式、连续与索引结合式、结构体式。
- 分析结果以检测预期性能等价性的违反情况,并评估类型归一化启发式策略的有效性。
- 结合合成模式与真实世界布局模式,确保结果与实际高性能计算应用的相关性。
实验结果
研究问题
- RQ1MPI库是否在语义上等价的派生数据类型之间始终实现一致的性能表现,如MPI标准所要求?
- RQ2常见MPI库在多大程度上违反了基本性能预期,例如单个连续类型与其重复构成类型之间的等价性?
- RQ3MPI类型构造函数的选择(如MPI_Type_create_struct与MPI_Type_indexed)对同一数据布局的通信性能有何影响?
- RQ4MPI库在MPI_Type_commit期间使用的启发式策略是否足以确保最优性能,还是其未能有效归一化类型?
- RQ5不同类型描述之间的性能差异是否可归因于实现层面的低效,而非算法或架构约束?
主要发现
- 派生数据类型的性能有时甚至劣于语义等价的MPI_Pack和MPI_Unpack使用方式,这与‘数据类型应至少与打包/解包同样高效’的预期相悖。
- MPI标准中关于单个连续类型与其重复构成类型之间性能等价性的保证,并未在所有MPI库中普遍成立。
- MVAPICH2-2.1在相同类型描述下,性能显著劣于NEC MPI-1.3.1和Open MPI-1.10.1,尤其在较大步长时更为明显。
- 采用MPI_Type_create_struct的RowCol-struct表示方式,始终优于RowCol-fully-indexed和RowCol-contiguous-and-indexed,某些情况下可实现高达两倍的加速。
- MPI_Type_commit中使用的启发式策略不足以将类型归一化为最优内部表示,导致性能差异取决于用户定义的描述方式。
- 由于计算开销过高,无法在通信调用期间高效地进行运行时归一化,因此预提交归一化至关重要,也凸显了MPI中更优查询与指导机制的迫切需求。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。