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.
L. Dalcin and Y.-L. L. Fang, mpi4py: Status Update After 12 Years of Development, Computing in Science & Engineering, 23(4):47-54, 2021. https://doi.org/10.1109/MCSE.2021.3083216
L. Dalcin, P. Kler, R. Paz, and A. Cosimo, Parallel Distributed Computing using Python, Advances in Water Resources, 34(9):1124-1139, 2011. https://doi.org/10.1016/j.advwatres.2011.04.013
L. Dalcin, R. Paz, M. Storti, and J. D’Elia, MPI for Python: performance improvements and MPI-2 extensions, Journal of Parallel and Distributed Computing, 68(5):655-662, 2008. https://doi.org/10.1016/j.jpdc.2007.09.005
L. Dalcin, R. Paz, and M. Storti, MPI for Python, Journal of Parallel and Distributed Computing, 65(9):1108-1115, 2005. https://doi.org/10.1016/j.jpdc.2005.03.010
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mpi4py-3.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e253ec95134b9a6e8ee5b68301e27abce76d3bfa694a2ca5f2b37924328d3892 |
|
MD5 | e4d563cf7d03313b136243939568837d |
|
BLAKE2b-256 | b4e45bee8f696d33e346c74f5b39daf9179ee585b900202a64d60d1b5d95d533 |
Hashes for mpi4py-3.1.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf1c6e4291a19213bfee76cc7bd8a2e3badd79e29c5beece6045567eeac0fef |
|
MD5 | f2a23c30993f62bf71eb7a78f12c2133 |
|
BLAKE2b-256 | 47964c08b371a9ef8241c7642681fb931d16a4381ac413114a8c53fc9b2ae8e3 |
Hashes for mpi4py-3.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b2a275bd809a322493f9bfcd54c2310b4417d89899e4634ecab40aea0766287 |
|
MD5 | 8215b8cdae95602524d90463854a44ea |
|
BLAKE2b-256 | 684a38fef7dd9e76d48f3eff90360058819a249696ff9d53fbe0ef730e3da931 |
Hashes for mpi4py-3.1.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b8c51c19d3281b0a13e6deb702b66449722acef65cac3b66b8f60e30b68efe |
|
MD5 | 87d32d8168bc1edc4421d6fb13541ed2 |
|
BLAKE2b-256 | d3137d19eb6dca055880a01e30b47ff0901398ff43306009ec311d68bd6c23c6 |
Hashes for mpi4py-3.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85f553b8ab2f34217b1631a3c6d5370366f5839e08a1e31a17c48d6ee69e1763 |
|
MD5 | f9cdde768bfdf5d7eba2fb2583849697 |
|
BLAKE2b-256 | 23115871e126206a88e78253b6e4483bd7a144d09bb880611471d65b932db74d |
Hashes for mpi4py-3.1.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a846c5da990c39a6dc819f1d8e812ecc1ad3e16b143de4ac05cb59daedf73bbb |
|
MD5 | ef8aa0ec621a5b70ae81d327d6ab32c1 |
|
BLAKE2b-256 | f297156308ac92844b3bb7904d8058b414a59c28b4fd1a9f5850e8d90d541288 |
Hashes for mpi4py-3.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a03b2b5ce000204d668ec0831a9629ddd7d76eac1af18d763288a799490785e |
|
MD5 | 6cd6a826ac8006e999d5c158a7dbd59a |
|
BLAKE2b-256 | 013b2899665c35b8b48237e19da48e41dc84d311532bf395682abc8faa1df1ad |
Hashes for mpi4py-3.1.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7408397c8b3899568a8c58259f7c324c3ea231af1f89dfe585b6c720e5fc7383 |
|
MD5 | e695fdd3588b0302c4e1ac0676048b86 |
|
BLAKE2b-256 | cb666e8a18c1657f4e21bbc4e5ff765bd8a70cca25d6b00e23325ba8ea78651d |
Hashes for mpi4py-3.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddbc4223f150e47ee269d86746ac23cf3ea2da91a3ec678e123e452f263fbc14 |
|
MD5 | 77a36e7a9c9b0a3a5c7d68ae9d19cb7b |
|
BLAKE2b-256 | eadfaf64256188b3273753bcc1b86681439404753c82c5245cccc87b6775d4d3 |
Hashes for mpi4py-3.1.2-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 977136294fbe6a62ff3190b8eb3d9fa815b6827dcc95d4a69e7112e0306d07eb |
|
MD5 | fcc5559e9181e9f4402711753c763a6e |
|
BLAKE2b-256 | d699a51d0ce31b029a29d43c585b998981b5c95c612956bb84004363b676ed8d |
Hashes for mpi4py-3.1.2-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f35f302799d837595beee3c1a6df9be60c1068041451e03f40dbd375a6658c2 |
|
MD5 | 864fe00ee5fcf4adc001ec1350910509 |
|
BLAKE2b-256 | 832bf5b99b255fd39ec32eaf0df40231137477c095833708c223db35aea0e549 |
Hashes for mpi4py-3.1.2-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3021a1de6ac451712a9f7218b75f621e400187c6957d3a7757f2c258f3524cc |
|
MD5 | 86d4e3e9eb451b8002ba935dfc0cec5a |
|
BLAKE2b-256 | c73141ece2c30f4a1d9d34e8e0b061b9cc4b4119733a6fdeb4f1d29e5b5166a6 |
Hashes for mpi4py-3.1.2-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9229b3721e65c23fc850aee76441fdec1dfba3eea11a00dec7c716e054ce4dfa |
|
MD5 | b4fa2288669dcefbf0cdd010672813b0 |
|
BLAKE2b-256 | 65fcde84cbaa2892e029dba11947b87798e8ede50d8db20346eb56528dd1c195 |
Hashes for mpi4py-3.1.2-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b838356d22e920e65d7523006e602944c02a2b4433642a275299ff163f08459f |
|
MD5 | a5696bc44cc8e35762f2c463f1b2f40b |
|
BLAKE2b-256 | 99d94f48becb4121752465b77cf381c8d6f82664840910e57db5d9a80cecd458 |