Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-09-24 Thread Thomas Ropars

I works find with konsole.
Thank you for the advise.

Thomas.

Samuel Sarholz wrote:

Hi,

I think the problem is that xterm (probably) has the userid bit set 
and thus deletes the LD_LIBRARY_PATH.

Try setting the path again before you start gdb, e.g:
mpirun -n 2 -x DISPLAY=:0.0 xterm -e LD_LIBRARY_PATH=

or use the -Wl,-rpath= to compiler the search path 
into the executable.


best regards,
Samuel

P.S.: This xterm behavior causes us a lot of problems as well. Other 
terminals like konsole don't have that problem.


Thomas Ropars wrote:

Hi,

I'm trying to use gdb and xterm with open mpi on my computer (Ubuntu 
8.04).
When I run an application without gdb on my computer in works find 
but if I try to use gdb in xterm I get the following error:


mpirun -n 2 -x DISPLAY=:0.0 xterm -e gdb ./ring.out

(gdb) run
Starting program: /media/sda5/tempo/openmpi/tests/ring.out
/media/sda5/tempo/openmpi/tests/ring.out: error while loading shared 
libraries: libmpi.so.0: cannot open shared object file: No such file 
or directory


Program exited with code 0177.

When I try to use a shell script to launch gdb as mentioned bellow, I 
get the same error.


Thomas

Jeff Squyres wrote:

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=.cisco.com:0 xterm - 
hold -e gdb ~/mpi/hello


% mpirun -np 1 --hostfile h -x DISPLAY=.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
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users




  


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users





___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users




Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-09-24 Thread Samuel Sarholz

Hi,

I think the problem is that xterm (probably) has the userid bit set and 
thus deletes the LD_LIBRARY_PATH.

Try setting the path again before you start gdb, e.g:
mpirun -n 2 -x DISPLAY=:0.0 xterm -e LD_LIBRARY_PATH=

or use the -Wl,-rpath= to compiler the search path 
into the executable.


best regards,
Samuel

P.S.: This xterm behavior causes us a lot of problems as well. Other 
terminals like konsole don't have that problem.


Thomas Ropars wrote:

Hi,

I'm trying to use gdb and xterm with open mpi on my computer (Ubuntu 8.04).
When I run an application without gdb on my computer in works find but 
if I try to use gdb in xterm I get the following error:


mpirun -n 2 -x DISPLAY=:0.0 xterm -e gdb ./ring.out

(gdb) run
Starting program: /media/sda5/tempo/openmpi/tests/ring.out
/media/sda5/tempo/openmpi/tests/ring.out: error while loading shared 
libraries: libmpi.so.0: cannot open shared object file: No such file or 
directory


Program exited with code 0177.

When I try to use a shell script to launch gdb as mentioned bellow, I 
get the same error.


Thomas

Jeff Squyres wrote:

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=.cisco.com:0 xterm - 
hold -e gdb ~/mpi/hello


% mpirun -np 1 --hostfile h -x DISPLAY=.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
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users




  


___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users





smime.p7s
Description: S/MIME Cryptographic Signature


Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-09-24 Thread Thomas Ropars

Hi,

I'm trying to use gdb and xterm with open mpi on my computer (Ubuntu 8.04).
When I run an application without gdb on my computer in works find but 
if I try to use gdb in xterm I get the following error:


mpirun -n 2 -x DISPLAY=:0.0 xterm -e gdb ./ring.out

(gdb) run
Starting program: /media/sda5/tempo/openmpi/tests/ring.out
/media/sda5/tempo/openmpi/tests/ring.out: error while loading shared 
libraries: libmpi.so.0: cannot open shared object file: No such file or 
directory


Program exited with code 0177.

When I try to use a shell script to launch gdb as mentioned bellow, I 
get the same error.


Thomas

Jeff Squyres wrote:

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=.cisco.com:0 xterm - 
hold -e gdb ~/mpi/hello


% mpirun -np 1 --hostfile h -x DISPLAY=.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
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users




  




Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-02-07 Thread Jeff Squyres

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=.cisco.com:0 xterm - 
hold -e gdb ~/mpi/hello


% mpirun -np 1 --hostfile h -x DISPLAY=.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
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Jeff Squyres
Cisco Systems



Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-02-07 Thread jody
Hi Jeff

> The results of these two commands do seem to contradict each other;
> hmm.  Just to be absolutely sure, did you cut-n-paste the
> LD_LIBRARY_PATH directory output from printenv and try to "ls" it to
> ensure that it's completely spelled right, etc.?  I suspect that it's
> right since your other commands work, but at this point, it's worth
> checking the "obvious" things as well...

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.

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.

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


Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-02-07 Thread Jeff Squyres
The whole question of how to invoke xterms for gdb via mpirun keeps  
coming up, so when this thread is done, I'll add a pile of this  
information to the FAQ.


More below.

On Feb 6, 2008, at 10:52 AM, jody wrote:


I now solved the "ssh" part of my Problem
The XServer is being started with the nolisten option (thanks Allen).
In Fedora (Gnome) this can easily be changed by choosing the
the "Login Screen" tool from the System|Administration Menu.
There, under the tab "Security", remove the checkmark from
"Deny TCP connections from xserver"
Of course, this needs root access - fortunately,
i am the boss of my computer ;)
Additionally, at least the port 6000 should be open.

This leaves me with my second problem

$mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm -hold
-e ./MPITest
Opens 2 xterms from nano (remote) and 3 xterms from plankton(local).
The local screens display the message:
./MPITest: error while loading shared libraries: libmpi_cxx.so.0:
cannot open shared object file: No such file or directory

Which is unbelievably strange, since for all xterms (local & remote)
the output of
  $mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm
-hold -e printenv
contains the PATH variable containing the path to openmpi/bin and the
LD_LIBRARY_PATH
containing the path to openmpi/lib


The results of these two commands do seem to contradict each other;  
hmm.  Just to be absolutely sure, did you cut-n-paste the  
LD_LIBRARY_PATH directory output from printenv and try to "ls" it to  
ensure that it's completely spelled right, etc.?  I suspect that it's  
right since your other commands work, but at this point, it's worth  
checking the "obvious" things as well...


What shell are you using?  You might want to add some echo statements  
to your shell startup scripts to ensure that all the right parts are  
being run in each of the cases -- perhaps, for some weird reason, they  
aren't in the problematic cases...?  [shrug]




Doing
  $mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm
-hold -e locate libmpi_cxx
returns on all xterms (local & remote)
/opt/openmpi/lib/libmpi_cxx.la
/opt/openmpi/lib/libmpi_cxx.so
/opt/openmpi/lib/libmpi_cxx.so.0
/opt/openmpi/lib/libmpi_cxx.so.0.0.0

On the other hand, the application has no problem when being called
without xterms:
$mpirun -np 5 -hostfile testhosts ./MPITest

Does anybody have an idea why that should happen?


Thanks
  Jody
___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



--
Jeff Squyres
Cisco Systems



Re: [OMPI users] mpirun, paths and xterm again (xserver problem solved; library problem still there)

2008-02-06 Thread jody
I now solved the "ssh" part of my Problem
The XServer is being started with the nolisten option (thanks Allen).
In Fedora (Gnome) this can easily be changed by choosing the
the "Login Screen" tool from the System|Administration Menu.
There, under the tab "Security", remove the checkmark from
"Deny TCP connections from xserver"
Of course, this needs root access - fortunately,
i am the boss of my computer ;)
Additionally, at least the port 6000 should be open.

This leaves me with my second problem

$mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm -hold
-e ./MPITest
Opens 2 xterms from nano (remote) and 3 xterms from plankton(local).
The local screens display the message:
./MPITest: error while loading shared libraries: libmpi_cxx.so.0:
cannot open shared object file: No such file or directory

Which is unbelievably strange, since for all xterms (local & remote)
the output of
   $mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm
-hold -e printenv
contains the PATH variable containing the path to openmpi/bin and the
LD_LIBRARY_PATH
containing the path to openmpi/lib

Doing
   $mpirun -np 5 -hostfile testhosts -x DISPLAY=plankton:0.0 xterm
-hold -e locate libmpi_cxx
returns on all xterms (local & remote)
/opt/openmpi/lib/libmpi_cxx.la
/opt/openmpi/lib/libmpi_cxx.so
/opt/openmpi/lib/libmpi_cxx.so.0
/opt/openmpi/lib/libmpi_cxx.so.0.0.0

On the other hand, the application has no problem when being called
without xterms:
$mpirun -np 5 -hostfile testhosts ./MPITest

Does anybody have an idea why that should happen?


Thanks
   Jody