[论文解读] 300x Faster Matlab using MatlabMPI
本文提出 MatlabMPI,这是一种轻量级、纯 Matlab 实现的 MPI 标准,可在使用标准文件 I/O 的情况下实现 Matlab 中的高性能并行计算。通过利用 Matlab 内置的文件操作,它仅用 70 行代码就在 304 个 CPU 上实现了高达 300 倍的加速,展示了前所未有的软件性价比(每行源代码 0.85 GFLOPS)。
The true costs of high performance computing are currently dominated by software. Addressing these costs requires shifting to high productivity languages such as Matlab. MatlabMPI is a Matlab implementation of the Message Passing Interface (MPI) standard and allows any Matlab program to exploit multiple processors. MatlabMPI currently implements the basic six functions that are the core of the MPI point-to-point communications standard. The key technical innovation of MatlabMPI is that it implements the widely used MPI ``look and feel'' on top of standard Matlab file I/O, resulting in an extremely compact (~250 lines of code) and ``pure'' implementation which runs anywhere Matlab runs, and on any heterogeneous combination of computers. The performance has been tested on both shared and distributed memory parallel computers (e.g. Sun, SGI, HP, IBM and Linux). MatlabMPI can match the bandwidth of C based MPI at large message sizes. A test image filtering application using MatlabMPI achieved a speedup of ~300 using 304 CPUs and ~15% of the theoretical peak (450 Gigaflops) on an IBM SP2 at the Maui High Performance Computing Center. In addition, this entire parallel benchmark application was implemented in 70 software-lines-of-code (SLOC) yielding 0.85 Gigaflop/SLOC or 4.4 CPUs/SLOC, which are the highest values of these software price performance metrics ever achieved for any application. The MatlabMPI software will be available for download.
研究动机与目标
- 为解决高性能计算中的高软件成本问题,使高效率的 Matlab 代码能在并行系统上高效运行。
- 克服当前缺乏广泛采用、可移植且高性能的 Matlab 并行化解决方案的现状。
- 开发一种最小化、可移植且高性能的 Matlab MPI 接口,可在任何支持 Matlab 的系统上运行。
- 证明通过极少代码和最大生产力即可实现在 Matlab 中的高性能并行计算。
提出的方法
- 通过使用标准 Matlab 文件 I/O 实现 MPI 点对点通信,避免对低级 C/Fortran 依赖。
- 利用文件锁机制协调不同进程之间的消息发送与接收。
- 将 MPI 函数(如 MPI_Send、MPI_Recv)映射为带元数据的消息标识的文件写入/读取操作。
- 通过 MPI_Run 命令实现分布式执行,该命令可在多台机器上启动并行 Matlab 脚本。
- 设计一个紧凑的约 250 行代码的实现,可在任何异构集群上运行,只要该集群支持 Matlab。
- 在图像滤波基准测试中采用环形通信模式,以高效管理邻居间的数据交换。
实验结果
研究问题
- RQ1纯 Matlab 实现的 MPI 是否能在大消息尺寸下达到与 C 语言实现的 MPI 相当的性能?
- RQ2一个最小化、可移植的 Matlab MPI 接口是否能在大规模并行系统上实现显著加速?
- RQ3当使用高级语言如 Matlab 并搭配轻量级并行层时,可实现的软件性价比(如每行源代码的 GFLOPS)是多少?
- RQ4MatlabMPI 在真实 HPC 环境中,随着处理器数量增加,其性能如何扩展?
- RQ5当与高效通信层结合时,高生产力语言如 Matlab 是否能在超级计算机上实现接近峰值性能?
主要发现
- MatlabMPI 在 IBM SP2 上使用 304 个 CPU 实现了 300 倍加速,达到理论峰值性能的 15%(450 GFLOPS)。
- 图像滤波基准测试实现了每行源代码 0.85 GFLOPS,为当时报告的最高值。
- MatlabMPI 在大消息尺寸下与 C 语言实现的 MPI 具有相同的带宽,证明了强大的性能可移植性。
- 整个并行应用程序仅用 70 行代码实现,比 35 行的串行版本增加了 100%,但仍极为紧凑。
- 该实现完全可移植,仅依赖标准文件 I/O 和 Matlab 内置功能,无需外部库。
- 该方法实现了高生产力并行计算,且编码开销极小,为软件性价比设定了新基准。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。