Skip to main content
QUICK REVIEW

[论文解读] Accurate runtime selection of optimal MPI collective algorithms using analytical performance modelling

Emin Nuriyev, Alexey Lastovetsky|arXiv (Cornell University)|Apr 23, 2020
Distributed and Parallel Computing Systems被引用 5
一句话总结

本文提出一种基于模型的方法,通过直接从算法代码推导出解析性能模型,并利用针对特定算法的通信实验估算参数,实现对MPI集体通信算法的精确、高效运行时最优选择。该方法在Open MPI的广播和归约操作中实现了100%的选择准确率,优于那些往往无法选择最优算法的经验决策函数。

ABSTRACT

The performance of collective operations has been a critical issue since the advent of MPI. Many algorithms have been proposed for each MPI collective operation but none of them proved optimal in all situations. Different algorithms demonstrate superior performance depending on the platform, the message size, the number of processes, etc. MPI implementations perform the selection of the collective algorithm empirically, executing a simple runtime decision function. While efficient, this approach does not guarantee the optimal selection. As a more accurate but equally efficient alternative, the use of analytical performance models of collective algorithms for the selection process was proposed and studied. Unfortunately, the previous attempts in this direction have not been successful. We revisit the analytical model-based approach and propose two innovations that significantly improve the selective accuracy of analytical models: (1) We derive analytical models from the code implementing the algorithms rather than from their high-level mathematical definitions. This results in more detailed models. (2) We estimate model parameters separately for each collective algorithm and include the execution of this algorithm in the corresponding communication experiment. We experimentally demonstrate the accuracy and efficiency of our approach using Open MPI broadcast and gather algorithms and a Grid5000 cluster.

研究动机与目标

  • 为解决在不同平台、消息大小和进程数量下MPI集体通信算法选择长期存在的次优问题。
  • 改进现有经验决策函数,尽管其效率较高,但无法保证选择最优算法。
  • 复兴并增强解析性能建模方法,该方法此前因模型精度不足而失败。
  • 开发一种结合高准确率与低运行时开销的方法,以实现MPI实现中的实际部署。
  • 使用Open MPI的广播和归约算法在真实集群上实验验证该方法。

提出的方法

  • 直接从MPI集体通信算法的源代码推导解析性能模型,而非基于高层次的数学抽象,以捕捉底层实现细节。
  • 设计通信实验,使目标算法的执行时间在总时间中占主导地位,以确保参数估计的准确性。
  • 使用Huber回归对测量的执行时间进行分析,分别为每个算法独立估算模型参数(如延迟α和带宽β)。
  • 利用所得的详细解析模型构建决策函数,根据消息大小和进程数量在运行时选择最优算法。
  • 采用点对点通信模型T = α + β × m的形式构建模型,其中m为消息大小,并通过受控实验校准参数。
  • 将基于模型的决策函数集成到MPI例程中,实现高效、精确且透明的算法选择。

实验结果

研究问题

  • RQ1从源代码推导出的解析性能模型是否比基于高层次数学定义的模型具有更高的准确率?
  • RQ2通过使用算法特定实验,为每个算法分别估算参数,是否能显著提高选择准确率?
  • RQ3基于模型的方法是否能与经验决策函数的效率相当,同时保证最优算法的选择?
  • RQ4点对点通信使用的情境在多大程度上影响集体通信算法中的有效通信时间?
  • RQ5所提出的方法是否能在不同消息大小和进程数量下持续选择出最佳的MPI集体通信算法?

主要发现

  • 所提方法在所有测试配置下对MPI_Bcast和MPI_Gather算法的最优选择准确率达到100%,优于Open MPI的默认经验决策函数。
  • 从代码实现中推导出的解析模型捕捉了实现相关的细节,使得具有相似高层逻辑的算法之间能够进行精确的性能比较。
  • 通过算法主导型实验进行的参数估算,得到了一致且准确的α和β值,不同算法和集体通信操作之间表现出显著差异。
  • 尽管使用相同的虚拟拓扑,Split-binary和Binary tree广播算法表现出不同的有效通信时间,这归因于并行度和通信模式的差异。
  • 基于模型的决策函数与经验方法一样高效,运行时开销极低,适合在MPI库中用于生产环境。
  • 结果表明,当使用实现感知的模型和针对性实验进行恰当校准后,解析建模可以可靠地替代MPI中的经验决策函数。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。