# MPI for Python

Author:

  Lisandro Dalcin

Contact:

  dalcinl@gmail.com

Date:

  March 20, 2026

Abstract

MPI for Python provides Python bindings for the Message Passing Interface (MPI) standard, allowing Python applications to exploit multiple processors on workstations, clusters and supercomputers.

This package builds on the MPI specification and provides an object oriented interface resembling the MPI-2 C++ bindings. It supports point-to-point (sends, receives) and collective (broadcasts, scatters, gathers) communication of any picklable Python object, as well as efficient communication of Python objects exposing the Python buffer interface (e.g. NumPy arrays and builtin bytes/array/memoryview objects).

Contents

- Introduction
  - What is MPI?
  - What is Python?
  - Related Projects
- Overview
  - Communicating Python Objects and Array Data
  - Communicators
  - Point-to-Point Communications
  - Collective Communications
  - Support for GPU-aware MPI
  - Dynamic Process Management
  - One-Sided Communications
  - Parallel Input/Output
  - Environmental Management
- Tutorial
  - Running Python scripts with MPI
  - Point-to-Point Communication
  - Collective Communication
  - Input/Output (MPI-IO)
  - Dynamic Process Management
  - GPU-aware MPI + Python GPU arrays
  - One-Sided Communication (RMA)
  - Wrapping with SWIG
  - Wrapping with F2Py
- mpi4py
  - Runtime configuration options
  - Environment variables
  - Miscellaneous functions
- mpi4py.MPI
  - Classes
  - Functions
  - Attributes
- mpi4py.typing
- mpi4py.futures
  - MPIPoolExecutor
  - MPICommExecutor
  - Command line
  - Parallel tasks
  - Utilities
  - Examples
  - Citation
- mpi4py.util
  - mpi4py.util.dtlib
  - mpi4py.util.pkl5
  - mpi4py.util.pool
  - mpi4py.util.sync
- mpi4py.run
  - Exceptions and deadlocks
  - Command line
- mpi4py.bench
- Reference
  - mpi4py.MPI
- Citation
- Installation
  - Wheel packages
  - Conda packages
  - System packages
  - Building from sources
  - Build backends
- Development
  - Prerequisites
  - Building
  - Installing
  - Testing
- Guidelines
  - Fair play
- LICENSE
- CHANGES

- Index