Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

At present we're trying to write a program which uses mpirun to launch multiple X11 clients. If the programs are text-only, then using the following command, we can run proceses on a list of computers:

mpirun -np 4 --hostfile hostlist date

Here hostlist is a file of mpi-configured computers. The computers are set up to authenticate automatically using public keys. We can also run X11 programs on the local computer only, for instance:

mpirun -np 4 xclock

shows four xclocks as expected. However, if we try to run X11 programs using a hostfile:

mpirun -np 4 --hostfile hostlist xclock

then two xclocks launch but the remote computer reports:

Error: can't open display:

However, we have configured .ssh/config with

ForwardX11 Yes

And we can verify that the following command sequence works:

ssh 10.0.0.2
# connect to mpi cluster node
xclock
# xclock appears on screen

Furthermore, if we set a DISPLAY variable with mpirun's -x as follows:

mpirun -np 4 --hostfile hostlist -x DISPLAY=10.0.0.1:0.0 xclock    

Then we get another error:

Error: can't open display: 10.0.0.1:0.0

We tried to disable any access control with:

xhost +

To summarize, we'd like some help with mpirun and X11 Forwarding. We're running on Ubuntu 12.10 and openmpi 1.4.5.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Following command seems to work well

mpirun -d -np 4 -hostfile hostlist -mca pls_rsh_agent "ssh -X -n" xclock
share|improve this answer
    
So the combination of enabling debugging and setting the pls_rsh_agent variable are required. –  speciousfool Jan 25 '13 at 11:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.