Skip to main content

Python bindings for MPI

Project description

This package provides Python bindings for the Message Passing Interface (MPI) standard. It is implemented on top of the MPI specification and exposes an API which grounds on the standard MPI-2 C++ bindings.

Features

This package supports:

  • Convenient communication of any picklable Python object

    • point-to-point (send & receive)

    • collective (broadcast, scatter & gather, reductions)

  • Fast communication of Python object exposing the Python buffer interface (NumPy arrays, builtin bytes/string/array objects)

    • point-to-point (blocking/nonblocking/persistent send & receive)

    • collective (broadcast, block/vector scatter & gather, reductions)

  • Process groups and communication domains

    • Creation of new intra/inter communicators

    • Cartesian & graph topologies

  • Parallel input/output:

    • read & write

    • blocking/nonblocking & collective/noncollective

    • individual/shared file pointers & explicit offset

  • Dynamic process management

    • spawn & spawn multiple

    • accept/connect

    • name publishing & lookup

  • One-sided operations

    • remote memory access (put, get, accumulate)

    • passive target synchronization (start/complete & post/wait)

    • active target synchronization (lock & unlock)

Install

Using pip

You can install the latest mpi4py release from its source distribution at PyPI using pip:

$ python -m pip install mpi4py

You can also install the in-development version with:

$ python -m pip install git+https://github.com/mpi4py/mpi4py

or:

$ python -m pip install https://github.com/mpi4py/mpi4py/tarball/master

Using conda

The conda-forge community provides ready-to-use binary packages from an ever growing collection of software libraries built around the multi-platform conda package manager. Four MPI implementations are available on conda-forge: Open MPI (Linux and macOS), MPICH (Linux and macOS), Intel MPI (Linux and Windows) and Microsoft MPI (Windows). You can install mpi4py and your preferred MPI implementation using the conda package manager:

  • to use MPICH do:

    $ conda install -c conda-forge mpi4py mpich
  • to use Open MPI do:

    $ conda install -c conda-forge mpi4py openmpi
  • to use Intel MPI do:

    $ conda install -c conda-forge mpi4py impi_rt
  • to use Microsoft MPI do:

    $ conda install -c conda-forge mpi4py msmpi

MPICH and many of its derivatives are ABI-compatible. You can provide the package specification mpich=X.Y.*=external_* (where X and Y are the major and minor version numbers) to request the conda package manager to use system-provided MPICH (or derivative) libraries. Similarly, you can provide the package specification openmpi=X.Y.*=external_* to use system-provided Open MPI libraries.

The openmpi package on conda-forge has built-in CUDA support, but it is disabled by default. To enable it, follow the instruction outlined during conda install. Additionally, UCX support is also available once the ucx package is installed.

Linux

On Fedora Linux systems (as well as RHEL and their derivatives using the EPEL software repository), you can install binary packages with the system package manager:

  • using dnf and the mpich package:

    $ sudo dnf install python3-mpi4py-mpich
  • using dnf and the openmpi package:

    $ sudo dnf install python3-mpi4py-openmpi

Please remember to load the correct MPI module for your chosen MPI implementation:

  • for the mpich package do:

    $ module load mpi/mpich-$(arch)
    $ python -c "from mpi4py import MPI"
  • for the openmpi package do:

    $ module load mpi/openmpi-$(arch)
    $ python -c "from mpi4py import MPI"

On Ubuntu Linux and Debian Linux systems, binary packages are available for installation using the system package manager:

$ sudo apt install python3-mpi4py

Note that on Ubuntu/Debian systems, the mpi4py package uses Open MPI. To use MPICH, install the libmpich-dev and python3-dev packages (and any other required development tools). Afterwards, install mpi4py from sources using pip.

macOS

macOS users can install mpi4py using the Homebrew package manager:

$ brew install mpi4py

Note that the Homebrew mpi4py package uses Open MPI. Alternatively, install the mpich package and next install mpi4py from sources using pip.

Windows

Windows users can install mpi4py from binary wheels hosted on the Python Package Index (PyPI) using pip:

$ python -m pip install mpi4py

The Windows wheels available on PyPI are specially crafted to work with either the Intel MPI or the Microsoft MPI runtime, therefore requiring a separate installation of any one of these packages.

Intel MPI is under active development and supports recent version of the MPI standard. Intel MPI can be installed with pip (see the impi-rt package on PyPI), being therefore straightforward to get it up and running within a Python environment. Intel MPI can also be installed system-wide as part of the Intel HPC Toolkit for Windows or via standalone online/offline installers.

Citation

If MPI for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpi4py-4.0.1.tar.gz (466.2 kB view details)

Uploaded Source

Built Distributions

mpi4py-4.0.1-pp310-pypy310_pp73-win_amd64.whl (1.6 MB view details)

Uploaded PyPy Windows x86-64

mpi4py-4.0.1-pp39-pypy39_pp73-win_amd64.whl (1.6 MB view details)

Uploaded PyPy Windows x86-64

mpi4py-4.0.1-pp38-pypy38_pp73-win_amd64.whl (1.7 MB view details)

Uploaded PyPy Windows x86-64

mpi4py-4.0.1-pp37-pypy37_pp73-win_amd64.whl (1.7 MB view details)

Uploaded PyPy Windows x86-64

mpi4py-4.0.1-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13 Windows x86-64

mpi4py-4.0.1-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12 Windows x86-64

mpi4py-4.0.1-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11 Windows x86-64

mpi4py-4.0.1-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

mpi4py-4.0.1-cp39-cp39-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

mpi4py-4.0.1-cp38-cp38-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

mpi4py-4.0.1-cp37-cp37m-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

mpi4py-4.0.1-cp36-cp36m-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.6m Windows x86-64

File details

Details for the file mpi4py-4.0.1.tar.gz.

File metadata

  • Download URL: mpi4py-4.0.1.tar.gz
  • Upload date:
  • Size: 466.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mpi4py-4.0.1.tar.gz
Algorithm Hash digest
SHA256 f3174b245775d556f4fddb32519a2066ef0592edc810c5b5a59238f9a0a40c89
MD5 443fd126aab32130d49eb80702abf561
BLAKE2b-256 08348499a92a387d24d0092c38089f8195f13c5c76f0f814126af3fe363e5636

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mpi4py-4.0.1-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 93f45dcc2fd5f3396f961b1bc8f0fb9d5db786fdc0d72e4f8611f47718b5dac8
MD5 6fea7902b767f662374f5b4a3003f845
BLAKE2b-256 172381aed5da44f9d743f1e76909fd04ae5dc122ff7c9f97fa0b40b8f752245c

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mpi4py-4.0.1-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 cd29eff4366f5182f3cbdac42ba62d0c5b17c6fc925dfe55cbe469fbe2d56cfb
MD5 e2462badf860f6dc34ffade3bfc58757
BLAKE2b-256 49fa14232c204cf8153dccab1db667f8989c24ec5488800882f7f6da701d670f

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mpi4py-4.0.1-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 72006d9d9cc0e17d2a354648839e0d9743c7b91223586c323090033114324ee4
MD5 3514444ad74fe9c4aca04a03c42750a7
BLAKE2b-256 1b7315deef60f860fbb835a285c42601319ed7d8c566ceca9f2fa6c7e6c4fe79

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-pp37-pypy37_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for mpi4py-4.0.1-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 2b8bfbb730c47214a6233512eb905b2b12a40a036d92e96e2c7dd9a3405d8b4a
MD5 e585264cf9e4e7739f4e67d05c882698
BLAKE2b-256 05207586a2a1c98219eaaeae6f840c2039b12235d93f3694f4ab854f0c6a8cac

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 52a7b1760b1aeb41a0ea38969314b2b170117a0ded2f689915f1cb89aaaf8a6f
MD5 6954393f0347a812952b2d37d1696753
BLAKE2b-256 9570cc361869a2920476ecc5f29c98e0130aaf2e177a0087cb7ebbafb90414f1

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b704e7db92b1ac94b96802e17cf28082455daa928e8e51398ad9f5e5eb8c9b7b
MD5 8d2935380026dfa351f10b86699b8d99
BLAKE2b-256 35287e5eae1a9940f48c41e208e9e6fdb56e497095030ab53e2d9ce702705cbb

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0cb209fcdc7fee0346d12edff1cfd1c1ffca1b807c53631ba0436b9c2bcf8229
MD5 15bac6b406a9f1f0ead0eaa4039264de
BLAKE2b-256 f4f76dfdee53f9806361ab75cb83ee5feab06a738f7f6a42715c79d72a783d31

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 600f26cae7f390b4ec525f5c1ccc374686c37a8c07f9c21320866c0a323f6dae
MD5 47da58e4de1810154a162180d0b5efeb
BLAKE2b-256 22157d2fd2ca8b1ae362371b2bb9b2f787f9166b6ecd536e0e773dce6b98a5a9

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bf15be241ed81bad0a0635cb47e0f20faa6ec4228f0fa955bf0128f43462b639
MD5 83314e646dd5888793dd1e88471ded51
BLAKE2b-256 23eabac8f36eca546345854d908861c258a2c7583ec6a3ea0c577dfe4005fc14

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f7e863ea266af98d25c3efb9b7d9f56265000001b57cf2fb98a986f4ec7daa3c
MD5 1aec4e58a1c0b34066b2509e7178a6ef
BLAKE2b-256 0156c52d256d298dad1131829a55aa381ebfd08723a8b273418b9c29fce1a2c8

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 05999b6e8536a1234456d739ea1e695105613a866cae9a86010f87875229ffc0
MD5 5c9ea58d3c09099dfd206099b8b08d60
BLAKE2b-256 8c400ac2c1ec176da93bb62cea2acb7b951eaa376be35edfc0015079c7d1604b

See more details on using hashes here.

File details

Details for the file mpi4py-4.0.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: mpi4py-4.0.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for mpi4py-4.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6fa09d03ec7aa1264fcf650670c52e06ae87110f0bc6f84bf29f0183f6d3d19a
MD5 6ebe53a25987950e58fcc111c1b7421a
BLAKE2b-256 eefad12a75409004ab237e652e45607b694e74bf8ed40a513236fd9f7372dd7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page