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=<mpi lib location>
or use the -Wl,-rpath=<mpi lib location> to compiler the search path into the executable.
best regards, SamuelP.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 directoryProgram 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 ./ envliblistall 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/helloNote 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