78 | | The user can work with this remote graphical desktop in the usual way, just by interacting with keyboard and mouse. \\ |
79 | | This is a very convenient way to work on a remote machine, not only for data visualization. |
80 | | |
81 | | VNC offers the ability to detach from a session (running in a VNC server) and then attach back at a later time. \\ |
82 | | 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. \\ |
83 | | Later on the user can connect back to the same VNC session (even from a different computer) and keep on working. \\ |
84 | | |
85 | | [[Image(Trac_Setup_VNC.png, 640px)]]\\ |
86 | | |
87 | | ==== hardware accelerated rendering (OpenGL) |
88 | | [[Image(https://upload.wikimedia.org/wikipedia/commons/thumb/6/67/X11transport.png/600px-X11transport.png, 200px, align=right, margin=0)]] |
89 | | Whenever an OpenGL capable visualization software, like !VisIt, is started on the remote cluster node, \\ |
90 | | OpenGL commands can be redirected to the GPU of this node with the help of [http://www.virtualgl.org VirtualGL]. \\ |
91 | | * ... using '''vglrun''' (e.g. vglrun paraview) |
92 | | This way the hardware accelerated rendering capabilities of a cluster node (if available) can be exploit for remote rendering. \\ |
93 | | (attention: __without__ VirtualGL software, rendering using the CPU instead of the GPU must be used (if available), which is much slower). |
94 | | |
95 | | ==== ok, what do I have to do? |
96 | | Using VNC requires three general steps. |
97 | | 1. '''Prepare your account''' on a JURECAVIS node. |
98 | | 2. '''Start a VNC server''' on a JURECA node. |
99 | | 3. '''Tunnel VNC traffic''' to your workstation. |
100 | | 4. '''Start a VNC viewer''' on your workstation and connect to the VNC server. |
101 | | |
102 | | \\ |
103 | | === 1. Prepare your account ... |
104 | | Before you use VNC '''for the first time''' you have to prepare your account: |
105 | | * login to a JURECAVIS node |
106 | | * create the directory ~/.vnc |
107 | | * define VNC password |
108 | | {{{ #!sh |
109 | | ssh <USERID>@jurecavis.fz-juelich.de |
110 | | mkdir ~/.vnc |
111 | | vncpasswd |
| 83 | '''[wiki:vnc3d/manual vncserver/ssh/vncviewer]''' (manual connection) |
| 84 | * manual start of VNC server on JURECA |
| 85 | * manual tunnel for VNC data |
| 86 | * manual start of VNC viewer on local machine |
| 87 | ................................................................................................................................................................................... |
| 88 | }}} |
114 | | \\ |
115 | | === 2. Start VNC server ... |
116 | | The following steps are necessary to start a VNC server on JURECA. \\ |
117 | | Please notice that you have two general options: |
118 | | |
119 | | You can start the VNC server ... |
120 | | * ... on an '''interactive vis login node''' |
121 | | * + no batch system == instant access |
122 | | * -- system is shared with other users |
123 | | * ... on a '''dedicated vis node''' |
124 | | * + system is not shared (exclusive use) |
125 | | * -- access through batch system |
126 | | |
127 | | |
128 | | |
129 | | In case the VNC server could successfully be started (details in 1a,b), you will find a simular line in the output: |
130 | | {{{ #!sh |
131 | | Desktop 'TurboVNC: jurecavis02.fz-juelich.de:1 (profile <PROFILE>)' started on display jrc1384:1 (jurecavis02.fz-juelich.de:1) |
132 | | }}} |
133 | | |
134 | | Two important informations have to be taken from this output \\ |
135 | | to setup the required SSH tunnel (with the correct network port) to the allocated node in step 2: |
136 | | 1. The allocated node is '''jurecavis02''' |
137 | | 2. The number of the VNC display is ''':1''' |
138 | | |
139 | | It is very important to know that the network port of the VNC server depends on this display number. \\ |
140 | | The actual port number is 5900+<VNC display>, therefore port '''5901''' must be tunneled in this case. |
141 | | |
142 | | Important notes: |
143 | | * To ensure VNC sessions are not forgotten and keep on running forever, they will be '''killed after 24 hours ''' (WITHOUT warning). |
144 | | * Logout from your VNC session, after you have finished your work. This will save resources and close the VNC server. \\ |
145 | | * If you start the VNC server the first time, you will be asked for a password (which is stored in ~/.vnc/passwd). \\ |
146 | | You will be asked for this password by the VNC viewer, when you connect to the VNC server. \\ |
147 | | To reset the password just delete the file ~/.vnc/passwd. |
148 | | |
149 | | ==== a. ... on an interactive vis login node |
150 | | Open a SSH shell on an interactive vis login node (jurecavis.fz-juelich.de): |
151 | | {{{ #!sh |
152 | | ssh <USERID>@jurecavis.fz-juelich.de |
153 | | }}} |
154 | | |
155 | | Start your own VNC server on jurecavis. |
156 | | Usefull vncserver parameters are: |
157 | | * -profile -> choose a profile (eg. -profile vis) |
158 | | * -geometry -> set the screen size (eg. -geometry 1920x1080) |
159 | | {{{ #!sh |
160 | | # start the VNC server on visualization login node |
161 | | vncserver -profile vis |
162 | | |
163 | | ... |
164 | | Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)' |
165 | | started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>) |
166 | | ... |
167 | | }}} |
168 | | |
169 | | ==== b. ... on a dedicated vis node |
170 | | Open an SSH shell on any login node of JURECA the usual way: |
171 | | |
172 | | {{{ #!sh |
173 | | ssh <USERID>@jureca.fz-juelich.de |
174 | | }}} |
175 | | |
176 | | salloc is used to request an allocation.\\ |
177 | | When the job is started, a shell (or other program specified on the command line) is started on the submission host (login node). \\ |
178 | | From the shell srun can be used to interactively spawn parallel applications. \\ |
179 | | The allocation is released when the user exits the shell. |
180 | | |
181 | | To allocate a vis node with 512 GByte main memory for one hour, use: |
182 | | {{{ #!sh |
183 | | # request allocation and spawn VNC server on visualization node |
184 | | salloc -N 1 -p vis --gres=mem512,gpu:1 --start-xserver --time=1:00:00 |
185 | | srun -n 1 --cpu_bind=none --gres=gpu:1 vncserver -fg -profile vis -geometry 1920x1080 |
186 | | |
187 | | ... |
188 | | Desktop 'TurboVNC: <NODE>:<DISPLAY> (profile <PROFILE>)' |
189 | | started on display <NODE>:<DISPLAY> (<NODE>:<DISPLAY>) |
190 | | ... |
191 | | }}} |
192 | | |
193 | | salloc/srun options |
194 | | * -N 1 -> Set number of requested nodes. |
195 | | * -p vis -> Limit request to nodes from the visualization partition. |
196 | | * --gres=mem512 -> Set the size of main memory per node (mem512 or mem1024). |
197 | | * --gres=gpu:2 -> Set the number of requested GPUs in the range of 0-2. |
198 | | * --start-xserver -> Start an Xserver for usage with VirtualGL. |
199 | | * --time=1:00:00 -> Set the default wallclock time to 1 hour (the maximum is 24 hours). |
200 | | * Please check 'salloc --help' and 'srun --help' for more details. |
201 | | |
202 | | |
203 | | === 3. Tunnel VNC traffic to workstation |
204 | | Now you have to open an SSH tunnel from your workstation to node on which your VNC server is running. \\ |
205 | | The steps to be done depend strongly on your operating system and your setup. |
206 | | |
207 | | '''Linux:'''\\ |
208 | | If your operating system is Linux use for interactive nodes (NODE is most likely jurecavis01... or jurecavis02...): |
209 | | {{{ #!ShellExample |
210 | | ssh -N -L <5900+DISPLAY>:<NODE>:<5900+DISPLAY> <USERID>@<NODE>.fz-juelich.de |
211 | | # example: ssh -N -L 5907:jurecavis01:5907 jjuser@jurecavis01.fz-juelich.de |
212 | | }}} |
213 | | |
214 | | and for dedicated nodes: |
215 | | {{{ #!ShellExample |
216 | | ssh -N -L <5900+DISPLAY>:<NODE>:<5900+DISPLAY> <USERID>@jureca.fz-juelich.de |
217 | | # example: ssh -N -L 5902:jrc1327:5902 jjuser@jureca.fz-juelich.de |
218 | | }}} |
219 | | |
220 | | |
221 | | |
222 | | '''Windows:'''\\ |
223 | | In case your operating system is Windows, the setup of the tunnel depends on your ssh client. \\ |
224 | | Here a short overview on how-to setup a tunnel with [http://www.putty.org/ PuTTY] is given. |
225 | | |
226 | | It is assumed that PuTTY is already configured in a way that a general ssh connection to JURECA is possible. \\ |
227 | | That means that host name, user name and the private ssh key (using PuTTY's Pageant) are correctly set. |
228 | | |
229 | | To establish the ssh tunnel, enter the "SSH-->tunnels" tab in the PuTTY configuration window. \\ |
230 | | 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. \\ |
231 | | After pressing add, the tunnel should appear in the list of forwarded ports and you can establish the tunnel by pressing the open button: |
232 | | |
233 | | [[Image(PuTTY-add-tunnel.png, 320px)]] |
234 | | [[Image(PuTTY-tunnel-added.png, 320px)]] |
235 | | |
236 | | |
237 | | === 4. Start a VNC viewer and connect |
238 | | 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]. |
239 | | |
240 | | Start your local VNC client and connect to localhost:<DISPLAY>, e.g.: |
241 | | {{{ #!ShellExample |
242 | | vncviewer localhost:2 |
243 | | }}} |
244 | | 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. |