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.6.tar.gz (2.4 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.6-cp312-cp312-win_amd64.whl (471.9 kB view details)

Uploaded CPython 3.12Windows x86-64

mpi4py-3.1.6-cp312-cp312-win32.whl (398.2 kB view details)

Uploaded CPython 3.12Windows x86

mpi4py-3.1.6-cp311-cp311-win_amd64.whl (466.1 kB view details)

Uploaded CPython 3.11Windows x86-64

mpi4py-3.1.6-cp311-cp311-win32.whl (394.8 kB view details)

Uploaded CPython 3.11Windows x86

mpi4py-3.1.6-cp310-cp310-win_amd64.whl (472.2 kB view details)

Uploaded CPython 3.10Windows x86-64

mpi4py-3.1.6-cp310-cp310-win32.whl (398.6 kB view details)

Uploaded CPython 3.10Windows x86

mpi4py-3.1.6-cp39-cp39-win_amd64.whl (475.9 kB view details)

Uploaded CPython 3.9Windows x86-64

mpi4py-3.1.6-cp39-cp39-win32.whl (402.0 kB view details)

Uploaded CPython 3.9Windows x86

mpi4py-3.1.6-cp38-cp38-win_amd64.whl (480.2 kB view details)

Uploaded CPython 3.8Windows x86-64

mpi4py-3.1.6-cp38-cp38-win32.whl (406.4 kB view details)

Uploaded CPython 3.8Windows x86

mpi4py-3.1.6-cp37-cp37m-win_amd64.whl (459.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

mpi4py-3.1.6-cp37-cp37m-win32.whl (394.7 kB view details)

Uploaded CPython 3.7mWindows x86

mpi4py-3.1.6-cp36-cp36m-win_amd64.whl (520.5 kB view details)

Uploaded CPython 3.6mWindows x86-64

mpi4py-3.1.6-cp36-cp36m-win32.whl (428.0 kB view details)

Uploaded CPython 3.6mWindows x86

mpi4py-3.1.6-cp35-cp35m-win_amd64.whl (474.0 kB view details)

Uploaded CPython 3.5mWindows x86-64

mpi4py-3.1.6-cp35-cp35m-win32.whl (389.2 kB view details)

Uploaded CPython 3.5mWindows x86

mpi4py-3.1.6-cp27-cp27m-win_amd64.whl (484.8 kB view details)

Uploaded CPython 2.7mWindows x86-64

mpi4py-3.1.6-cp27-cp27m-win32.whl (406.1 kB view details)

Uploaded CPython 2.7mWindows x86

File details

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

File metadata

  • Download URL: mpi4py-3.1.6.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6.tar.gz
Algorithm Hash digest
SHA256 c8fa625e0f92b082ef955bfb52f19fa6691d29273d7d71135d295aa143dee6cb
MD5 61698853910bdac35abc8d13dd7628cc
BLAKE2b-256 b3171d146e0127b66f1945251f130afac430985d2f9d75a3c0330355f21d876a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 471.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 606264e22c315de6250745fa84267c18a7370a16bd6c51acf226cbb977d0a10b
MD5 96d58828700a49dfda6a7f0364861293
BLAKE2b-256 b72ff05dac9455c403a966a44d536b9e382ead01806e39ac80064e81cac1e5a1

See more details on using hashes here.

File details

Details for the file mpi4py-3.1.6-cp312-cp312-win32.whl.

File metadata

  • Download URL: mpi4py-3.1.6-cp312-cp312-win32.whl
  • Upload date:
  • Size: 398.2 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 6662ffa622ee21041dcfd95bffd4b81906349e22d993239cc0abd17ebca6bed0
MD5 29970703898bfffe6e415b8cbb6c1ddf
BLAKE2b-256 c0fba567326df4fbe3480cc0ac9a71c2dd9ae1962a90d8bbc069e97f762e6a11

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 466.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 542fa0b3caa69fbb8f5e8ea60fea3414eef1444d93af28b4ee6486a3f8f27640
MD5 cf46a7f6dff58df9f210b22dcc9907bb
BLAKE2b-256 638a0f89c8e629905ec6573f7896fedab4a2128750cb7868105a7ff7897e7d45

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp311-cp311-win32.whl
  • Upload date:
  • Size: 394.8 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 33d16f85d827417fd451ae61c304a26f5a1c3e881d9555c58fc8d5c7ac171034
MD5 a5e33947337791870212a0334cabdf0e
BLAKE2b-256 e601d76a88df482cb7ab23070d104912c33af170926dce044903598d7019526f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 472.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 242459fcfd18c50b2ad6cd15f433efbaad1f12f4a343bdff5fa1720f4797317d
MD5 cbddbaf8d587d801d4b4a0c16b9498dc
BLAKE2b-256 c89ebc87c559c346333b26c1e799f19b0b16f6eacd7e924775249a58a3024ad6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp310-cp310-win32.whl
  • Upload date:
  • Size: 398.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 57cb8cc5e4f5730ca2116b4918fddb158bdac3852b57b0fb799278bcd2f9df03
MD5 414a8bf2927176119cf2996bcd8578e4
BLAKE2b-256 1c9cb48351f9d34f82bdf80f4f7af8670c9563fd49e29e248b6f2ea9afa20a4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 475.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f9a35e23deadf7de9063523f19863957f379d0f13afc2b9787eafc9d570ab868
MD5 3ab13304b44ce2a6535f6e132d0006a0
BLAKE2b-256 0f4bbded5401ca5602a84558fc8b5586c9fc785e5390534178368664df11d637

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp39-cp39-win32.whl
  • Upload date:
  • Size: 402.0 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 e8bd3fd0056580b1aaa4966ab9e54566bf6d6b35ff94c0ee7ceba83d55d039ac
MD5 743ef3b2cd748f413c1128c0748b5228
BLAKE2b-256 54daeb64e9dca1a39fc668c698db9ffd949573b8f979dbc1cbc3a1f8eeb33e66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 480.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ac671aa8c512fff432e0c1670c94eabd5571f5085c61579fee534b5b9e41bcf4
MD5 1a20e1565f9a0c0bcc87a4d8391a8908
BLAKE2b-256 cf9dcce868ab0f5f983555204bbf8b61bd770742d1231b8f7050671726f8d8bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp38-cp38-win32.whl
  • Upload date:
  • Size: 406.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 8f9810decd319110b7dcf7a210a76d7db6a39d4c2b33c750ac4dc4638d7ce012
MD5 729e0eb17c4d1d0c8dce3c8e9f8c5112
BLAKE2b-256 c2b05ff0ca089696854bcdb1ffdbb52cedf34153e442766f0dc451a4ee051508

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.6-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c0dfd9dbbcfa2fe61031eaba714f1f814e59439188b0a5ac063b2edc42daa234
MD5 7da6a7b3bd3ab6517488e01ac65f88f1
BLAKE2b-256 f2c947381daf65991eeda8a538ee24fafd8e97c59725f748786fb1a3a6f25498

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 394.7 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 67d28b5e5102a9d44eac6bc2765c2e28966b6b79cd54e0ea432403e054c70946
MD5 1a93b06c7c2426ae20827e2d0d10e4f5
BLAKE2b-256 f9582fc682a5d72d9d7a80a287267b40e382cf62e45f78bc2363eee57f463b42

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.6-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 76ecc87605193ef906597cadef571cabc8731ed1848a8c92320385c10ed41168
MD5 62c17cb145397f61057877de34663986
BLAKE2b-256 aa01d22ffe1183b554f18b047924cfbd847798a03fb86b5b19bd66cb88888513

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 428.0 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 757e324084c41f84b257b6d03850e73803bafea1b5e94dd6f9ebb3a149764299
MD5 4d543e9dee56482c3dcda79c853d0895
BLAKE2b-256 e48e328bcb9664e53daa7dba4d3e43742097851bb186944c7c4bcbdd9e36a4ba

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.6-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 8dfadb2d7b50bda0f5c8538f8b5af5b2f830babc7c43a267102407a29616c38f
MD5 de085078396f53f6954bd68ea8ca41f3
BLAKE2b-256 0cb5e75bb186a82734771d4f189af4776fb21cff4a38805c26be87b393bd1b63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 389.2 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 1de7f6bd22ea6c9b1d6cb42e9d8092217552ffc8267f81df884b61f46aef557c
MD5 9343bbb1f82c6f828013b79225b2dec3
BLAKE2b-256 9c84e7fe23f71e6499dd19943653c47c469f8657daaf0848eb5aeac24f9f3f32

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for mpi4py-3.1.6-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 ea8a65f74707e1be5a0125ae3f4f6c0c475c3d845d623b9f5686a919c1119439
MD5 356d7e106349132e841803fedfac5fff
BLAKE2b-256 ab4d355e6ce7c9400e47cb85a354a0889d3002d152a183e070f2abd59204a829

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpi4py-3.1.6-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 406.1 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.2

File hashes

Hashes for mpi4py-3.1.6-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 95f27e00f3951f9c1533cd99ffeae2f384f7ba53cc3870ee06c3c88f9e5bd6c3
MD5 d4566407bdbe67a53df34f03ed90343e
BLAKE2b-256 adc29b4a54aaae3aa4a0cc08d9d91dad9430a7d5ca2784ff0c3bf5019ffc705c

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