| 1 | |
| 2 | |
| 3 | == ... |
| 4 | == Manual Access ... |
| 5 | VNC follows a very general approach, where a remote graphical desktop on one node of the remote cluster is started. \\ |
| 6 | On the user's workstation only a lightweight VNC viewer has to be installed. \\ |
| 7 | The graphical screen of the remote desktop is send as an image from the cluster to the viewer on the fly. |
| 8 | |
| 9 | The user can work with this remote graphical desktop in the usual way, just by interacting with keyboard and mouse. \\ |
| 10 | This is a very convenient way to work on a remote machine, not only for data visualization. |
| 11 | |
| 12 | VNC offers the ability to detach from a session (running in a VNC server) and then attach back at a later time. \\ |
| 13 | 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. \\ |
| 14 | Later 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)]] |
| 20 | Whenever an OpenGL capable visualization software, like !VisIt, is started on the remote cluster node, \\ |
| 21 | OpenGL 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) |
| 23 | This 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? |
| 27 | Using VNC requires three general steps. |
| 28 | 1. '''Prepare your account''' on a JURECAVIS node. |
| 29 | 2. '''Start a VNC server''' on a JURECA node. |
| 30 | 3. '''Tunnel VNC traffic''' to your workstation. |
| 31 | 4. '''Start a VNC viewer''' on your workstation and connect to the VNC server. |
| 32 | |
| 33 | \\ |
| 34 | === 1. Prepare your account ... |
| 35 | Before 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 |
| 40 | ssh <USERID>@jurecavis.fz-juelich.de |
| 41 | mkdir ~/.vnc |
| 42 | vncpasswd |
| 43 | }}} |
| 44 | |
| 45 | \\ |
| 46 | === 2. Start VNC server ... |
| 47 | The following steps are necessary to start a VNC server on JURECA. \\ |
| 48 | Please notice that you have two general options: |
| 49 | |
| 50 | You 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 | |
| 60 | In case the VNC server could successfully be started (details in 1a,b), you will find a simular line in the output: |
| 61 | {{{ #!sh |
| 62 | Desktop 'TurboVNC: jurecavis02.fz-juelich.de:1 (profile <PROFILE>)' started on display jrc1384:1 (jurecavis02.fz-juelich.de:1) |
| 63 | }}} |
| 64 | |
| 65 | Two important informations have to be taken from this output \\ |
| 66 | to setup the required SSH tunnel (with the correct network port) to the allocated node in step 2: |
| 67 | 1. The allocated node is '''jurecavis02''' |
| 68 | 2. The number of the VNC display is ''':1''' |
| 69 | |
| 70 | It is very important to know that the network port of the VNC server depends on this display number. \\ |
| 71 | The actual port number is 5900+<VNC display>, therefore port '''5901''' must be tunneled in this case. |
| 72 | |
| 73 | Important 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 |
| 81 | Open a SSH shell on an interactive vis login node (jurecavis.fz-juelich.de): |
| 82 | {{{ #!sh |
| 83 | ssh <USERID>@jurecavis.fz-juelich.de |
| 84 | }}} |
| 85 | |
| 86 | Start your own VNC server on jurecavis. |
| 87 | Usefull 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 |
| 92 | vncserver -profile vis |
| 93 | |
| 94 | ... |
| 95 | Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)' |
| 96 | started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>) |
| 97 | ... |
| 98 | }}} |
| 99 | |
| 100 | ==== b. ... on a dedicated vis node |
| 101 | Open an SSH shell on any login node of JURECA the usual way: |
| 102 | |
| 103 | {{{ #!sh |
| 104 | ssh <USERID>@jureca.fz-juelich.de |
| 105 | }}} |
| 106 | |
| 107 | salloc is used to request an allocation.\\ |
| 108 | When the job is started, a shell (or other program specified on the command line) is started on the submission host (login node). \\ |
| 109 | From the shell srun can be used to interactively spawn parallel applications. \\ |
| 110 | The allocation is released when the user exits the shell. |
| 111 | |
| 112 | To 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 |
| 115 | salloc -N 1 -p vis --gres=mem512,gpu:1 --start-xserver --time=1:00:00 |
| 116 | srun -n 1 --cpu_bind=none --gres=gpu:1 vncserver -fg -profile vis -geometry 1920x1080 |
| 117 | |
| 118 | ... |
| 119 | Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)' |
| 120 | started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>) |
| 121 | ... |
| 122 | }}} |
| 123 | |
| 124 | salloc/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 |
| 135 | Now you have to open an SSH tunnel from your workstation to node on which your VNC server is running. \\ |
| 136 | The steps to be done depend strongly on your operating system and your setup. |
| 137 | |
| 138 | '''Linux:'''\\ |
| 139 | If your operating system is Linux use for interactive nodes (NODE is most likely jurecavis01... or jurecavis02...): |
| 140 | {{{ #!ShellExample |
| 141 | ssh -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 | |
| 145 | and for dedicated nodes: |
| 146 | {{{ #!ShellExample |
| 147 | ssh -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:'''\\ |
| 154 | In case your operating system is Windows, the setup of the tunnel depends on your ssh client. \\ |
| 155 | Here a short overview on how-to setup a tunnel with [http://www.putty.org/ PuTTY] is given. |
| 156 | |
| 157 | It is assumed that PuTTY is already configured in a way that a general ssh connection to JURECA is possible. \\ |
| 158 | That means that host name, user name and the private ssh key (using PuTTY's Pageant) are correctly set. |
| 159 | |
| 160 | To establish the ssh tunnel, enter the "SSH-->tunnels" tab in the PuTTY configuration window. \\ |
| 161 | You 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. \\ |
| 162 | After 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 |
| 169 | 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 [http://sourceforge.net/projects/turbovnc/files/ here]. |
| 170 | |
| 171 | Start your local VNC client and connect to localhost:<DISPLAY>, e.g.: |
| 172 | {{{ #!ShellExample |
| 173 | vncviewer localhost:2 |
| 174 | }}} |
| 175 | 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. |