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.4.tar.gz (2.5 MB view details)

Uploaded Source

Built Distributions

mpi4py-3.1.4-cp311-cp311-win_amd64.whl (464.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

mpi4py-3.1.4-cp311-cp311-win32.whl (393.3 kB view details)

Uploaded CPython 3.11 Windows x86

mpi4py-3.1.4-cp310-cp310-win_amd64.whl (470.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

mpi4py-3.1.4-cp310-cp310-win32.whl (397.3 kB view details)

Uploaded CPython 3.10 Windows x86

mpi4py-3.1.4-cp39-cp39-win_amd64.whl (474.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

mpi4py-3.1.4-cp39-cp39-win32.whl (401.0 kB view details)

Uploaded CPython 3.9 Windows x86

mpi4py-3.1.4-cp38-cp38-win_amd64.whl (478.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

mpi4py-3.1.4-cp38-cp38-win32.whl (405.1 kB view details)

Uploaded CPython 3.8 Windows x86

mpi4py-3.1.4-cp37-cp37m-win_amd64.whl (457.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

mpi4py-3.1.4-cp37-cp37m-win32.whl (393.8 kB view details)

Uploaded CPython 3.7m Windows x86

mpi4py-3.1.4-cp36-cp36m-win_amd64.whl (518.2 kB view details)

Uploaded CPython 3.6m Windows x86-64

mpi4py-3.1.4-cp36-cp36m-win32.whl (435.1 kB view details)

Uploaded CPython 3.6m Windows x86

mpi4py-3.1.4-cp35-cp35m-win_amd64.whl (472.8 kB view details)

Uploaded CPython 3.5m Windows x86-64

mpi4py-3.1.4-cp35-cp35m-win32.whl (388.2 kB view details)

Uploaded CPython 3.5m Windows x86

mpi4py-3.1.4-cp27-cp27m-win_amd64.whl (483.7 kB view details)

Uploaded CPython 2.7m Windows x86-64

mpi4py-3.1.4-cp27-cp27m-win32.whl (405.1 kB view details)

Uploaded CPython 2.7m Windows x86

File details

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

File metadata

  • Download URL: mpi4py-3.1.4.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4.tar.gz
Algorithm Hash digest
SHA256 17858f2ebc623220d0120d1fa8d428d033dde749c4bc35b33d81a66ad7f93480
MD5 09e20c0128207303a3d0462eb6b0c0e3
BLAKE2b-256 bcf2749af7fd0e7703ddca6cea525ab40f26c3ca6cbe6c23658441c6f9705860

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 464.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5785eecf65669fa97e258d087a86e5b2c5e4dd2b5140e9aee14917cadfe3c876
MD5 3395ae203636af48c6678c6e733ad06f
BLAKE2b-256 b931e80c1fb71fac3203ab54c4115211cbec2b9d8575df895b202abaee9a65a1

See more details on using hashes here.

Provenance

File details

Details for the file mpi4py-3.1.4-cp311-cp311-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.4-cp311-cp311-win32.whl
  • Upload date:
  • Size: 393.3 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 f37859af5a318d1af07d3b51714fd36b7674e7368191578cfd96165136279f2d
MD5 02c349ed8063bf0e19f80ca50c9684c1
BLAKE2b-256 029b4f3ce5d2f319d4e5bd5637c883039d0c96cb238d9fab7e13532d1c8bc13e

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 470.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d939c895ae97256e80ef6e6d626f51bea187d68ab54dd772971fb134632e7ee6
MD5 22767c198cd8d9b80e8c96071650200e
BLAKE2b-256 ccdd9af685a676c43d79d42f77e09d09e054a9a0b3952fe9842a51af0e7d8c06

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp310-cp310-win32.whl
  • Upload date:
  • Size: 397.3 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 6a7c9dfd1d051aeb1c5c9cc37d8997701732e2e1780f4e188c29c443f6feb6b8
MD5 be92a36252b0de6b2a174f3862daf55b
BLAKE2b-256 1426ed324d2c10ad987b58bf06cdb796974019b309aa8f57210fc7a299bb5afd

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 474.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 56c79531fc9af9a099c413f38efb20503a84b8355d72a63f0297399f474d88c9
MD5 e8387c642919358a7d5739c8e7128f89
BLAKE2b-256 984e5bfd29c67e42c2a86e231074db2751f86f0a939129964e3cadf3c6791d2d

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp39-cp39-win32.whl
  • Upload date:
  • Size: 401.0 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 9e3075e06cea9556cae6562d9194d2c6278c6c8f66af36d8094fb2f77392a90f
MD5 a18e533241af050092a6de35391d6b3d
BLAKE2b-256 5e23a96fbf1d3e559ef6612be31572a352ad0d63ed80a4d6f7b6e59553ba85b0

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 478.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6721a23a2a8ef5a2841ba64926e8e4be0a559344557eef0b2e81821283d56fd1
MD5 48a61e545c96024827c6b0832919bbc8
BLAKE2b-256 d16865d808ea61a902a56ffccb1e0ee6a0dbb2765f72fed442eb8055c89662ac

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp38-cp38-win32.whl
  • Upload date:
  • Size: 405.1 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 bc102ec71939bff487af247f727216a05c45930d931db3f5b206fad9bfcba9c0
MD5 8a643e04a92abbdc056bd8431285119a
BLAKE2b-256 6c8e2e4b165e729a0bb64ae0aaf8457d6fda918229a84a746f97377ad1de81d9

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 152e68aeae40279ca435d15487303159fe3d229337f204141ea805c67b4fbbc3
MD5 90f2a554d3d40b8758b1a061eb5ea42d
BLAKE2b-256 a8d76ba539e8233e14b29c66eca6199f0dcbe7b2b79b9496bd68dd1695d73bf7

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 393.8 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 32b46ed9d4691ea790d77dde6c5489abd6a4cf6f8e61c35871924c2170bcb7fb
MD5 deff0a39a3455e44c9458038d2d650ec
BLAKE2b-256 04e7029680f73ac7bc675c697de812e587f8f8851c644cba6eabfd1ab6575271

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 6ad6318092adc2bda1567b651d8977f2e418312557cda900805f929f6ccd93b9
MD5 96025d9e22c96bf1ac626efc685dda1d
BLAKE2b-256 242122cb3e76962a977691f901452b64e7c18721808617be5d22cf936108d945

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 435.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 4fac4ea098f877ac2d53e6c08f12e84161b960238725ec65795cb4ca391a0649
MD5 4b017a492f354ceebcc0d3c357f02dde
BLAKE2b-256 55e0c716e83ac8a2c3364d122a25561535e7c7f30ddb170407261e2b84c3db09

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 472.8 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 a0c7f5cee1ffc19d0d145b24eb06997962fe0a07e3019abf5e1575fb43c4ac03
MD5 be1b977ec2b0539a4ee6e37ff115b115
BLAKE2b-256 5ef6b46ac69e986898eb790aa4a4626dea06a11b17f84b9d8442ca0e81799c58

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 388.2 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 9ed1b189f859337acc49c2a12a7e13cb2ef3309ce3486b986b082078c4e7493e
MD5 c911466e933153b0ea8c9e4a5031b0e2
BLAKE2b-256 badd3f0796bc4986d722f2bbcc75c9cae0af220e0904022f5c0b328b96f98388

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 483.7 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 878ee8c66f3cb4aced2d9d6bde2bbcb5d17d1f90ad0b7407f57e993f6c849a16
MD5 6ca4cca5ef247419026c6bd1df3622c4
BLAKE2b-256 211b2ceccb6806fb9777221be75d677337f80036f8ed7ef44ab7b42c1c786b36

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: mpi4py-3.1.4-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 405.1 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for mpi4py-3.1.4-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 1f5f5560211e5b02c388a4e9521acdc5c6ab076e18a60109dc4bcbdb26f0e506
MD5 308d4ff7e83be2ff1ff7e4c05e91d1af
BLAKE2b-256 70d36260334dee4eeee5b3cfdca13d43a9b83154ba02f98aff4729dde6726a75

See more details on using hashes here.

Provenance

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