Skip to main content

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-essential package 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

  1. Install required packages:
    sudo apt install build-essential mpich
    
  2. 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-shared flag 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpipython-1.0.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpiPython-1.0.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for mpipython-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6acf97f61583270cfa4125a4ff5c8fe3b732ef71bda8b65af71005b95ab28ac8
MD5 623c069f8860f4c5d4697456eec9fbef
BLAKE2b-256 7371eb73dba90004bc64ec0179a6845f2c3c7a4bb33e6da98b44b56e3c409c26

See more details on using hashes here.

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

Hashes for mpiPython-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 476eb1f8f4ba2994b4962aa4d3acac15e6dc102a780f265fa526357e9af49dfc
MD5 feecc8c828192ded0d4f7e1c1e18fe0f
BLAKE2b-256 952e1c86c316640100b5365116a2fa4a0c97a5702258273c764660f45db92b41

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