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/nonbloking/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/nonbloking & 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 syncronization (start/complete & post/wait)

    • active target syncronization (lock & unlock)

Install

You can install mpi4py from its source distribution 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

Installing from source requires compilers and a working MPI implementation. The mpicc compiler wrapper is looked for on the executable search path (PATH environment variable). Alternatively, you can set the MPICC environment variable to the full path or command corresponding to the MPI-aware C compiler.

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. Three MPI implementations are available on conda-forge: Open MPI (Linux and macOS), MPICH (Linux and macOS), and Microsoft MPI (Windows). You can install mpi4py and your preferred MPI implementation using conda:

* 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 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.

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.

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 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 users can install mpi4py from binary wheels hosted on the Python Package Index (PyPI) using pip:

$ python -m pip install mpi4py

Windows wheels require a separate, system-wide installation of the Microsoft MPI runtime.

Citations

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

Project details


Download files

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

Source Distribution

mpi4py-3.1.3.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mpi4py-3.1.3-cp310-cp310-win_amd64.whl (539.9 kB view details)

Uploaded CPython 3.10Windows x86-64

mpi4py-3.1.3-cp310-cp310-win32.whl (442.3 kB view details)

Uploaded CPython 3.10Windows x86

mpi4py-3.1.3-cp39-cp39-win_amd64.whl (539.9 kB view details)

Uploaded CPython 3.9Windows x86-64

mpi4py-3.1.3-cp39-cp39-win32.whl (442.2 kB view details)

Uploaded CPython 3.9Windows x86

mpi4py-3.1.3-cp38-cp38-win_amd64.whl (547.0 kB view details)

Uploaded CPython 3.8Windows x86-64

mpi4py-3.1.3-cp38-cp38-win32.whl (449.0 kB view details)

Uploaded CPython 3.8Windows x86

mpi4py-3.1.3-cp37-cp37m-win_amd64.whl (520.2 kB view details)

Uploaded CPython 3.7mWindows x86-64

mpi4py-3.1.3-cp37-cp37m-win32.whl (435.1 kB view details)

Uploaded CPython 3.7mWindows x86

mpi4py-3.1.3-cp36-cp36m-win_amd64.whl (517.8 kB view details)

Uploaded CPython 3.6mWindows x86-64

mpi4py-3.1.3-cp36-cp36m-win32.whl (434.9 kB view details)

Uploaded CPython 3.6mWindows x86

mpi4py-3.1.3-cp35-cp35m-win_amd64.whl (472.3 kB view details)

Uploaded CPython 3.5mWindows x86-64

mpi4py-3.1.3-cp35-cp35m-win32.whl (387.9 kB view details)

Uploaded CPython 3.5mWindows x86

mpi4py-3.1.3-cp27-cp27m-win_amd64.whl (483.1 kB view details)

Uploaded CPython 2.7mWindows x86-64

mpi4py-3.1.3-cp27-cp27m-win32.whl (404.7 kB view details)

Uploaded CPython 2.7mWindows x86

File details

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

File metadata

  • Download URL: mpi4py-3.1.3.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3.tar.gz
Algorithm Hash digest
SHA256 f1e9fae1079f43eafdd9f817cdb3fd30d709edc093b5d5dada57a461b2db3008
MD5 e6d0644a2a3c7aa5119825d35ebeb8ee
BLAKE2b-256 2050d358fe2b56075163b75eca30c2faa6455c50b9978dd26f0fc4e3879b1062

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 539.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b5abeda929cdfd66abd9e0de8d03e6e43dcf53d8152750cb47a14837e519fcd8
MD5 acafed3b2f0316248f18386575931f30
BLAKE2b-256 88b2c03f6b97d379e06d77f2a3c3e9dac5f068cf9cd55ccb4afd8daf0d8f54cc

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp310-cp310-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp310-cp310-win32.whl
  • Upload date:
  • Size: 442.3 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 ad64e8daf48943c9f51ea12b11f6681754a2f3f3a0f2d7e2158844343193305c
MD5 779c52e99ecf662b288f4846205c1ce3
BLAKE2b-256 b05974791219a67430010b9dc3d2c1d43a36c75254243d5a9958ea884ccc7552

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 539.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 57c3d41f44b6fe68c043a145a5fddbe5e0fb36af67929c6292ca41b7d9f0c6f4
MD5 e9e890b7058b81cd1099627c61852967
BLAKE2b-256 f6281dc7e2726b5fd08a61ef3fa2320237e31df2e7ab91f58dcf829bc6d6054c

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp39-cp39-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp39-cp39-win32.whl
  • Upload date:
  • Size: 442.2 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 32c4ccc1fa2578bf22c01cc532aae363672a921c6efe44a4937a7990c1b12129
MD5 c0ede9e86491f98b1302aaebb4c26d39
BLAKE2b-256 114e44c0903b27033c9f88671f0bfbdb33aee9c7198b4b5292be6bbcd3f0e778

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 547.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d1989b3dd36c3bc42906183fc8ea7789e7e797c5abd0cee75b2bcbb6f3a4b59c
MD5 6dfce72488ba18a69ec0a0bcba0c6913
BLAKE2b-256 dcb36b4f40e38c01966b12f05f76195c53c346eb2115a9f581ddfefcb564f95a

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp38-cp38-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp38-cp38-win32.whl
  • Upload date:
  • Size: 449.0 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 2d1accd5544f78079ae19ee912e3311692219444d8cb64360b822984f94604b9
MD5 d13f9c25defb83da2f498d459d79f419
BLAKE2b-256 df1dc09b1cd769475506bd1fb04339731456eb179ce7e94e2cb4d47cca499a1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.3-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 520.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 ff84488f701ce60e141bb55f57b4039e041163054e5d16bd348c874180df2451
MD5 c8fdfdaa9be159f88364d39b14971727
BLAKE2b-256 920c72405d632c87e7722ec5b4c9774dfd812fcecdc8adcffd245344fc7fa615

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp37-cp37m-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 435.1 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 a3d3731ac7dbb6a80ff138c9321e7b31bdede804a1c7881fabce5ba3e0620a58
MD5 f0cf3f4cee4262b1790ab6d590941be0
BLAKE2b-256 48f78305930561a2b4c12559888ee1066717c200a939c9d58aaafdb87d643ffd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.3-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 517.8 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5a78b0948d74422e2b597f8caebd129421d22bc786301f046edf95b726a34e3e
MD5 b95ab3243b93e3b4a0098822f25bdcbf
BLAKE2b-256 08b6745fbef030505d8a430cc32da06c6ccde59a2911efa9489eb49c272dfc02

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp36-cp36m-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 434.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 19aada1336bbcc9b04f7e72d6a4f3074ba67e177eada7241dc259789f70e0d56
MD5 57398540e3ee1409b7293bfc33316466
BLAKE2b-256 42c7fa16fc147712649628e15ac94630ab464d38e00a6e092f66241d028a2443

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 472.3 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 44c24f7aec24f09e4b9d3d77082509e914ab836c2d8281091cfde8a1072ed08a
MD5 5fe2364b9781fabf07761f5826fadf98
BLAKE2b-256 f72390e9454dcda243bef36bda3d09639c42acd9fc2531b6eb3cd298adbe38e8

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp35-cp35m-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 387.9 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 e309d642a22808e2cf16188e3acb66aa83c513ba8702392cd82d3c876a576131
MD5 a25e2496daced6d42059865e82a92074
BLAKE2b-256 97ffb2e9411f301ab0be1752b09812c65407cdc09a7d136102ddd60e8b128cbc

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 483.1 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ba67935e2d80c3d50ecd38280a082dfe586a25acd8c68ccbe24d65055cf03874
MD5 8e99618c1312a5953c4df3f897c9d8dc
BLAKE2b-256 62b37231f50e490ea6c4882dce2891c678a5ad19854ec66cfff00ae12ab31a54

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.3-cp27-cp27m-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.3-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 404.7 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for mpi4py-3.1.3-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 ae07361c343539364f09b9099a3456e7849aae593c631633ea90bd164cd7e61c
MD5 725dbbfe1a400c884b0184b6363aefb7
BLAKE2b-256 7d07f978a452be22baa2462085fff01f6ddffdea07c66d010de910e8cca71483

See more details on using hashes here.

Supported by

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