Enabling X Graphics from Compute Nodes
Table of Contents
The fastest graphic response from the HPCs is by using SRD or the HPC Portal. However, if you want to display graphics on your desktop without the need for middleware, follow these steps to use your own X Server.
1. Install X Server
Linux comes with X in the standard distribution. For Windows, several free products are available, such as VcXsrv (below). For Mac, install XQuartz (www.xquartz.org).
Download VcXsrv from http://sourceforge.net/projects/vcxsrv/, and run the installer. At the end of VcXsrv install, check the box to create the XLaunch icon on desktop.
2. Start X Server
For VcXsrv, simply run it before attempting to open an ssh connection with X11 forwarding. Double-click the XLaunch icon on your desktop. A dialog box will pop up. Accept the defaults by clicking Next several times and the clicking Finish. An "X" application should appear in the system tray.
3. Get a Kerberos Ticket
Obtain a Kerberos ticket using KRB5 for Windows or kinit/pkinit for Linux/Mac.
4. Connect to the HPC System
For Windows, start PuTTY. Enter the connection address, select "SSH", and from the menu on the left, select Connection > SSH > X11 and check "Enable X11 forwarding." Then click "Open".
For Linux/Mac, ssh to the host using the -X (or -Y) argument.
% ssh -X carpenter.erdc.hpc.mil
Check the X11 tunnel by starting an xclock. The xclock should display on your desktop.
5. Tunnel to a Compute Node
To get an X11 tunnel from a compute node, use the following steps:
Request an interactive batch job by using the qsub command, for example:
qsub -l select=1:ncpus=128:mpiprocs=128:ngpus=1 -l walltime=1:00:00 -A Project_ID -q debug -X -I
Once your interactive session has been started on a shared batch node, test the X11 tunnel with xclock. Now you should be able to run your X application on your assigned compute node.