Skip to main content

PyLauncherMPI

Flake8 Lint

A simple MPI-based task scheduler for dynamically distributing commands across MPI processes.

How to use

Assuming there is access to HPC resources with MPI capabilities, PyLauncherMPI can be used to dynamically allocate tasks to processes. Tasks are defined as shell commands in a file, one line per task, like so:

taskfile

./my_program arg1 arg2 arg3
./my_program arg4 arg5 arg6
...

Two environment variables need to be speified, LAUNCHER_WORKDIR (the absolute path from which all tasks will be executed), and LAUNCHER_JOB_FILE (the path to the task file relative to LAUNCHER_WORKDIR).

The following is an example SLURM script using PyLauncherMPI.

#!/bin/bash
#SBATCH -J test_job        # Job name
#SBATCH -o test_job.o%j    # Name of stdout file
#SBATCH -e test_job.e%j    # Name of stderr error file
#SBATCH -p xyz             # Queue (partition) name
#SBATCH -N 3               # Total # of nodes
#SBATCH -n 144             # Total # of mpi tasks
#SBATCH -t 00:02:30        # Run time (hh:mm:ss)
##SBATCH --mail-user=username@address.xyz
##SBATCH --mail-type=all
#SBATCH -A allocation_name # Allocation name (req'd if you have more than 1)

source $HOME/.bashrc

micromamba activate rid_prj
# (Or use any other way to activate the environment where PyLauncherMPI is installed.)

export OMP_NUM_THREADS=1
export PYTHONPATH=$PYTHONPATH:$(pwd):$HOME/bin
export LAUNCHER_WORKDIR=/path/to/project/root/directory
export LAUNCHER_JOB_FILE=relative/path/name_of_taskfile

ibrun pylaunchermpi

Release files for PyLauncherMPI 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyLauncherMPI 0.1.8
File Size Uploaded
pylaunchermpi-0.1.8.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyLauncherMPI 0.1.8
File Interpreter ABI Platform
PyLauncherMPI-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / pylaunchermpi-0.1.8.tar.gz

Download URL pylaunchermpi-0.1.8.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f55d2f96699a5bf4daa3c4ca814467c22935a8b19d01088182234dbb4191ff7f
BLAKE2b-256 checksum
How to use checksums
95df4a2f8a9c75b436b5a9b8adaa0159c657bffb71bcf5da3eb4a62435cf083e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / PyLauncherMPI-0.1.8-py3-none-any.whl

Download URL PyLauncherMPI-0.1.8-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61e95083dffab81f35fbb3ada23125612e87b804134fc64712df70fedd59016e
BLAKE2b-256 checksum
How to use checksums
156811bd893e105ef28ebc085551e4eed357e196722fcc97a43567a3e84cd384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page