Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-02-07 10:57:57


On Feb 7, 2008, at 10:07 AM, jody wrote:

> I wrote a little command called envliblist which consists of this
> line:
> printenv | grep PATH | gawk -F "_PATH=" '{ print $2 }' | gawk -F ":"
> '{ print $1 }' | xargs ls -al
>
> When i do
> mpirun -np 5 -hostfile testhosts -x DISPLAY xterm -hold -e ./
> envliblist
> all xterms (local & remote) display the contents of the openmpi/lib
> directory.

Ok, good.

> Another strange result:
> I have a shell script for launching the debugger in an xterm:
> [jody]:/mnt/data1/neander:$cat run_gdb.sh
> #!/bin/sh
> #
> # save the program name
> export PROG="$1"
> # shift away program name (leaves program params)
> shift
> # create a command file for gdb, to start it automatically
> echo run $* > gdb.cmd
> # do the term
> xterm -e gdb -x gdb.cmd $PROG
>
> exit 0
>
> When i run
> mpirun -np 5 --hostfile testhosts -x DISPLAY ./run_gdb.sh ./MPITest
> it works!
>
> Just to compare
> mpirun -np 5 --hostfile testhosts -x DISPLAY xterm -hold -e ./MPITest
> does not work.

It seems that if you launch shell scripts, things work. But if you
run xterm without a shell script, it does not work. I do not think it
is a difference of -hold vs. no -hold. Indeed, I can run both of
these commands just fine on my system:

% mpirun -np 1 --hostfile h -x DISPLAY=<myhost>.cisco.com:0 xterm -
hold -e gdb ~/mpi/hello

% mpirun -np 1 --hostfile h -x DISPLAY=<myhost>.cisco.com:0 xterm -e
gdb ~/mpi/hello

Note that my setup is a little different than yours; I'm using a Mac
laptop and ssh'ing to a server where I'm invoking mpirun. The
hostfile "h" contains a 2nd server where xterm/gdb/hello are running.

>
> I notice the only difference between the to above commands is that
> in the run_gdb script xterm has no "-hold" parameter!
> Indeed,
> mpirun -np 5 --hostfile testhosts -x DISPLAY xterm -e ./MPITest
> does work. To actually see that it works (MPITest is simple Hello MPI
> app) i had to do
> mpirun -np 5 --hostfile testhosts -x DISPLAY xterm -hold -e
> "./MPITest >> output.txt"
> and check output.txt.
>
> Does anybody have an explanation for this weird happening?
>
> Jody
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users

-- 
Jeff Squyres
Cisco Systems