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.gitCheck your installation with:
mpitx -- bashYou 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.pyMake sure that mpitx.py is made executable.
Check your installation with:
./mpitx.py -- bashmpitx [OPTIONS]... -- [COMMANDS]...[OPTIONS]...are passed to the installedmpiexeccommand 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.outMore args for gdb:
mpitx -n 4 -- gdb --args ./a.out arg1 arg2With some MPI implementation-specific options:
mpitx --mca mpi_show_mca_params 1 -- gdb ./a.outMPITX_MPIEXEC: custom path tompiexeccommandMPITX_TMUX: custom path totmuxcommand
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
mpitxwas inspired bytmpi- The main advantage of
mpitxovertmpiis the support for multiple nodes
Copyright (c) 2022 Shumpei Shiina
Released under the MIT License. See LICENSE.

