An MPI wrapper for Python
Project description
Installing and Using mpiPython on Debian-based Systems
Overview
This guide outlines the steps to install and use mpiPython on Debian-based systems.
Prerequisites
- Debian-based system (e.g., Ubuntu, Debian)
build-essentialpackage installed (provides necessary compilers and tools)- 'mpich' the program is made to work with this, you can either have it installed by package manager or custom compiled with '--enable-shared'
- Python 3.12
Installation Steps
- Install required packages:
sudo apt install build-essential mpich
- Install mpiPython:
pip install mpiPython
- Compile Library
python -m mpiPython
The last step is not technically needed, but because mpiPython will self compile the library if it is not present, running a program with a lot of nodes will have every node compile the shared library.
Additional Notes
- Virtual Environments: Consider using virtual environments to isolate Python environments and avoid conflicts.
Using mpiPython
Once installed, you can import and use mpiPython in your Python scripts:
from mpiPython import MPIpy
MPI = MPIpy()
rank = MPI.Rank()
size = MPI.Size()
print("Hello from process {} out of {}".format(rank, size))
To run program:
$mpirun -n 2 python file.py
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mpipython-1.0.4.tar.gz.
File metadata
- Download URL: mpipython-1.0.4.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea9f64a65746d1d837ca71a69fb106f2ee599bf389cfdd68d71cae463350b8cd
|
|
| MD5 |
83d306c1d6427733625cee6e9acf7b1d
|
|
| BLAKE2b-256 |
77d1bf189e1c337c975e9c392a1f3e2950cdc969e49ae31551ec28175f4a1c74
|
File details
Details for the file mpiPython-1.0.4-py3-none-any.whl.
File metadata
- Download URL: mpiPython-1.0.4-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
899f9420d86f29dcbcfa684e4c99660e628e1899e5eb7df125997b46019101ea
|
|
| MD5 |
0b9d8612bab16fb29fc1a2439534e195
|
|
| BLAKE2b-256 |
02d76d92760dff546595e4f740b6fe9ef651175302c3e2955d97ac24e58fdb7a
|