Simplifying non-contiguous data transfer with MPI for Python

Author:

Nölp Klaus,Oden Lena

Abstract

AbstractPython is becoming increasingly popular in scientific computing. The package MPI for Python (mpi4py) allows writing efficient parallel programs that scale across multiple nodes. However, it does not support non-contiguous data via slices, which is a well-known feature of NumPy. In this work, we therefore evaluate several methods to support the direct transfer of non-contiguous arrays in mpi4py. This significantly simplifies the code, while the performance basically stays the same. In a PingPong-, Stencil- and Lattice-Boltzmann-Benchmark, we compare the common manual copying, a NumPy-Copy design and a design that is based on MPI derived datatypes. In one case, the MPI derived datatype design could achieve a speedup of 15% in a Stencil-Benchmark on four compute nodes. Our designs are superior to naive manual copies, but for maximum performance manual copies with pre-allocated buffers or MPI persistent communication will be a better choice.

Funder

Horizon 2020 Framework Programme

FernUniversität in Hagen

Publisher

Springer Science and Business Media LLC

Subject

Hardware and Architecture,Information Systems,Theoretical Computer Science,Software

Reference23 articles.

1. TIOBE (2023) TIOBE programming community index for April 2023. https://www.tiobe.com/tiobe-index/. Accessed 19 Apr 2023

2. Cass S (2022) Top programming languages 2022. https://spectrum.ieee.org/top-programming-languages-2022 Accessed 19 Apr 2023

3. Harris CR (2020) Array programming with NumPy. Nature 585(7825):357–362

4. Virtanen P (2020) SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods 17:261–272

5. Dalcin L (2021) Mpi4py: status update after 12 years of development. Comput Sci Eng 23(4):47–54

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3