Thursday, May 17, 2012

Remote Visualization using TurboVNC and VirtualGL on Cluster



1. Purpose

Remote visualization is a technique to overcome two major difficulties of "local visualization." First, visualization process requires a high performance GPU device, but, not every local system has such device. Secondly, even if local system has a high performance GPU device installed, it might take unreasonably long time to transfer huge data from remote system(cluster) to local system for visualization. Those two difficulties can be resolved efficiently by using GPU device on cluster for rendering and displaying it remotely on the display of local system.


You will see these errors if you don't have appropriate GPU device on your local system.




















With remote visualization, you will see those instead. Ta-da!











2. Requirements


These are software and hardware requirements for remote visualization on EOS cluster.

Software requirements : CentOS, TurboVNC, VirtualGL
Hardware requirements : NVIDIA GPU



3. Installation



3.1 Install X Window package on GPU node

Even though GPU node has no monitor attached, it still must have X Window package installed and running to provide virtual screen where GPU can draw objects on. These objects eventually will be displayed on physical monitor of local system through SSH tunnel.

$yum groupinstall "X Window System"



3.2 Install TurboVNC on GPU node
http://www.virtualgl.org/Downloads/TurboVNC

TurboVNC is a software that display a screen of remote system on monitor of local system via RFB(remote framebuffer) protocol.



3.3 Install VirtualGL on GPU node
http://www.virtualgl.org/

VirtualGL is a key software that actually utilize GPU on remote system and redirect drawing event to use hardware rendering feature.


3.4 Install TurboVNC on local system
During installation, select just vncviewer. vncserver is not necessary for local system.



4. Configuration

Since GPU node on EOS has no physical monitor attached to it, ‘--use-display-device=none’ option need to be used to configure X Window

$nvidia-xconfig -a --virtual=1024x768 --use-display-device=none
$/usr/bin/X :0 -ac -audit 0 -tst -auth /var/gdm/:0.Xauth -nolisten tcp vt7&
$cat ~/.vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &



User Guide

For remote visualization, user is required to go through 3 steps. First, start vncserver on GPU node, secondly, establish SSH tunnel between local system and GPU node via login node. Finally, start vncviewer on local machine to open remote display.



Terminal 1
Connect to login node(eos3)
Connect to GPU node(node349,node361,node350,node362)
Start vncserver
$vncserver



Terminal 2
Create SSH Tunnel
$ssh -L 10000:node349:5901 eos3.tamu.edu



Terminal 3
$vncviewer -medqual localhost:10000
$module load paraview
$vglrun glxspheres64
$vglrun paraview



Multiple GPUs
$vglrun -d :0.x paraview  % x is set to 0 for first GPU, 1 for second GPU, and so on.



Special for ABAQUS CAE

On some system, abacus cae has an issue with color scheme. In that case, set environment variable to fix it.

export XLIB_SKIP_ARGB_VISUALS=1

The reason of this issue is incompatibility between abaqus’s graphic toolkit(http://www.fox-toolkit.org/) and Compiz software package.