Run MPI programs over tmux
With multiple nodes:
Features:
- Interactive shell for each MPI process by spawning a tmux pane for each MPI process
- Duplicated keyboard input to all MPI processes
- Support for execution on multiple nodes connected by ethernet
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.
pip3 install git+https://github.com/s417-lama/mpitx.git
Check your installation with:
mpitx -- bash
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
mpitx [OPTIONS]... -- [COMMANDS]...
[OPTIONS]...
are passed to the installedmpiexec
command as-is[COMMANDS]...
after the delimiter--
are executed by each MPI process on each tmux pane- The delimiter
--
is required
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
MPITX_MPIEXEC
: custom path tompiexec
commandMPITX_TMUX
: custom path totmux
command
When these variables are unset, the default mpiexec
and tmux
commands are used.
Useful tmux shortcuts (<prefix>
= Ctrl-b
by default):
<prefix> + z
: individually operate on each pane without duplicating keyboard input<prefix> + &
: close all panes in a window
- Azrael3000/tmpi
mpitx
was inspired bytmpi
- The main advantage of
mpitx
overtmpi
is the support for multiple nodes
Copyright (c) 2022 Shumpei Shiina
Released under the MIT License. See LICENSE.