Reputation: 639
I'm using gdb to debug a parallel mpi-code 'prog'. For that I use a small number of processes, say 'M' and do something like
mpiexec -n M xterm -e gdb ./prog
This pops up M xterms with each of them running one gdb process on one of the files prog.
The resulting cluttering of the screen by individual windows can be rather cumbersome.
Is there any way, using any known split-window terminal emulator (say, terminator), such as to have the M gdb processes starting up in only one window, however split into M parts from start?
Upvotes: 1
Views: 1723
Reputation: 85
I faced a similar problem and have found tmpi which does exactly what you want: launch mpi debugging processes in M tmux terminal windows.
Clone the repository:
git clone https://github.com/Azrael3000/tmpi.git
then install with:
sudo ./tmpi/install.sh
which places the tmpi executable in /usr/local/bin
The tmpi executable and tmux must be in the path on all your servers.
Run a job with:
tmpi M gdb my_executable
where M is the number of processes that you want.
Upvotes: 2
Reputation: 2135
What you want is called a 'terminal multiplexer'; look into screen or tmux
EDIT: this is probably what you want; issue the following commands in your shell
tmux new-session -d bash # start a bash shell
tmux split-window -v python # start a python shell below it
tmux attach-session -d # enter the tmux session
Upvotes: 0