s417-lama / mpitx

Run MPI programs over tmux
MIT License
12 stars 1 forks source link

mpitx

Run MPI programs over tmux

With multiple nodes:

Features:

Setup

First make sure that tmux and mpiexec commands are available on your system.

mpitx is implemented as just one Python3 script file. We have two install options.

1. Install via pip

pip3 install git+https://github.com/s417-lama/mpitx.git

Check your installation with:

mpitx -- bash

2. Download a script file

You can simply download a Python script file: mpitx/mpitx.py

wget https://raw.githubusercontent.com/s417-lama/mpitx/main/mpitx/mpitx.py
chmod +x mpitx.py

Make sure that mpitx.py is made executable.

Check your installation with:

./mpitx.py -- bash

Usage

mpitx [OPTIONS]... -- [COMMANDS]...

Examples

Debug an MPI program with 4 processes:

mpitx -n 4 -- gdb ./a.out

More args for gdb:

mpitx -n 4 -- gdb --args ./a.out arg1 arg2

With some MPI implementation-specific options:

mpitx --mca mpi_show_mca_params 1 -- gdb ./a.out

Environment Variables

When these variables are unset, the default mpiexec and tmux commands are used.

Tips on tmux

Useful tmux shortcuts (<prefix> = Ctrl-b by default):

References

License

Copyright (c) 2022 Shumpei Shiina

Released under the MIT License. See LICENSE.