Re: [OMPI users] Tracing the library using gdb and xterm
Krishna, Would it work to launch the gdb/ddd process separately on the remote machine and then attaching to the mpi running jobfrom within gdb/ddd. Something like ssh -X [hostname|ip address] [ddd|gdb] Doug Reeder On Jan 3, 2008, at 8:32 AM, Jeff Squyres wrote: Per my previous mail, Open MPI (by default) closes its ssh sessions after the remote processes are launched, so X forwarding through ssh will not work. If it is possible (and I think it is, based on your subsequent replies), you might be best served with unencrypted X forwarding. On Jan 3, 2008, at 11:02 AM, Doug Reeder wrote: Krishna, Review the ssh and sshd man pages. When using ssh -X it takes care of defining the DISPLAY and sending the X11 images to your screen. Defining DISPLY directly generally won't work (that is how you do it with rlogin but not with ssh). Doug Reeder On Jan 3, 2008, at 1:54 AM, Krishna Chaitanya wrote: Hi Rolf, Thanks for that. There is still one minor problem, though. The xwindow is getting spawned on the remote machine and not on my local machine. It now looks like, mpirun --prefix /usr/local -hostfile machines -x DISPLAY -x PATH - np 2 xterm -e gdb peruse_ex1 Please let me know what i can do to have it displayed on my machine. I have the DISPLAY variable set to 0.0 on both the machines and I am ssh-ing into the other machine by using the -X switch. Thanks, Krishna Chaitanya On 1/2/08, Rolf Vandevaart wrote: Krishna Chaitanya wrote: Hi, I have been tracing the interactions between the PERUSE and MPI library,on one machine. I have been using gdb along with xterm to have two windows open at the same time as I step through the code. I wish to get a better glimpse of the working of the point to point calls, by launching the job on two machines and by tracing the flow in a similar manner. This is where I stand as of now : mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 xterm Xt error: Can't open display: xterm: DISPLAY is not set I tried using the display option for xterm and setting the value as 0.0, that was not of much help. If someone can guide me as to where the DISPLAY parameter has to be set to allow the remote machine to open the xterm window, it will be of great help. Thanks, Krishna I also do the the following: -x DISPLAY -x PATH In this way, both your DISPLAY and PATH settings make it to the remote node. Rolf -- = rolf.vandeva...@sun.com 781-442-3043 = -- In the middle of difficulty, lies opportunity ___ 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 -- Jeff Squyres Cisco Systems ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Tracing the library using gdb and xterm
Per my previous mail, Open MPI (by default) closes its ssh sessions after the remote processes are launched, so X forwarding through ssh will not work. If it is possible (and I think it is, based on your subsequent replies), you might be best served with unencrypted X forwarding. On Jan 3, 2008, at 11:02 AM, Doug Reeder wrote: Krishna, Review the ssh and sshd man pages. When using ssh -X it takes care of defining the DISPLAY and sending the X11 images to your screen. Defining DISPLY directly generally won't work (that is how you do it with rlogin but not with ssh). Doug Reeder On Jan 3, 2008, at 1:54 AM, Krishna Chaitanya wrote: Hi Rolf, Thanks for that. There is still one minor problem, though. The xwindow is getting spawned on the remote machine and not on my local machine. It now looks like, mpirun --prefix /usr/local -hostfile machines -x DISPLAY -x PATH - np 2 xterm -e gdb peruse_ex1 Please let me know what i can do to have it displayed on my machine. I have the DISPLAY variable set to 0.0 on both the machines and I am ssh-ing into the other machine by using the -X switch. Thanks, Krishna Chaitanya On 1/2/08, Rolf Vandevaart wrote: Krishna Chaitanya wrote: > Hi, >I have been tracing the interactions between the PERUSE > and MPI library,on one machine. I have been using gdb along with xterm > to have two windows open at the same time as I step through the code. I > wish to get a better glimpse of the working of the point to point calls, > by launching the job on two machines and by tracing the flow in a > similar manner. This is where I stand as of now : > > mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 > xterm Xt error: Can't open display: > xterm: DISPLAY is not set > >I tried using the display option for xterm and setting > the value as 0.0, that was not of much help. >If someone can guide me as to where the DISPLAY parameter > has to be set to allow the remote machine to open the xterm window, it > will be of great help. > > Thanks, > Krishna > I also do the the following: -x DISPLAY -x PATH In this way, both your DISPLAY and PATH settings make it to the remote node. Rolf -- = rolf.vandeva...@sun.com 781-442-3043 = -- In the middle of difficulty, lies opportunity ___ 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 -- Jeff Squyres Cisco Systems
Re: [OMPI users] Tracing the library using gdb and xterm
Krishna, Review the ssh and sshd man pages. When using ssh -X it takes care of defining the DISPLAY and sending the X11 images to your screen. Defining DISPLY directly generally won't work (that is how you do it with rlogin but not with ssh). Doug Reeder On Jan 3, 2008, at 1:54 AM, Krishna Chaitanya wrote: Hi Rolf, Thanks for that. There is still one minor problem, though. The xwindow is getting spawned on the remote machine and not on my local machine. It now looks like, mpirun --prefix /usr/local -hostfile machines -x DISPLAY -x PATH - np 2 xterm -e gdb peruse_ex1 Please let me know what i can do to have it displayed on my machine. I have the DISPLAY variable set to 0.0 on both the machines and I am ssh-ing into the other machine by using the -X switch. Thanks, Krishna Chaitanya On 1/2/08, Rolf Vandevaart wrote: Krishna Chaitanya wrote: > Hi, >I have been tracing the interactions between the PERUSE > and MPI library,on one machine. I have been using gdb along with xterm > to have two windows open at the same time as I step through the code. I > wish to get a better glimpse of the working of the point to point calls, > by launching the job on two machines and by tracing the flow in a > similar manner. This is where I stand as of now : > > mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 > xterm Xt error: Can't open display: > xterm: DISPLAY is not set > >I tried using the display option for xterm and setting > the value as 0.0, that was not of much help. >If someone can guide me as to where the DISPLAY parameter > has to be set to allow the remote machine to open the xterm window, it > will be of great help. > > Thanks, > Krishna > I also do the the following: -x DISPLAY -x PATH In this way, both your DISPLAY and PATH settings make it to the remote node. Rolf -- = rolf.vandeva...@sun.com 781-442-3043 = -- In the middle of difficulty, lies opportunity ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Tracing the library using gdb and xterm
Krishna -- Did you not see my post yesterday? http://www.open-mpi.org/community/lists/users/2008/01/4774.php D On Jan 3, 2008, at 4:54 AM, Krishna Chaitanya wrote: Hi Rolf, Thanks for that. There is still one minor problem, though. The xwindow is getting spawned on the remote machine and not on my local machine. It now looks like, mpirun --prefix /usr/local -hostfile machines -x DISPLAY -x PATH - np 2 xterm -e gdb peruse_ex1 Please let me know what i can do to have it displayed on my machine. I have the DISPLAY variable set to 0.0 on both the machines and I am ssh-ing into the other machine by using the -X switch. Thanks, Krishna Chaitanya On 1/2/08, Rolf Vandevaart wrote: Krishna Chaitanya wrote: > Hi, >I have been tracing the interactions between the PERUSE > and MPI library,on one machine. I have been using gdb along with xterm > to have two windows open at the same time as I step through the code. I > wish to get a better glimpse of the working of the point to point calls, > by launching the job on two machines and by tracing the flow in a > similar manner. This is where I stand as of now : > > mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 > xterm Xt error: Can't open display: > xterm: DISPLAY is not set > >I tried using the display option for xterm and setting > the value as 0.0, that was not of much help. >If someone can guide me as to where the DISPLAY parameter > has to be set to allow the remote machine to open the xterm window, it > will be of great help. > > Thanks, > Krishna > I also do the the following: -x DISPLAY -x PATH In this way, both your DISPLAY and PATH settings make it to the remote node. Rolf -- = rolf.vandeva...@sun.com 781-442-3043 = -- In the middle of difficulty, lies opportunity ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users -- Jeff Squyres Cisco Systems
Re: [OMPI users] Tracing the library using gdb and xterm
Hi Rolf, Thanks for that. There is still one minor problem, though. The xwindow is getting spawned on the remote machine and not on my local machine. It now looks like, mpirun --prefix /usr/local -hostfile machines -x DISPLAY -x PATH -np 2 xterm -e gdb peruse_ex1 Please let me know what i can do to have it displayed on my machine. I have the DISPLAY variable set to 0.0 on both the machines and I am ssh-ing into the other machine by using the -X switch. Thanks, Krishna Chaitanya On 1/2/08, Rolf Vandevaart wrote: > > Krishna Chaitanya wrote: > > Hi, > >I have been tracing the interactions between the PERUSE > > and MPI library,on one machine. I have been using gdb along with xterm > > to have two windows open at the same time as I step through the code. I > > wish to get a better glimpse of the working of the point to point calls, > > by launching the job on two machines and by tracing the flow in a > > similar manner. This is where I stand as of now : > > > > mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb > peruse_ex1 > > xterm Xt error: Can't open display: > > xterm: DISPLAY is not set > > > >I tried using the display option for xterm and setting > > the value as 0.0, that was not of much help. > >If someone can guide me as to where the DISPLAY parameter > > has to be set to allow the remote machine to open the xterm window, it > > will be of great help. > > > > Thanks, > > Krishna > > > > I also do the the following: > > -x DISPLAY -x PATH > > In this way, both your DISPLAY and PATH settings make it to the remote > node. > > Rolf > -- > > = > rolf.vandeva...@sun.com > 781-442-3043 > = > -- In the middle of difficulty, lies opportunity
Re: [OMPI users] Tracing the library using gdb and xterm
Another simpler (but not secure) option would be do run "xhost +hostname" for each machine that you'll be using and then use un- encrypted X connections to pipe back to your display. This avoids a bunch of issues (e.g., the ssh to launch the MPI job quitting because it successfully launched on the remote node) and is generally simpler. On a closed LAN/cluster, it may be ok to do this... but your security administrators may disagree with me. :-) I suggest that you check with your admins. Specifically, try something like this: shell$ for host in `cat machines`; do xhost +$host: $host; done This tells the X server to accept connections from all the hosts in your machines file. Then you can mpirun with something like this: shell$ mpirun --prefix /usr/local -hostfile machines \ -x DISPLAY=yourhost:0.0 -np 2 xterm -e gdb peruse_ex1 mpirun's -x option exports the environment variable listed, and the "=foo" argument tells it to assign that value on the remote nodes. Hence, the DISPLAY environment variable will be loaded with the value "yourhost:0.0" on the remote nodes. Obviously, you need to replace "yourhost:0.0" with the hostname and display number of the host that you're launching from. Hope that helps. On Jan 1, 2008, at 1:40 PM, Doug Reeder wrote: Krishna, If you are using ssh to connect to the second machine you need to be sure that ssh X11 forwarding is enabled and you may need to have mpi use ssh -X or ssh -Y to connect to the second machine. That is how the DISPLAY gets set using ssh. Doug Reeder On Jan 1, 2008, at 8:11 AM, Krishna Chaitanya wrote: Hi, I have been tracing the interactions between the PERUSE and MPI library,on one machine. I have been using gdb along with xterm to have two windows open at the same time as I step through the code. I wish to get a better glimpse of the working of the point to point calls, by launching the job on two machines and by tracing the flow in a similar manner. This is where I stand as of now : mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 xterm Xt error: Can't open display: xterm: DISPLAY is not set I tried using the display option for xterm and setting the value as 0.0, that was not of much help. If someone can guide me as to where the DISPLAY parameter has to be set to allow the remote machine to open the xterm window, it will be of great help. Thanks, Krishna -- In the middle of difficulty, lies opportunity ___ 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 -- Jeff Squyres Cisco Systems
Re: [OMPI users] Tracing the library using gdb and xterm
Krishna, If you are using ssh to connect to the second machine you need to be sure that ssh X11 forwarding is enabled and you may need to have mpi use ssh -X or ssh -Y to connect to the second machine. That is how the DISPLAY gets set using ssh. Doug Reeder On Jan 1, 2008, at 8:11 AM, Krishna Chaitanya wrote: Hi, I have been tracing the interactions between the PERUSE and MPI library,on one machine. I have been using gdb along with xterm to have two windows open at the same time as I step through the code. I wish to get a better glimpse of the working of the point to point calls, by launching the job on two machines and by tracing the flow in a similar manner. This is where I stand as of now : mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 xterm Xt error: Can't open display: xterm: DISPLAY is not set I tried using the display option for xterm and setting the value as 0.0, that was not of much help. If someone can guide me as to where the DISPLAY parameter has to be set to allow the remote machine to open the xterm window, it will be of great help. Thanks, Krishna -- In the middle of difficulty, lies opportunity ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
Re: [OMPI users] Tracing the library using gdb and xterm
Krishna, When you log in to the remote system, use ssh -X or ssh -Y which will export the xterm back thru the ssh connection. Jeff Pummill University of Arkansas Krishna Chaitanya wrote: Hi, I have been tracing the interactions between the PERUSE and MPI library,on one machine. I have been using gdb along with xterm to have two windows open at the same time as I step through the code. I wish to get a better glimpse of the working of the point to point calls, by launching the job on two machines and by tracing the flow in a similar manner. This is where I stand as of now : mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 xterm Xt error: Can't open display: xterm: DISPLAY is not set I tried using the display option for xterm and setting the value as 0.0, that was not of much help. If someone can guide me as to where the DISPLAY parameter has to be set to allow the remote machine to open the xterm window, it will be of great help. Thanks, Krishna -- In the middle of difficulty, lies opportunity ___ users mailing list us...@open-mpi.org http://www.open-mpi.org/mailman/listinfo.cgi/users
[OMPI users] Tracing the library using gdb and xterm
Hi, I have been tracing the interactions between the PERUSE and MPI library,on one machine. I have been using gdb along with xterm to have two windows open at the same time as I step through the code. I wish to get a better glimpse of the working of the point to point calls, by launching the job on two machines and by tracing the flow in a similar manner. This is where I stand as of now : mpirun --prefix /usr/local -hostfile machines -np 2 xterm -e gdb peruse_ex1 xterm Xt error: Can't open display: xterm: DISPLAY is not set I tried using the display option for xterm and setting the value as 0.0, that was not of much help. If someone can guide me as to where the DISPLAY parameter has to be set to allow the remote machine to open the xterm window, it will be of great help. Thanks, Krishna -- In the middle of difficulty, lies opportunity