Changes between Version 7 and Version 8 of vnc3d


Ignore:
Timestamp:
02/10/16 11:26:48 (8 years ago)
Author:
Sonja Habbinga
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • vnc3d

    v7 v8  
    1919
    2020
     21== Remote rendering using VNC and !VisIt
     22Remote rendering is also possible using the Virtual Network Computing (VNC, e.g. [http://www.tigervnc.org TigerVNC] or [http://www.turbovnc.org/ TurboVNC]) package. VNC follows a very general approach, where a remote desktop on one node of the remote cluster is opened. On the users workstation only a lightwise VNC client (viewer) has to be installed. The image of the remote desktop is send from the cluster to the viewer on the fly. The user can work with this 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 visualisation. Whenever an OpenGL capable visualisation software, like !VisIt, is started on the remote node, OpenGL commands must be redirected to the GPU of this node with the help of [http://www.virtualgl.org/ VirtualGL] (command: vglrun). This way the hardware accelerated rendering capabilities of a cluster node can be exploit for remote rendering into a VNC window. A general overview about this topic is given [wiki:remote3d here].\\
     23[[Image(Trac_Setup_VNC.png, 640px)]]\\
     24
     25The following steps are necessary to start a VNC session for remote rendering with !VisIt on JURECA.
     26Please notice that the VNC server is only availble on vis nodes!
     27
     28=== 1. Create a VNC password and a startup script on JURECA
     29This step is a prerequisite for using VNC and has only to be done '''once'''.
     30The aim of this step is to create a VNC password and a very small (one line) VNC startup script to start the [http://www.xfce.org/?lang=en Xfce] desktop environment. As all VNC related commands are ony available on a vis node, one has to allocate a vis node first and then start an interactive shell and execute the necessary commands there. It works as follows:\\
     31
     32{{{ #!sh
     33salloc -N 1 -p vis --gres=gpu:2
     34srun --cpu_bind=none -n 1 --pty /bin/bash -i
     35mkdir .vnc # if not already exist
     36cd .vnc
     37vncpasswd # now type in your vnc password
     38echo "exec startxfce4" > xstartup
     39exit # exit task
     40exit # exit job
     41}}}
     42=== 2. Login to JURECA and start the VNC server on a vis node
     43Open an ssh shell on a login node of JURECA the usual way.
     44To allocate a vis node with 512 GByte main memory for one hour, use:
     45{{{ #!ShellExample
     46salloc -N 1 -p vis --gres=mem512,gpu:2 --start-xserver --time=1:00:00
     47srun -n 1 --cpu_bind=none --gres=gpu:0 vncserver -fg -geometry 1920x1080
     48}}}
     49Alternatively you may want to allocate a vis node with 1024 GByte main memory by:
     50{{{ #!ShellExample
     51salloc -N 1 -p vis --gres=mem1024,gpu:2 --start-xserver --time=1:00:00
     52srun -n 1 --cpu_bind=none --gres=gpu:0 vncserver -fg -geometry 1920x1080
     53}}}
     54The default wallclock time is 1 hour, the maximum is 24 hours.\\
     55
     56In case the VNC server could successfully be started, you will get an output like:
     57{{{ #!ShellExample
     58New 'jrc1391:1 (zilken)' desktop is jrc1391:1
     59
     60Starting applications specified in /homeb/zam/zilken/.vnc/xstartup
     61Log file is /homeb/zam/zilken/.vnc/jrc1391:1.log
     62}}}
     63
     64As you have to setup an ssh tunnel (with the correct network port) to the allocated node in step 3, two important informations have to be taken from this output:
     651. The allocated node is '''jrc1391'''
     661. The number of the VNC display is ''':1'''
     67
     68It is very important to know that the network port of the VNC server depends on this display number. The actual port number is 5900+display_number, therefore port '''5901''' must be tunneled in this case.
     69
     70=== 3. Open an ssh tunnel
     71Now you have to open an ssh tunnel from your workstation to this node.
     72The steps to be done depend strongly on your operating system and your setup.\\
     73'''Linux:'''\\
     74If your operating system is Linux, just use:
     75{{{ #!ShellExample
     76ssh -4 -N -L 5901:jrc1391:5901 jureca.fz-juelich.de
     77}}}
     78'''Windows:'''\\
     79In case your operating system is Windows, the setup of the tunnel depends on your ssh client.
     80Here a short overview on how-to setup a tunnel with [http://www.putty.org/ PuTTY] is given.
     81It is assumed that PuTTY is already configured in a way that a general ssh connection to JURECA is possible,  that means that host name, username and the private ssh key are correctly set.
     82To establish the ssh tunnel, enter the "SSH-->tunnels" tab in the PuTTY configuration window. You have to enter the source port (in this case 5901) and the destination (in this case jrc1391:5901) and than press add:\\
     83[[Image(putty2.jpg)]]\\
     84After pressing add, the tunnel should appear in the list of forwarded ports and you can establish the tunnel by pressing the open button:\\
     85[[Image(putty3.jpg)]]\\
     86
     87=== 4. Connect to the VNC server
     88If you are using Linux, a vncviewer typically is already part of the distribution or can be installed from a repository. For Windows, a VNC viewer can be downloaded for example [http://sourceforge.net/projects/turbovnc/files/ here].\\
     89Start your local VNC client and connect to localhost:1, e.g.:
     90{{{ #!ShellExample
     91vncviewer localhost:1
     92}}}
     93After typing in your vnc password, you will have access to the remote desktop.
     94
     95
     96
    2197----
    2298any feedback welcomed - [mailto:h.zilken@fz.juelich.de], [mailto:j.goebbert@fz-juelich.de]