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:

# connect to mpi cluster node
# xclock appears on screen

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

mpirun -np 4 --hostfile hostlist -x DISPLAY= xclock    

Then we get another error:

Error: can't open display:

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.


Following command seems to work well

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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