Message Passing Interface (MPI) has been a well-established technology in the domain of distributed high-performance computing for several decades. However, one of its greatest drawbacks is a rather ancient pure-C interface. It lacks many useful features of modern languages (namely C++), like basic type-checking or support for generic code design. In this paper, we propose a novel abstraction for MPI, which we implemented as an extension of the C++ Noarr library. It follows Noarr paradigms (first-class layout and traversal abstraction) and offers layout-agnostic design of MPI applications. We also implemented a layout-agnostic distributed GEMM kernel as a case study to demonstrate the usability and syntax of the proposed abstraction. We show that the abstraction achieves performance comparable to the state-of-the-art MPI C++ bindings while allowing for a more flexible design of distributed applications.
翻译:消息传递接口(MPI)作为分布式高性能计算领域的一项成熟技术已沿用数十年。然而,其最显著的缺陷在于采用较为陈旧的纯C语言接口,缺乏现代语言(特别是C++)的诸多实用特性,例如基础类型检查与泛型代码设计的支持。本文提出一种新颖的MPI抽象方案,该方案作为C++ Noarr库的扩展实现,遵循Noarr范式(一流布局与遍历抽象),能够实现布局无关的MPI应用程序设计。我们通过实现布局无关的分布式GEMM内核作为案例研究,展示了所提抽象方案的实用性与语法特性。实验表明,该抽象方案在保持与先进MPI C++绑定库相当性能的同时,为分布式应用程序提供了更灵活的设计空间。