arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1705.10218cs.DCcs.MS
收藏

用2.5维算法和单侧MPI提高稀疏矩阵-矩阵乘法的效率

Increasing the Efficiency of Sparse Matrix-Matrix Multiplication with a 2.5D Algorithm and One-Sided MPI

Alfio Lazzaro, Joost VandeVondele, Juerg Hutter, Ole Schuett

摘要:

矩阵-矩阵乘法是线性代数中的基本运算,也是各种科学领域中广泛算法的重要组成部分。理论和实现的密集,方阵的情况下是发达国家。如果矩阵是稀疏的,具有特定于应用程序的稀疏模式,那么最佳实现仍然是一个悬而未决的问题。在这里,我们探讨了通信减少2.5D算法和单边MPI通信的线性标度电子结构理论的背景下的性能。特别是,我们扩展了DBCSR稀疏矩阵库,这是线性标度电子结构理论和低标度相关方法在CP 2K的基本构建块。该库专门设计用于有效地执行占用相对较大的矩阵的块稀疏矩阵-矩阵乘法。在这里,我们比较了性能的基础上,大炮的算法和MPI点对点通信的原始实现,与基于MPI单边通信(RMA)的实现,在2D和2.5D的方法。2.5D方法用内存和辅助操作来减少通信,如果通信占主导地位,这可能会导致加速。2.5D算法在单边通信中更容易实现。的实施提供了详细的描述,也为非理想的处理器拓扑结构,因为这是重要的实际应用。考虑到精确稀疏模式的重要性,甚至是决定乘法时有效填充的实际矩阵数据,测试在CP 2K包中使用应用程序基准进行。结果显示,基于RMA的2.5D算法的性能大幅提高,高达1.80倍,这是观察到的并行化中所涉及的进程的数量增加。

英文摘要:

Matrix-matrix multiplication is a basic operation in linear algebra and an essential building block for a wide range of algorithms in various scientific fields. Theory and implementation for the dense, square matrix case are well-developed. If matrices are sparse, with application-specific sparsity patterns, the optimal implementation remains an open question. Here, we explore the performance of communication reducing 2.5D algorithms and one-sided MPI communication in the context of linear scaling electronic structure theory. In particular, we extend the DBCSR sparse matrix library, which is the basic building block for linear scaling electronic structure theory and low scaling correlated methods in CP2K. The library is specifically designed to efficiently perform block-sparse matrix-matrix multiplication of matrices with a relatively large occupation. Here, we compare the performance of the original implementation based on Cannon's algorithm and MPI point-to-point communication, with an implementation based on MPI one-sided communications (RMA), in both a 2D and a 2.5D approach. The 2.5D approach trades memory and auxiliary operations for reduced communication, which can lead to a speedup if communication is dominant. The 2.5D algorithm is somewhat easier to implement with one-sided communications. A detailed description of the implementation is provided, also for non ideal processor topologies, since this is important for actual applications. Given the importance of the precise sparsity pattern, and even the actual matrix data, which decides the effective fill-in upon multiplication, the tests are performed within the CP2K package with application benchmarks. Results show a substantial boost in performance for the RMA based 2.5D algorithm, up to 1.80x, which is observed to increase with the number of involved processes in the parallelization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑