Monthly Archives: July 2018

GUI HPC VNC jobs for Mac/Linux Clients

  1. not essential, but useful: create password-less access to zeus, in the terminal of your OSX/Linux do:
ssh-keygen

(just press Enter few times, do not enter any passwords or “secrets”)

Changing username to your HPC login name, do

ssh-copy-id username@zeus1.coventry.ac.uk

(enter HPC password as prompted, this will copy public ssh key created above to your zeus profile, now you can connect to zeus without entering password -> very useful for following steps). Only need to be done ONCE (per client computer)!

——————————————————————————————————————-

Next steps can be scripted, i.e. put code lines into shell script and call it later with different node name or number (node name can be passed as a parameter to the script)

2. Launch VNC server job in the zeus queue, say, on 1 GPU node asking for 1 K80 GPU and exclusive access to the node (remove –exclusive if the whole node is not needed)

 

ssh yourHPClogin@zeus1.coventry.ac.uk sbatch --exclusive -N1 --gres=gpu:K80:1 -t 24:00:00 /share/apps/slurm/vnc.slurm

(omit –gres=gpu:K80:1 if no GPUs needed)

(generally -N X in the above code line means ask for X compute nodes)

Check which node was assigned to your VNC job in the queue:

ssh username@zeus1.coventry.ac.uk squeue -u $USERNAME

Say the result of that is compute node zeus400 assigned to your VNC job (you can always check with “qstat” or “squeue -u $USER” on zeus or on zeus website (show queue)

 

3. Establish tunnel from your Mac to target node (e.g. zeus400) via zeus2.coventry.ac.uk (or zeus1):

ssh -L localhost:5901:zeus400:5901 zeus2.coventry.ac.uk

 

4. Now launch vncviewer on your Mac and connect to localhost:1 (that must bring you to the VNC session at zeus400:1

vncviewer localhost:1

(or any other way you launch it on Macs…)
Alex Pedcenko

02 GUI HPC VNC jobs for Windows Clients

For running GUI jobs on HPC compute node (rather than on login node), you can use my new Windows HTA-scripts from here: aa3025/hpc (coventry.ac.uk). They will also work via University VPN (Anyconnect)

##### optional step – usually already done when your HPC account is created ########

Prior to all the following you need to set your VNC password on the HPC (you can also change your VNC password this way):

  • login via ssh to HPC,
  • issue the command “vncpasswd” to change your VNC password (VNC password can be different to your HPC password, but it makes life easier if it is the same as your HPC password). Use this password for connecting to your VNC sessions in future.
####################################################

You can use these “scripts” to launch VNC (Remote Desktop) job on one of the HPC compute nodes if you need access to GUI (Graphical User Interface)

These scripts allow establishing VNC Desktop session on a compute node of HPC : (see also VIDEO screen cast here)

or here:

0) Download the whole distribution from aa3025/hpc (coventry.ac.uk) You have at least to download 2 folders: “tools” and either “zeus” or “pluto” depending on which HPC you use. You can use git for synchronising the whole distribution:

git clone https://github.coventry.ac.uk/aa3025/hpc.git
Alternatively you can download the zip archive from : HERE

1) Depending which HPC you are about to use, choose a folder zeus or pluto to launch VNC session on required HPC. Before proceeding further  check that HPC has free (idle) compute nodes available (“sinfo” in HPC console or check Zeus website or Pluto website)

2) Launch only one script: 01_START_VNC_Session_….._1_node.hta (by double-clicking on it), a.k.a. “submission app”

3) Fill in your HPC username, password and the rest of info. Hit “Submit” button, the script will then submit the “VNC” job to the HPC queue in order to start “vncserver” process [Remote Desktop session] on the assigned compute node.

4) Wait for your VNC job to start in the queue of HPC (you will see job listing in the newly opened black “plink” console window), note the target node name (it is also presented in the last column of the small table at the bottom of the submission app).

5) Once VNC job has started (“Running” state, “R”) in the black console,  you can close it. Make sure your VNC job is in Running state (also specified by “R” against your job ID in the table at the bottom of the submission app, if it is still in “PD” state (means still “pending”), waiting for resources to be allocated).

6) Once you closed the first (job submission) app and black console window, the second script will start automatically to get the ssh-tunnel running between your PC and the allocated compute node and will connect you to the node’s VNC session — fill in the target node name from the previous step and your HPC password. The VNC screen number is always :1 (you can’t change it).

7) Now, the VNC password window will pop up — enter your VNC password there (theoretically it can be different from your HPC password). If you do not have VNC password, return to the top of this page (“Prior to all of the following…”) and set it up.

8) If all went well, the VNC Remote Desktop windows will be presented. You can toggle it to full screen by pressing F8 on your keyboard (amongst some other options in F8 as well).

By default the VNC job will last for 24 hours and will request 1 whole node, you can select different time and less CPUs than on the whole node or more than one compute node to be allocated.

More than one compute node. If you specify more than one node in VNC job submission app, the VNC Desktop session will start on the first allocated node, but the resources of all other allocated nodes will still be available from your VNC Desktop session.

VNC job termination

When the slurm VNC job expires (the time limit of your job [normally 24 hours if you did not change it] was reached), your VNC Desktop session will be terminated.

However, if you wish to terminate the VNC job before it expires (you do not use it any more and need to free the HPC resources), you can either just kill it from ssh console with “scancel JOBID” command, or by selecting “Logout” in your VNC Desktop session and your slurm job with VNC sessions will terminate.

If you just close the VNC viewer window on your PC –> the VNC Desktop session will remain running until termination time is reached or you cancel your VNC job. Make sure you do not waste HPC resources by having idle VNC sessions’ jobs hanging in the queue!

Alex Pedcenko

css.php