LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Ross Boylan (ross_at_[hidden])
Date: 2006-02-03 19:25:30


I'm having trouble getting terminal interaction with a session launched
from mpiexec or mpirun. At the moment I'm only interested in the node
from which I launch everything. Although I want to debug, I also don't
need to run a debugger; I just need to run the application program and
control it from the terminal.

In some initial experiments I was able to get this to work, but then it
stopped working. I pressed ahead, doing my debugging non-interactively.
Now I have some time to get to the bottom of things.

Ultimately I want to run an R session, but I started with this test
script (filename silly):
#! /bin/sh
# testing handing over input to terminal
cat > foo

I did mpirun -np 1 silly.

After this I can type stuff in as if cat is operating. But when I hit
ctl-D, I just see "^D" on the terminal. ctl-C does make everything
abort. The file foo is empty, though perhaps if I typed enough I could
get a buffer to flush.

I noticed an earlier post
(http://www.lam-mpi.org/MailArchives/lam/2005/02/9803.php) referred to
some problems with the handling of stdin in 7.1.1, the version I'm
running (on an Apple Darwin cluster, OS X Panther). Is that the cause,
or something else?

The manual and FAQ's about debugging all implicitly assume that getting
control from the terminal is easy (or is it that they use X?); I'm not
finding it so.

The real situation is more complex: mpiexec invokes a script, which
invokes R. The R command is another script. Also, I'm often running
inside various environments (e.g., I ssh to the cluster, run screen, and
then run a shell inside emacs inside screen) that could interfere
(though I've done the test without screen or emacs). Note that when I
do cat > foo at the shell prompt, rather than launching mpi, ctl-D works
as it should.

BTW I used to teach at IU. Hi and thanks to all of you working on
lam/openmpi there and elsewhere.

-- 
Ross Boylan                                      wk:  (415) 514-8146
185 Berry St #5700                               ross_at_[hidden]
Dept of Epidemiology and Biostatistics           fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739                     hm:  (415) 550-1062