User Tools

Site Tools


howto:remote_viz

This is an old revision of the document!


Remote Visualization

There is a dedicated visualization server called viz01. It mounts the Lustre file system, has 64 GB of RAM and 4 AMD Opteron 8132 processors, each with 4 processor cores, as well as two NVidia Quadro FX5600 graphics cards. For security reasons, this server does not have an IP address visible from outside the CHPC. However, it can be accessed via the login node by means of SSH tunneling. Although it is possible to perform remote visualization by means of X-forwarding (log in with “ssh -X”), this approach is generally too slow to be of use if the user is not on the internal network. It is therefore preferable to use a remote desktop. However, standard VNC is too slow for this and does not work properly with OpenGL, the library mostly used for 3D graphics. The visualization server has been set up with TurboVNC and VirtualGL, which gets around both of these problems. Use the following process for remote visualization:

  • Log in to the system by normal means (command line ssh or PuTTY)
  • From the cluster login node, log in to viz01, by means of ssh (command: ssh viz01)
  • On viz01, start up a TurboVNC server for your use. You can either leave this login session open or disconnect after starting the TurboVNC server, which will continue running untill it is manually shut down.
  • From your own system, set up an ssh tunnel to forward a port on your system to the appropriate port on viz01
  • Use the TurboVNC client to connect to the VNC server on viz01
  • Run your graphics program with vglrun
  • When finished, close down the TurboVNC client, ssh into viz01 again and kill the TurboVNC server session

Starting and Stopping the VNC server on viz01

There is a default VNC server installed on viz01. Do not use it. Use TurboVNC, which can be started with a command like this:

/opt/TurboVNC/bin/vncserver :3 -geometry 1920×1080 -depth 24

More than one VNC session can be run simultaneously. In this example, two other sessions are already running, therefore :3 is used to specify that this will be a session on virtual display 3. If this is unavailable, try :4, etc. Optionally specify an appropriate display resolution and colour depth, as in the above example. For some reason that we do not fully understand yet, arbitrary resolution does not seem to be supported for all users. “Standard” resolutions like 1024×768 or 1920×1080 work, but 1600×900 does not. If you get a warning of unsupported resolution, try one of the standard resolutions. The port number used for a VNC session is 5900+n , where n is the number of the display. In this example, the VNC session will be served on port 5903.

When launching the VNC server for the first time, the user will be prompted for a password. VNC options are stored in $HOME/.vnc If you want to reset your configuration, simply remove the directory $HOME/.vnc .

The vncserver will continue running even after logging out. If you are no longer going to use it, please kill the server as follows:

/opt/TurboVNC/bin/vncserver -kill :3

where :3 should be changed to whichever display the server has been running on.

Setting up an ssh Tunnel

You cannot log into viz01 directly from outside CHPC's network. However, it is easy to set up an ssh tunnel to it. There are a number of ways to set up such a tunnel:

Setting up an ssh Tunnel from a Linux or Cygwin client

This is an example of the command:

ssh -f user@sun.chpc.ac.za -L 5903:viz01:5903 -N

  • Obviously change “user” to your own user-id.
  • The -f option puts the ssh session in the background. If you wanted to log in anyway (to log in to viz01 to start the VNC server, for example), omit this option.
  • The -L option is essential for tunneling.
  • The -N option prevents ssh from executing a remote command. This should also be omitted if you want an interactive session.
  • 5903:viz01:5903 means that port 5903 on the localhost will be forwarded to port 5903 on viz01. The port number on the local host is arbitrary, you can use any number greater than 1024. However, there is some merit in using consistent values. viz01:5903 is the destination port, with the port number given by 5900+n, as described above.

Setting up an ssh Tunnel with PuTTY under Windows

Any VNC client can be used to connect to the TurboVNC server on viz01. However, to take full advantage of the higher speed and configuration options of TurboVNC, use the TurboVNC client as well. It can be downloaded from http://sourceforge.net/projects/virtualgl/files/TurboVNC/ . The Windows installer includes a customized version of PuTTY. Once TurboVNC has been installed, run the PuTTY in the TurboVNC installation directory. In the left pane, expand the SSH option, and click on Tunnels. Add the port number for your local host in the source port box, and viz01:5903 (use the port number that your VNC server is using) in the destination box.

Now click on “Add”.

Now click on “Session” in the left pane, put in sun.chpc.ac.za in the “Host name” box and click on “Open”.

Log in with your usual user-id and password.

Using the TurboVNC client

If you haven't done so already, install the TurboVNC client, either from http://sourceforge.net/projects/virtualgl/files/TurboVNC/ or from a repository for your version of Linux. Start the TurboVNC Viewer client, and specify localhost::5903 (or whichever local port number you have selected) as the VNC server. It is necessary to use double colons, as in the the example given here.

Click on connect and log in with the VNC password you provided when starting the VNC server for the first time.

You should now get a remote desktop:

Clicking on the top left corner will open an “Options” menu:

Experiment with the various settings. You can trade off quality for speed. On a slow connection, use fast low quality settings to set up the scene, then request a “Lossless refresh” to get a high quality image.

Using VirtualGL

3D programs (Paraview, for example) mostly use OpenGL. In a normal VNC session, OpenGL is most likely to throw an error, or at best run with software rendering. In order to take advantage of the graphics processing hardware on the server, it is necessary to run OpenGL programs with the VirtualGL “wrapper”. For example:

/opt/VirtualGL/bin/vglrun /opt/gridware/non-supported/Paraview-4.3.1-Linux-64bit/bin/paraview &

will run a recent version of Paraview.

Shut down the TurboVNC session when done

/opt/TurboVNC/bin/vncserver -kill :3

will shut down the VNC server for display 3, freeing up resources for other users.

/app/dokuwiki/data/attic/howto/remote_viz.1438163481.txt.gz · Last modified: 2021/12/09 16:42 (external edit)