Graphic Environment

From HLRS Dgrid
Jump to: navigation, search

For graphical pre- and post-processing purposes there are 8 visualisation nodes installed in the BW-Grid cluster. The nodes are equipped with a nVIDIA Quadro 5800 FX and have 8 GB memory each. Access to the nodes is possible via the special bw-vis queue.

qsub -q bw-vis [other options]

To use the graphic hardware for remote rendering there are currently two ways possible. The first is via VNC which works easily for Windows and Linux.

The second one is via VirtualGL which also works very easy for Linux. For Windows Clients this technique hasn't been tested though it should also work but requires an X-Server running on the Windows client.

VNC Client setup

If you want to use the BW-Grid Graphic Hardware e.g. for graphical pre- and post-processing, on way to do it is via a vnc-connection. For that purpose you have to install the vnc-viewer on your local machine.

VNC Client Installation


On current Linux distributions it comes as a pre-compiled package. Additionally to the dedicated vnc viewers, e.g. KDE konqueror also offers a vnc viewer, if installed, accessible through an URL like e.g. "vnc:/localhost:10000".

Fedora users should install e.g. "vnc" (Version 9) or "tigervnc" (Version 12) through
yum install tigervnc
OpenSUSE users should install a package like "tightvnc", "vinagre", "kdenetwork3-vnc", etc. (Version 11.1) through yast.


To use the vnc-viewer on windows you have to establish a ssh-tunnel to the visualisation nodes. This can easily be done with Putty which is downloadable from and can be directly executed without installation.

There are two well known vnc-viewers available for Windows, RealVNC and TightVNC, from which we recommend TightVNC 2.0 Beta 1 since it works well with Windows 7 and is available for free also for Windows Vista and Windows 7. (The tests for this manual were made with TightVNC 2.0 Beta 1 on a 64 Bit Windows 7). It can be downloaded from


Running x0vnc-server

VNC Preparation

Before using vnc for the first time you have to log on to the BW-Grid frontend and run


which creates you a .vnc directory in your home containing a passwd file.

Starting x0vnc-server

Now that you are ready to use vnc load the virtualgl module

module load system/glx/virtualgl

and execute the vis_via_vnc script: XX:XX:XX

where XX:XX:XX is the walltime the visualisation job should be running. If not specified the walltime is set to 1 hour.

The first script submits a second one called to the BW-Grid bw-vis queue. This may take some time (at least 30 sec.) so please be patient.

The scripts start a x0vnc-server on the compute node and return the IP-address of the node which we need in a moment to set up a ssh-tunnel for the vnc-connection.

Connecting to the x0vnc-server

When the queue job is actually running the IP-address and hostname of the node which is reserved for you are returned by


If you copy the script below to your local machine and execute it with the node name as first argument, it will set up the ssh-tunnel and start the vncviewer with correct arguments. After executing the script you should be asked for your vnc password. Enter it and a vncviewer will come up running a Gnome session.

When the vncviewer terminates, the script will automatically kill the ssh-tunnel process which otherwise has to be done by hand.


if [ -z "$1" ]; then
   echo "================================================================================"
   echo "No IP address or node name specified as argument 1 !"
   echo "exit ... "
   exit 1
if [ -z "$2" ]; then
   echo "================================================================================"
   echo "Set port to default = 10000"
   echo " "
   echo "================================================================================"
   echo "Set port to non-default = "$2
   echo " "
ip_node=`printf ${nodes} | grep "$1:" | sed -e "s/$1://"`
echo "================================================================================"
echo "Set IP-address of node $1 to $ip_node"
echo " "
# Set up ssh tunnel ------------------------------------------------------------
ssh -N -L${port}:${ip_node}:5900 &
sleep 3
vncviewer localhost:${port}
ssh_proc=`ps ax -o pid= -o cmd= | grep "ssh -N -L${port}:${ip_node}:5900" | awk '{print $1}'`
ssh_proc=`echo $ssh_proc | awk '{print $1}'`
kill $ssh_proc

Alternatively two commands are returned by which you can execute on your local machine manually. If you use gsissh and connect to gridway, replace all calls to ssh by gsissh and frbw by gridway.

The first command sets up a ssh-tunnel to the compute node via the frbw or gridway frontend and should look something like this

ssh -N -L10000: &


gsissh -N -L10000: -p 2222 &

The ip is the one returned by the script.

The second command starts the vnc-viewer with a connection to the tunneled local port.

vncviewer localhost:10000

After executing the vncviewer command you should be asked for your vnc password. Enter it and a vncviewer will come up running a Gnome session.


First of all a ssh-tunnel has to be established to the reserved visualisation node via the BW-Grid frontend. If you use you can establish a connection using the GSISSH-Term. Once you have connected to gridway, you can add a tunnel in the Menu Tools under Secure Tunneling.


To add a new tunnel click on new tunnel and choose outgoing. Choose a free port (in our example 10000 on your local computer), insert the ip address returned by the job started and use 5900 as destination port.


click on Ok and the channel should be established.

If you connect via you can do the tunnelling with putty as follows:

In the Session category as Host Name specify


In the Connection -- SSH -- Tunnels category as Source port specify the desired free port on your client over which the connection should be established (e.g. 10000). As Destination specify the IP-address of the visualitsation node outputted by trailed with a colon and the port number 5900.

Putty-Connection 3.png

Klick the Add Button to transfer your specification to the list of forwarded ports and select the checkboxes Local ports accept connections from other hosts and Remote ports do the same.Finally select the Open Button to establish the tunnel-connection.

Putty-Connection 2.png

Now the ssh-tunnel should be established and you can run the VNC-Viewer with the Server-connection to localhost:10000.

VNC Viewer 1.png

Click Connect and enter your VNC password

VNC Viewer 2.png

Now your VNC-Viewer should by up running a Gnome session.

Disable screensaver

Inside the vnc window go to system | preferences | screensaver and uncheck the box Activate screensaver when computer is idle.

Ending the vnc-session

If you end your X-session correctly via system ==> log out

VNC Logout.png

the gnome session is shut down and your settings are saved to your BW-Grid home directory. To end your queue job you have to issue the command

qdel your_jobid

if the walltime you specified when calling isn't expired already, since the queue job waits for the x0vncserver to terminate. If you haven't been using the bwvnc script on your local client you should also close the ssh-tunnel to the node by killing the corresponding ssh-process.

VirtualGL Setup

To use VirtualGL you have to install it on your local client. It is available in the form of pre-compiled packages at For windows there is a version for cygwin and a binary version for exceed, which can also be used together with Xming.


After the installation of VirtualGL you can connect to the frontends of bwGRiD via the vglconnect command:

vglconnect -g -s -p 2222


vglconnect -s

Then reserve a visualisation node via the script

module load system/glx/virtualgl XX:XX:XX

where XX:XX:XX is the walltime the visualisation job should be running.

For Virtual GL to work with 32Bit applications, /opt/VirtualGL/lib/ has to be in your LD_LIBRARY_PATH, for 64bit applications /opt/VirtualGL/lib64/ has to be in your LD_LIBRARY_PATH. In both cases /opt/VirtualGL/bin has to be in your PATH.

The script submits a second one called to the BW-Grid bw-vis queue. This may take some time so please be patient.

The scripts return the name of the node reserved for you which is needed to login to the reserved node via vglconnect.

vglconnect -s < node_name >

when you are logged into the node, again load the virtualgl-Module:

module load system/glx

To execute an application you have to start it on the node with the VirtualGL wrapper vglrun. E.g. the FEM pre-processor ANSA

module load cae/beta

If vglrun fails to start, try with the option "-c proxy"


You need an X server running on your local computer. There is an X-Server package included in cygwin, but if you don't use cygwin, it is probably more comfortable to install Xming or the commercial variant "exceed".

Next, you install either the cygwin version (if you use cygwin) the exceed version otherwise of virtualGL.

If you connect to gridway using GSISSH-Term or to frbw using putty, make sure, you have X-Forwarding enabled (and your X-Server running, of course). Connect to one of the frontends using putty or GSISSH-Term and from there on follow the description for Linux above.

HLRS Stud-Pool

On the HLRS Stud-pool PCs Ubuntu-Linux is provided via a Terminal-Server on which VirtualGL is installed. The procedure to reserve and login onto a visualisation node is the same as described above.

To execute an application with the VirtualGL wrapper vglrun it is necessary to provide the option -c proxy

vglrun -c proxy <application_command>

since otherwise the routing of the X and GL data can't be done correctly by VirtualGL.

Using VirtualGL with TurboVNC

If you want to use VirtualGL in connection with TurboVNC you have to install the TurboVNC-viewer on your local machine. It is available in the form of pre-compiled packages at To start a TurboVNC session go to


Load the VirtualGL module and reserve a visualisation node for usage of VirtualGL

module load system/glx/virtualgl hh:mm:ss

Where hh:mm:ss is the walltime you want to reserve the visualisation node. Go to the node which was reserved

ssh <node_no>

Where <node_no> is the name of the reserved node issued by On this node you have to start a TurboVNC server which can be done with

module load system/glx/virtualgl

From your client connect to the TurboVNC server with your TurboVNC viewer with

/opt/TurboVNC/bin/vncviewer -via <node_no>:<display_no>

If you have installed TurboVNC in the standard path. Where <node_no> is again the name of the reserved node issued by and <display_no> is the number of the Display returned by the TurboVNC server. Within the opend TurboVNC session you can then start GL applications with the VirtualGL wrapper. In a terminal within the TurboVNC session issue the commands

module load system/glx/virtualgl
vglrun <your_application>