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.10 to 3.12
Installation Steps
- Install required packages:
sudo apt install build-essential mpich
- Install mpiPython:
pip install mpiPython
Explanation
build-essential: Provides necessary tools like the C compiler for building mpiPython.pip install mpiPython: Installs the mpiPython package.
Additional Notes
- MPICH Installation: Ensure that MPICH is installed with the
--enable-sharedflag during compilation. This is crucial for mpiPython to function correctly. - Python Version: This guide assumes Python 3.10 to 3.12. Adjust commands accordingly if using a different Python version.
- Error Handling: If you encounter errors, check the logs or output of the commands for more details.
- 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 MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
print("Hello from process {} out of {}".format(rank, size))
By following these steps, you should have a working mpiPython environment on your Debian-based system.
Would you like to know more about specific use cases or troubleshooting mpiPython?
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.1.tar.gz.
File metadata
- Download URL: mpipython-1.0.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6acf97f61583270cfa4125a4ff5c8fe3b732ef71bda8b65af71005b95ab28ac8
|
|
| MD5 |
623c069f8860f4c5d4697456eec9fbef
|
|
| BLAKE2b-256 |
7371eb73dba90004bc64ec0179a6845f2c3c7a4bb33e6da98b44b56e3c409c26
|
File details
Details for the file mpiPython-1.0.1-py3-none-any.whl.
File metadata
- Download URL: mpiPython-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476eb1f8f4ba2994b4962aa4d3acac15e6dc102a780f265fa526357e9af49dfc
|
|
| MD5 |
feecc8c828192ded0d4f7e1c1e18fe0f
|
|
| BLAKE2b-256 |
952e1c86c316640100b5365116a2fa4a0c97a5702258273c764660f45db92b41
|