A small program for interactive sessions with MPI applications.
Project description
mpishell
A small program for interactive sessions with MPI applications.
Usage
mpishell redirects the standard input to all the jobs and decorates their standard output to make it easier to identify the job emitting them.
Consider the following example:
$ mpirun -np 2 cat
hello
hello
Here, hello was written to standard input, mpirun redirected it to the first job, running cat, which echoed the same word back. The second MPI job did nothing.
Now if one interleaves mpishell between mpirun and cat:
$ mpirun -np 2 mpishell cat
hello
0| hello
1| hello
This time, mpishell forwarded hello to the two jobs, and both reply the same word. mpishell also prepends the line with the job rank. Note that mpishell also colorizes the lines if the number of jobs is low.
mpishell can then be used with more complex programs, like bash or ipython:
$ mpirun -np 2 mpishell ipython3
0| Python 3.8.10 (default, Jun 2 2021, 10:49:15)
0| Type 'copyright', 'credits' or 'license' for more information
0| IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
0|
1| Python 3.8.10 (default, Jun 2 2021, 10:49:15)
1| Type 'copyright', 'credits' or 'license' for more information
1| IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
1|
from mpi4py import MPI
0| In [1]:
1| In [1]:
MPI.COMM_WORLD.Get_rank()
0| In [2]: Out[2]: 0
0|
1| In [2]: Out[2]: 1
1|
Finally, use CTRL+C to leave mpishell.
Installation
Simply install it with pip install mpishell.
Limitations
- The standard input is sent to the jobs line by line, no intermediate update is sent.
mpishellis a bit brittle and errors may occur somewhat randomly.
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
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 mpishell-0.2.0.tar.gz.
File metadata
- Download URL: mpishell-0.2.0.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8970ca63e7a8b45a6a761f3dfa010453bf80da2ce72ffb414ea81cc142560106
|
|
| MD5 |
b452c2b33fe1d503c42328c036692c5a
|
|
| BLAKE2b-256 |
a5d919b7802fb9544b583e96cfb51414d3cf9a204b94138a8ffabe877a6875b8
|
File details
Details for the file mpishell-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mpishell-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec0389740c32446abf0d7d0b8a61fd7bb0ec00442180307ec2dc924fc3b489f7
|
|
| MD5 |
acba12ff51d4882c726afb2a79a9b640
|
|
| BLAKE2b-256 |
0456ba07a27d7dfc17663e562362e312099e554dce62718025ac647e6de53583
|