Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: [OMPI devel] mpirun --tmux -np 4 a.out
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-07-02 19:59:17


>>> Terry -- please add this to the agenda (but at the lowest priority).

It's been a long-standing dream of mine to launch MPI processes in individual text screens. The venerable screen(1) app makes this somewhat difficult, but I was pleased to discover recently that tmux(1) -- basically, a 2nd-generation version of screen -- makes it quite easy.

With Ralph's help, I have a Mercurial branch from the trunk (https://bitbucket.org/jsquyres/ompi-tmux) where you can do stuff like this:

    mpirun --tmux -np 4 a.out

and you'll get a 4-window tmux. Window 0 will be MCW rank 0; window 1 will be MCW rank 1, etc. You can switch between them just like you would with screen(1), and see all the proc's stdout and stderr. Once stdin forwarding is working, you'll even be able to do something like this:

    mpirun --tmux -np 4 gdb a.out

And get a gdb in each tmux window running a single MCW process. Of course, you could do this with xterm instead:

    mpirun -x DISPLAY=whatever:1 -np 4 xterm -e gdb a.out

But for me, at least, xterm latency is horrendous. This is why I wanted a text/ncurses-based solution.

Here's the limitations so far:

1. it doesn't scale to lots of MPI processes
   --> this is only intended to be a debugging / development tool
   --> it uses the orte-iof tool for stdout/stderr/stdin forwarding
2. mpirun quits when tmux quits/detaches
   --> you can't disconnect and leave it running
   --> this could change, though (depending on what people want)
3. only stdout/stderr so far; no stdin forwarding
   --> it's on the to-do list; it'll take a little more work

My question to developers is: what kind of functionality would you find useful?

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/