Remote Visualization

WestGrid provides remote visualization capabilities from most of its computational resources. Visualization applications may be run on compute nodes and the results displayed remotely using X Window tunnelling through an SSH client (See the QuickStart Guide for New Users for help in setting up an environment for X Windows). However, the X Window System has significant overhead that can make graphics programs sluggish to use from remote computers having relatively low-bandwidth connections to WestGrid. To help improve the responsiveness of OpenGL-based graphics applications, it is possible to use GPU (graphics processing unit) enabled nodes (visualization nodes) that have been configured to to render output to a display-less GPU, with the resulting images displayed on the user's desktop computer using a lightweight display client. This process makes use of two software packages, VirtualGL and TurboVNC to accomplish this. Set up and use of the WestGrid remote visualization capabilities are given below.

Using WestGrid Remote Visualization

The WestGrid remote visualization capability exists as part of the Parallel (parallel.westgrid.ca) cluster at the University of Calgary. Parallel has 60 12-core nodes with 3 GPUs each. The GPUs are NVIDIA Tesla M2070s, each with about 5.5 GB of memory. These nodes are primarily targeted at GPU computation but a subset of the nodes are available for remote visualization (for more information on using the GPUs for computation, please refer to the WestGrid GPU Computation page).

Using the Parallel GPUs for remote visualization is a two part process. Users need to log in to a parallel.westgrid.ca visualization node and start a remote visualization server (TurboVNC) that utilizes one of the GPUs. The user then needs to start the remote visualization client on their desktop computer and connect to the visualization server running on the visualization node. Note that in order to successfully use a remote visualization node, it is necessary to install the client software on your local computer.

Setup

To set up your computer for remote visualization, download and install TurboVNC.  It is also presumed that you have installed an SSH terminal client (See the QuickStart Guide for New Users for help).

Then, log in to Parallel (parallel.westgrid.ca) and run the command

vncpasswd

Enter a password when prompted. This establishes a password that VNC will use when connecting to a visualization node. You can reissue the vncpasswd command if you ever want to change this password (note that the password will be truncated to 8 characters).

That completes the one-time setup required on your local computer and Parallel.

Requesting a visualization node

To request a visualization node on which to work, log in to Parallel (parallel.westgrid.ca) with your SSH terminal client, then, use qsub to submit an interactive job with the following parameters:

qsub -q interactive -I -l nodes=1:ppn=1:gpus=1,walltime=1:00:00

You may add additional options or modify the ones above, such as the walltime limit, ppn, or number of gpus, using the qsub -l argument (as explained on the Running Jobs page).

As with other batch jobs, qsub will return a JOBID number that you can use to monitor the job, however this qsub will wait for the job to start and will return a prompt on the compute node assigned.  If one of the interactive GPU nodes has sufficient resources, your job should start within 30 sec. When "qsub: job xxxxx.paralle-admin ready" appears, then continue.  If your job does not start right away, you can check on the job by logging in again via another terminal window.  You can use showq to check that.  If the job has not started within a minute or so, you might like to use showstart JOBID to get an estimate of when it might start.  

Once the job has started, you can start your vncserver on the GPU node.  This is done via the vncserver command.  There is one option to the vncserver command of interest, this is the desktop size (called geometry by vnc).  With no arguments, a default size of 1240x900 which is slightly less than a standard 1280x1024 desktop giving room for a taskbar and scrollbar if necessary.  You can set this to any value, but smaller or equal to your screen's resolution generally works the best.  If you are using fullscreen mode with your vnc client, setting the geometry to exactly your screen's resolution makes sense.  A full example of submitting a job and starting a session with geometry of 1024x768:

[username@parallel ~]$ qsub -q interactive -I -l nodes=1:ppn=1:gpus=1,walltime=1:00:00
qsub: waiting for job 75617.parallel-admin to start
qsub: job 75617.parallel-admin ready

[username@cn0553 ~]$ vncserver -geometry 1024x768

New 'X' desktop is cn0553:1

Starting applications specified in /home/username/.vnc/xstartup.
turbovnc Log file is /home/username/.vnc/cn0553:1.log

Look at the output of the vncserver command for the desktop location.  It's the line that says "New 'X' desktop is......".  In that line you will see a node name with a colon and a digit after.  These are the two pieces of information that you need to connect your desktop to the visualization node. In the example above, the cn0553 is the node that you need to connect to and the :1 is the VNC/Xwindows display number.

Next, use the display number to compute the port number.  Simply add 5900 to the display number. In the above case, we need to forward local port 5901 to cn0553 port 5901.  To do this, start a new ssh session to parallel.westgrid.ca forwarding the port like this (putting the same port number before and after the node.  Please note that this typically works only from Linux/MAC computers.  In other operating systems, you will have to find a similar option in your SSH client.

ssh parallel.westgrid.ca -L 5901:cn0553:5901

Now start the TurboVNC vncviewer program on your local machine. You can use any vnc viewer, but for better performance, please use TurboVNC for VirtualGL rendering.

In Windows, double-click from the start menu.

In Linux start the program /opt/TurboVNC/bin/vncviewer.

If your rendering is choppy, you can add the option -medqual to reduce the compression quality but your display will be more smooth. There's even a -lowqual option if necessary.

In the TurboVNC box that appears, enter localhost:<displaynumber> i.e. localhost:1 and press enter.

Now enter the password you established in the server-config section above.

You should now have a standard Gnome Xwindows desktop inside a VNC window. You can now press (all on the left side of the keyboard) ctrl-alt-shift-f to go fullscreen if you are using the Windows client or add -FullsScreen to the linux/Mac client.

Running an OpenGL based visualization application

Inside the VNC window, open a Terminal (Applications->Accessories or right click on the desktop) on the compute node.

Now start your OpenGL application by prefixing the application with vglrun.

Here's an example of running glxgears:

vglrun glxgears

VMD on Parallel example:

vglrun /global/software/vmd/vmd-1.9.1/bin/vmd

Quitting the remote visualization session

When you are done with the desktop, close the VNC session and exit from the node that qsub provided you with (you can also kill the job or simply wait for the job to expire). Your desktop will then terminate along with any programs running inside it. You can the exit the vncviewer application running on your desktop and exit the original ssh connection to Parallel (parallel.westgrid.ca).

Note: The old WestGrid visualization server on checkers is currently not available for use. It is currently being reconfigured to perform remote visualization using a web interface. User's that require remote visualization should use the parallel.westgrid.ca remote visualization capabilities described above. The old documentation for the checkers remote visualization can be found here.