Changes between Initial Version and Version 1 of vnc3d/manual


Ignore:
Timestamp:
05/03/16 22:45:54 (8 years ago)
Author:
Jens Henrik Goebbert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • vnc3d/manual

    v1 v1  
     1
     2
     3== ...
     4== Manual Access ...
     5VNC follows a very general approach, where a remote graphical desktop on one node of the remote cluster is started. \\
     6On the user's workstation only a lightweight VNC viewer has to be installed. \\
     7The graphical screen of the remote desktop is send as an image from the cluster to the viewer on the fly.
     8
     9The user can work with this remote graphical desktop in the usual way, just by interacting with keyboard and mouse. \\
     10This is a very convenient way to work on a remote machine, not only for data visualization.
     11
     12VNC offers the ability to detach from a session (running in a VNC server) and then attach back at a later time. \\
     13That 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. \\
     14Later on the user can connect back to the same VNC session (even from a different computer) and keep on working. \\
     15
     16[[Image(Trac_Setup_VNC.png, 640px)]]\\
     17
     18==== hardware accelerated rendering (OpenGL)
     19[[Image(https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/X11transport.png/600px-X11transport.png, 200px, align=right, margin=0)]]
     20Whenever an OpenGL capable visualization software, like !VisIt, is started on the remote cluster node, \\
     21OpenGL commands can be redirected to the GPU of this node with the help of [http://www.virtualgl.org VirtualGL]. \\
     22* ... using '''vglrun''' (e.g. vglrun paraview)
     23This way the hardware accelerated rendering capabilities of a cluster node (if available) can be exploit for remote rendering. \\
     24(attention: __without__ VirtualGL software, rendering using the CPU instead of the GPU must be used (if available), which is much slower).
     25
     26==== ok, what do I have to do?
     27Using VNC requires three general steps.
     281. '''Prepare your account''' on a JURECAVIS node.
     292. '''Start a VNC server''' on a JURECA node.
     303. '''Tunnel VNC traffic''' to your workstation.
     314. '''Start a VNC viewer''' on your workstation and connect to the VNC server.
     32
     33\\
     34=== 1. Prepare your account ...
     35Before you use VNC '''for the first time''' you have to prepare your account:
     36* login to a JURECAVIS node
     37* create the directory ~/.vnc
     38* define VNC password
     39{{{ #!sh
     40ssh <USERID>@jurecavis.fz-juelich.de
     41mkdir ~/.vnc
     42vncpasswd
     43}}}
     44
     45\\
     46=== 2. Start VNC server ...
     47The following steps are necessary to start a VNC server on JURECA. \\
     48Please notice that you have two general options:
     49
     50You can start the VNC server ...
     51* ... on an '''interactive vis login node'''
     52 * + no batch system == instant access
     53 * -- system is shared with other users
     54* ... on a '''dedicated vis node'''
     55 * + system is not shared (exclusive use)
     56 * -- access through batch system
     57
     58
     59
     60In case the VNC server could successfully be started (details in 1a,b), you will find a simular line in the output:
     61{{{ #!sh
     62Desktop 'TurboVNC: jurecavis02.fz-juelich.de:1 (profile <PROFILE>)' started on display jrc1384:1 (jurecavis02.fz-juelich.de:1)
     63}}}
     64
     65Two important informations have to be taken from this output \\
     66to setup the required SSH tunnel (with the correct network port) to the allocated node in step 2:
     671. The allocated node is '''jurecavis02'''
     682. The number of the VNC display is ''':1'''
     69
     70It is very important to know that the network port of the VNC server depends on this display number. \\
     71The actual port number is 5900+<VNC display>, therefore port '''5901''' must be tunneled in this case.
     72
     73Important notes:
     74* To ensure VNC sessions are not forgotten and keep on running forever, they will be '''killed after 24 hours ''' (WITHOUT warning).
     75* Logout from your VNC session, after you have finished your work. This will save resources and close the VNC server. \\
     76* If you start the VNC server the first time, you will be asked for a password (which is stored in ~/.vnc/passwd). \\
     77  You will be asked for this password by the VNC viewer, when you connect to the VNC server. \\
     78  To reset the password just delete the file ~/.vnc/passwd.
     79
     80==== a. ... on an interactive vis login node
     81Open a SSH shell on an interactive vis login node (jurecavis.fz-juelich.de):
     82{{{ #!sh
     83ssh <USERID>@jurecavis.fz-juelich.de
     84}}}
     85
     86Start your own VNC server on jurecavis.
     87Usefull vncserver parameters are:
     88* -profile        -> choose a profile (eg. -profile vis)
     89* -geometry       -> set the screen size (eg. -geometry 1920x1080)
     90{{{ #!sh
     91# start the VNC server on visualization login node
     92vncserver -profile vis
     93
     94...
     95Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)'
     96 started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>)
     97...
     98}}}
     99
     100==== b. ... on a dedicated vis node
     101Open an SSH shell on any login node of JURECA the usual way:
     102
     103{{{ #!sh
     104ssh <USERID>@jureca.fz-juelich.de
     105}}}
     106
     107salloc is used to request an allocation.\\
     108When the job is started, a shell (or other program specified on the command line) is started on the submission host (login node). \\
     109From the shell srun can be used to interactively spawn parallel applications. \\
     110The allocation is released when the user exits the shell.
     111
     112To allocate a vis node with 512 GByte main memory for one hour, use:
     113{{{ #!sh
     114# request allocation and spawn VNC server on visualization node
     115salloc -N 1 -p vis --gres=mem512,gpu:1 --start-xserver --time=1:00:00
     116srun -n 1 --cpu_bind=none --gres=gpu:1 vncserver -fg -profile vis -geometry 1920x1080
     117
     118...
     119Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)'
     120 started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>)
     121...
     122}}}
     123
     124salloc/srun options
     125* -N 1            -> Set number of requested nodes.
     126* -p vis          -> Limit request to nodes from the visualization partition.
     127* --gres=mem512   -> Set the size of main memory per node (mem512 or mem1024).
     128* --gres=gpu:2    -> Set the number of requested GPUs in the range of 0-2.
     129* --start-xserver -> Start an Xserver for usage with VirtualGL.
     130* --time=1:00:00  -> Set the default wallclock time to 1 hour (the maximum is 24 hours).
     131* Please check 'salloc --help' and 'srun --help' for more details.
     132
     133
     134=== 3. Tunnel VNC traffic to workstation
     135Now you have to open an SSH tunnel from your workstation to node on which your VNC server is running. \\
     136The steps to be done depend strongly on your operating system and your setup.
     137
     138'''Linux:'''\\
     139If your operating system is Linux use for interactive nodes (NODE is most likely jurecavis01... or jurecavis02...):
     140{{{ #!ShellExample
     141ssh -N -L <5900+DISPLAY>:<NODE>:<5900+DISPLAY> <USERID>@<NODE>.fz-juelich.de
     142# example: ssh -N -L 5907:jurecavis01:5907 jjuser@jurecavis01.fz-juelich.de
     143}}}
     144
     145and for dedicated nodes:
     146{{{ #!ShellExample
     147ssh -N -L <5900+DISPLAY>:<NODE>:<5900+DISPLAY> <USERID>@jureca.fz-juelich.de
     148# example: ssh -N -L 5902:jrc1327:5902 jjuser@jureca.fz-juelich.de
     149}}}
     150
     151
     152
     153'''Windows:'''\\
     154In case your operating system is Windows, the setup of the tunnel depends on your ssh client. \\
     155Here a short overview on how-to setup a tunnel with [http://www.putty.org/ PuTTY] is given.
     156
     157It is assumed that PuTTY is already configured in a way that a general ssh connection to JURECA is possible. \\
     158That means that host name, user name and the private ssh key (using PuTTY's Pageant) are correctly set.
     159
     160To establish the ssh tunnel, enter the "SSH-->tunnels" tab in the PuTTY configuration window. \\
     161You have to enter the source port (eg. <5900+DISPLAY> = 5902 if DISPLAY=2) and the destination (in this case localhost:<5900+DISPLAY>) and than press add. \\
     162After pressing add, the tunnel should appear in the list of forwarded ports and you can establish the tunnel by pressing the open button:
     163
     164[[Image(PuTTY-add-tunnel.png, 320px)]]
     165[[Image(PuTTY-tunnel-added.png, 320px)]]
     166
     167
     168=== 4. Start a VNC viewer and connect
     169If 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 [http://sourceforge.net/projects/turbovnc/files/ here].
     170
     171Start your local VNC client and connect to localhost:<DISPLAY>, e.g.:
     172{{{ #!ShellExample
     173vncviewer localhost:2
     174}}}
     175After 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.