wiki:vnc3d

Version 48 (modified by Jens Henrik Goebbert, 8 years ago) ( diff )

--

Graphical Login (VNC)

Graphical Login (VNC) only with JURECA login possible.

https://upload.wikimedia.org/wikipedia/en/thumb/5/51/Virtual_Network_Computing_%28logo%29.svg/220px-Virtual_Network_Computing_%28logo%29.svg.png
http://www.virtualgl.org/pmwiki/uploads/Main/virtualgl.gif

Remote visualization, either implemented within visualization applications themselves or through server software,
eliminates the need for off-site file transfers and allows HPC users to run a broad range of visualization tools
in-place on the supercomputer where the data resides and more compute resources are available.

A graphical login using Virtual Network Computing (VNC) simplifies the access to remote visualization.
A broad variety of Linux applications with graphical user interface and/or need for OpenGL can be used directly on the supercomputers via VNC.

VNC provides a complete graphical and remote desktop by

  • transmitting the keyboard and mouse events from your computer to the remote machine and
  • relaying the graphical screen updates back in the other direction.

VNC is

  • platform-independent (VNC viewers are available for almost any operating system)
  • application-independent (no need for remote visualization support inside the application)
  • multiple clients may connect to a VNC server at the same time sharing the same session (support, presentation, group discussions)

VNC software used at the JSC:

  • TurboVNC
    • JSC will focus on TurboVNC 2.x as it is optimized for use with VirtualGL.
    • For best performance do not use any other VNC viewer!
    • but ... TurboVNC requires VirtualGL in order to run OpenGL applications
  • TigerVNC
    • Software (unaccelerated) OpenGL support
    • multi-display (Xinerama) support (slated for TurboVNC 2.1)

... using VNC

VNC follows a very general approach, where a remote graphical desktop on one node of the remote cluster is started.
On the user's workstation only a lightweight VNC viewer has to be installed.
The graphical screen of the remote desktop is send as an image from the cluster to the viewer on the fly.

The user can work with this remote graphical desktop in the usual way, just by interacting with keyboard and mouse.
This is a very convenient way to work on a remote machine, not only for data visualization.

VNC offers the ability to detach from a session (running in a VNC server) and then attach back at a later time.
That means, that the user can close the VNC viewer on his/her computer and any application started in the VNC session on the server keeps on running - they do not pause or even be killed.
Later on the user can connect back to the same VNC session (even from a different computer) and keep on working.


hardware accelerated rendering (OpenGL)

https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/X11transport.png/600px-X11transport.png Whenever an OpenGL capable visualization software, like VisIt, is started on the remote cluster node,
OpenGL commands can be redirected to the GPU of this node with the help of VirtualGL.

  • ... using vglrun (e.g. vglrun paraview)

This way the hardware accelerated rendering capabilities of a cluster node (if available) can be exploit for remote rendering.
(attention: without VirtualGL software, rendering using the CPU instead of the GPU must be used (if available), which is much slower).

ok, what do I have to do?

Using VNC requires three general steps.

  1. Prepare your account on a JURECAVIS node.
  2. Start a VNC server on a JURECA node.
  3. Tunnel VNC traffic to your workstation.
  4. Start a VNC viewer on your workstation and connect to the VNC server.


1. Prepare your account …

Before you use VNC for the first time you have to prepare your account:

  • login to a JURECAVIS node
  • create the directory ~/.vnc
  • define VNC password
    ssh <USERID>@jurecavis.fz-juelich.de
    mkdir ~/.vnc
    vncpasswd
    


2. Start VNC server …

The following steps are necessary to start a VNC server on JURECA.
Please notice that you have two general options:

You can start the VNC server ...

  • ... on an interactive vis login node
    • + no batch system == instant access
    • -- system is shared with other users
  • ... on a dedicated vis node
    • + system is not shared (exclusive use)
    • -- access through batch system

In case the VNC server could successfully be started (details in 1a,b), you will find a simular line in the output:

Desktop 'TurboVNC: jurecavis02.fz-juelich.de:1 (profile <PROFILE>)' started on display jrc1384:1 (jurecavis02.fz-juelich.de:1)

Two important informations have to be taken from this output
to setup the required SSH tunnel (with the correct network port) to the allocated node in step 2:

  1. The allocated node is jurecavis02
  2. The number of the VNC display is :1

It is very important to know that the network port of the VNC server depends on this display number.
The actual port number is 5900+<VNC display>, therefore port 5901 must be tunneled in this case.

Important notes:

  • To ensure VNC sessions are not forgotten and keep on running forever, they will be killed after 24 hours (WITHOUT warning).
  • Logout from your VNC session, after you have finished your work. This will save resources and close the VNC server.
  • If you start the VNC server the first time, you will be asked for a password (which is stored in ~/.vnc/passwd).
    You will be asked for this password by the VNC viewer, when you connect to the VNC server.
    To reset the password just delete the file ~/.vnc/passwd.

a. ... on an interactive vis login node

Open a SSH shell on an interactive vis login node (jurecavis.fz-juelich.de):

ssh <USERID>@jurecavis.fz-juelich.de

Start your own VNC server on jurecavis. Usefull vncserver parameters are:

  • -profile -> choose a profile (eg. -profile vis)
  • -geometry -> set the screen size (eg. -geometry 1920x1080)
    # start the VNC server on visualization login node
    vncserver -profile vis
    
    ...
    Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)'
     started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>)
    ...
    

b. ... on a dedicated vis node

Open an SSH shell on any login node of JURECA the usual way:

ssh <USERID>@jureca.fz-juelich.de

salloc is used to request an allocation.
When the job is started, a shell (or other program specified on the command line) is started on the submission host (login node).
From the shell srun can be used to interactively spawn parallel applications.
The allocation is released when the user exits the shell.

To allocate a vis node with 512 GByte main memory for one hour, use:

# request allocation and spawn VNC server on visualization node
salloc -N 1 -p vis --gres=mem512,gpu:1 --start-xserver --time=1:00:00
srun -n 1 --cpu_bind=none --gres=gpu:1 vncserver -fg -profile vis -geometry 1920x1080 

...
Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)'
 started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>)
...

salloc/srun options

  • -N 1 -> Set number of requested nodes.
  • -p vis -> Limit request to nodes from the visualization partition.
  • --gres=mem512 -> Set the size of main memory per node (mem512 or mem1024).
  • --gres=gpu:2 -> Set the number of requested GPUs in the range of 0-2.
  • --start-xserver -> Start an Xserver for usage with VirtualGL.
  • --time=1:00:00 -> Set the default wallclock time to 1 hour (the maximum is 24 hours).
  • Please check 'salloc --help' and 'srun --help' for more details.

3. Tunnel VNC traffic to workstation

Now you have to open an SSH tunnel from your workstation to node on which your VNC server is running.
The steps to be done depend strongly on your operating system and your setup.

Linux:
If your operating system is Linux use for interactive nodes (NODE is most likely jurecavis01... or jurecavis02...):

Error: Failed to load processor ShellExample
No macro or processor named 'ShellExample' found

and for dedicated nodes:

Error: Failed to load processor ShellExample
No macro or processor named 'ShellExample' found

Windows:
In case your operating system is Windows, the setup of the tunnel depends on your ssh client.
Here a short overview on how-to setup a tunnel with PuTTY is given.

It is assumed that PuTTY is already configured in a way that a general ssh connection to JURECA is possible.
That means that host name, user name and the private ssh key (using PuTTY's Pageant) are correctly set.

To establish the ssh tunnel, enter the "SSH-->tunnels" tab in the PuTTY configuration window.
You have to enter the source port (eg. 5901) and the destination (in this case localhost:590<DISPLAY>) and than press add.
After pressing add, the tunnel should appear in the list of forwarded ports and you can establish the tunnel by pressing the open button:

No image "putty2.jpg" attached to vnc3d No image "putty3.jpg" attached to vnc3d

4. Start a VNC viewer and connect

If you are using Linux, a VNC viewer typically is already part of the distribution or can be installed from a repository.
For Windows, a VNC viewer can be downloaded for example here.

Start your local VNC client and connect to localhost:1, e.g.:

Error: Failed to load processor ShellExample
No macro or processor named 'ShellExample' found

After typing in your VNC password (defined in step 1), you will have access to the remote graphical desktop running on the visualization node of JURECA.

Use hardware acceleration in your VNC session

Any OpenGL application running in your VNC session should be started with vglrun to use the hardware acceleration provided by the visualization nodes.

e.g. ParaView

Open a terminal in your VNC session and:

# What versions of ParaView are available?
module spider ParaView

# load ParaView dependency
module load intel-para

# load ParaView
module load ParaView
# start ParaView using VirtualGL for hardware acceleration
vglrun ParaView

e.g. VisIt

Open a terminal in your VNC session and:

# change Stage
module use /usr/local/software/jureca/OtherStages
module load Stages/.Stage1

# What versions of VisIt are available?
module spider VisIt

# load VisIt dependency
module load intel-para/2015.07

# load VisIt
module load VisIt/2.10.0
# start VisIt using VirtualGL for hardware acceleration
vglrun visit -hw-accel

Hints

  • press F8 to enter VNC-Viewer Options (example: toggle to full screen)
  • sync clipboard between client and server
    Error: Failed to load processor ShellExample
    No macro or processor named 'ShellExample' found
  • To reset your VNC-password delete ~/.vnc/passwd

any feedback welcomed - h.zilken@…, j.goebbert@…

Attachments (9)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.