有效MPI:用于多维环面中零拷贝全对全通信的用户定义数据类型和笛卡尔通信器
Effective MPI: User-defined Datatypes and Cartesian Communicators for Zero-copy All-to-all Communication in Multidimensional Tori
AI总结:
提出一种利用笛卡尔通信器和MPI派生数据类型实现多维环面上零拷贝全对全通信的算法,通过分解通信维度和隐式数据重排避免显式数据拷贝。
摘要:
我们提出并展示了如何在MPI中有效实现任意$d$维环面的非平凡全对全通信算法。给定进程数$p$分解为可映射到$d$维环面的$d$个因子,我们首先利用笛卡尔通信器将给定的$p$进程MPI通信器拆分为每个MPI进程的$d$个较小通信器,这些通信器跨越该进程所属环面的每个维度,并缓存这些通信器以避免每次全对全操作时昂贵的拆分。全对全操作本身被分解为在维度通信器上的一系列$d$次MPI_Alltoall操作。每次MPI_Alltoall调用前后的非平凡数据重排是隐式的,由MPI派生数据类型实现。这使得算法实现形式上为\emph{零拷贝},意味着无需执行显式的进程本地数据块重排。为实现这一点,算法采用了双缓冲方案,只需适度的临时缓冲区。通过选择$p$的分解并为组件MPI_Alltoall操作选择合适的实现,所提出的实现为算法调优和适应特定高性能系统提供了充分机会。一些精选的实验结果显示,其性能与原生MPI_Alltoall实现相当,并说明了常见MPI_Alltoall实现可能存在的问题。
英文摘要:
We present and show how to implement a non-trivial all-to-all communication algorithm for arbitrary $d$-dimensional tori effectively in MPI. Given a factorization of the number of processes $p$ into $d$ factors that can be mapped onto a $d$-dimensional torus, we first utilize a Cartesian communicator to split a given $p$-process MPI communicator into, for each MPI process, $d$ smaller communicators spanning each of the dimensions of the torus to which the process belongs, and cache these communicators in order to avoid expensive splitting at each all-to-all operation. The all-to-all operation itself is decomposed into a sequence of $d$ MPI_Alltoall operations on the dimension-wise communicators. The non-trivial data rearrangement before and after each MPI_Alltoall call is implicit only and effected by MPI derived datatypes. This makes the implementation of the algorithm formally \emph{zero-copy}, meaning that no explicit process-local reordering of data blocks ever has to be performed. In order to achieve this, the algorithm employs a double-buffering scheme with modest temporary buffer requirements. By choosing the factorization of $p$ and selecting appropriate implementations for the component MPI_Alltoall operations, the presented implementation gives ample opportunities for algorithm tuning and adaptation to the particular high-performance system. A few, select experimental results show competitive performance with native MPI_Alltoall implementations and illustrate problems that common MPI_Alltoall implementations may have.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。