UKCA Training: Logging in and Setting up


You will be using the machines in the G30 computer lab in the Department of Chemistry.

G30 Workstations

You will be using MCS Linux on the G30 workstations during this course.

  1. Boot to MCS Linux
    • If the machine is powered-off, please turn it on.
    • If machine is on the Windows login screen, press Ctrl-Alt-Del and the press the drop-down menu on the red power-off button (bottom right) and select Restart.
      • If this button is not on the screen, please log-in to Windows and select Restart from the Start Menu.
  2. On the BIOS boot screen, select MCS Linux
    • You will need to be quick here, as you are only allowed 10 seconds to change from the default (Windows)
  3. Software updates may need to be applied - this may take some time.
    • If the workstation needs to reboot after updates, it should boot back into MCS Linux automatically.
  4. You should NOT stay logged-in overnight, as the workstations may power-down in the evenings.
  5. To log-in, use the conference username and password provided. These details are unique to you - do not share them with others.


You should use your personal PUMA account during this course.

Setting-up passwordless SSH from PUMA to ARCHER

  1. Log in to PUMA using your personal account details: ssh -Y
  2. Log in to ARCHER using the provided training account username and password: ssh -Y
    • Note: Please type your ARCHER password carefully - if it is typed incorrectly too many times you may find that you are locked out of the account
  3. If you have NOT already done so, generate your SSH-key:
  4. puma$ ssh-keygen -f ~/.ssh/id_dsa -C ""
    Generating public/private rsa key pair.
    Enter passphrase(empty for no passphrase): TYPE_YOUR_PASSPHRASE
    Enter same passphrase again: TYPE_YOUR_PASSPHRASE
    Your identification has been saved in ~/.ssh/id_dsa.
    Your public key has been saved in ~/.ssh/
    The key fingerprint is:
    md5 1024 String of characters
    • TYPE_YOUR_PASSPHRASE needs to be a fairly complicated and unguessable passphrase. You can use spaces in the pass phrase if it helps you to remember it more readily. It is recommended that you don't use your password just in case this is hacked.
    • You should NOT use an empty passphrase as this presents a security issue.
    • If you already have a SSH-key, you can reuse it.
  5. Add the public key to the ~/.ssh/authorized_keys file on ARCHER.
    • To achieve this in a secure manner, do the following:
    puma$ cat ~/.ssh/ | ssh 'mkdir -p .ssh ; cat - >> ~/.ssh/authorized_keys'
    Enter the password of your ARCHER training account
    • Sometimes, even though the file is copied across successfully, the above command will hang. In which case, do a Ctrl-C to exit, and login to the remote platform and verify the file ~/.ssh/authorized_keys has arrived safely
  6. Verify the authentication works:
  7. puma$ ssh -Y
    Enter passphrase for key Type Passphrase
    • If you don't get the prompt for your DSA key (i.e. asked for your Passphrase), then something has gone wrong. Make sure the public key, step 3 above, was successfully copied over to ARCHER. If this happens then you can force the use of the key by using -i:
    puma$ ssh -i ~/.ssh/id_dsa -Y
    Enter passphrase for key Type Passphrase
  8. Make sure your ssh keys are safe:
  9. puma$ chmod -R 700 .ssh
    ARCHER$ chmod -R 700 .ssh
  10. Make the ssh-agent automatically start-up when your session runs, if you have NOT done so already.
    • On PUMA copy the setup script from /home/ukca/TutorialSetup to $HOME/.ssh/setup, and ensure it has execute permission:
    puma$ chmod u+x $HOME/.ssh/setup
    • Call this script from your .kshrc or .bashrc (ksh or bash shell respectively) file by adding the following line. If you don't have a .kshrc/.bashrc file at it to your .profile.
    . $HOME/.ssh/setup
  11. Run the following command and type your passphrase (you may need to do this every time a new ssh-agent is started - ie. every time you re-start your local session):
  12. puma$ ssh-add
    Enter passphrase for ~/.ssh/id_dsa ( Type Passphrase
    • If needed, you can explicitly specify the key:
    puma$ ssh-add ~/.ssh/id_dsa
    Enter passphrase for ~/.ssh/id_dsa ( Type Passphrase

You may now find it easier to log in to PUMA first, then use passwordless SSH to connect to your ARCHER training account.

These instructions have been adapted from:

Setting-up your .profile on ARCHER

You should ensure that your .profile on ARCHER contains the following lines:

export UMDIR=/work/n02/n02/hum 

# Setup UM Variables
if test -f $HOME/.umsetvars_$VN; then
  . $HOME/.umsetvars_$VN
  . $UMDIR/vn$VN/$TARGET_MC/scripts/.umsetvars_$VN

An example .profile can be copied from /home/n02/n02/ukca/TutorialSetup/example.profile on ARCHER.


  1. You should modify the UMUI to use the ARCHER training account username in the following panel:
  2. Model Selection
       User Information and Submit Method
         General details
    • You should also make sure that the Account name is set to n02-training
  3. For this course, you will be running on a specially reserved queue, made up of 80 nodes. This reservation runs from 13:00-17:30 from the 4th-7th January, and from 13:00-15:30 on the 8th January.
    • To make use of this queue, you should make sure that the following hand-edit is included and turned on:
  4. The UKCA tutorial jobs that you will be running make use of pre-compiled builds.
  5. Once the job is running, you can check the progress of the job by typing qstat -u $USER, e.g.
  6. ncastrXX@eslogin003:~> qstat -u $USER
                                                                Req'd  Req'd   Elap
    Job ID          Username Queue    Jobname    SessID NDS TSK Memory Time  S Time
    --------------- -------- -------- ---------- ------ --- --- ------ ----- - -----
    2590413.sdb     ncastrXX S2528390 jobid_rcf    7017   2  48    --  00:10 R 00:00

Manually compiling UM jobs on ARCHER

Usually, UM jobs are submitted to the ARCHER serial queue to compile, before being automatically submitted to the parallel queues for the reconfiguration and run steps. However, if you are having problems compiling (i.e. the job is taking a lot longer than the expected 10 minutes) you should manually compile the job on the login node.

  1. To do this, you need to include and turn-on the following hand-edit:
  2. ~ukca/hand_edits/VN8.4/manual_comp_ARCHER.ed
  3. Save, process, and submit in the usual way
  4. Then, on ARCHER you will find that the job has not been submitted to the serial queue. To compile the job you should then:
  5. cd
    ls -ltr ./umui_runs 
    • jobid-XXXXXXXXX is the most recent directory in your ./umui_runs directory.
    • Note: if too many people are trying to manually compile on the same login node, you should log-out and try another.
      • You can directly log-in to one of the 8 esLogin nodes by
    ssh -Y
  6. After the job has compiled, you should then
    • Submit the reconfiguration step by:
    qsub ./umui_runs/jobid-XXXXXXXXX/umuisubmit_rcf
    You should then wait for this job to finish, before submitting the run step.
    • Then submit the run step by
    qsub ./umui_runs/jobid-XXXXXXXXX/umuisubmit_run

The course1 queue

The hand-edit ~ukca/hand_edits/Tutorials/course1-queue has been designed around the fact that the five separate reservations are grouped into a single queue called course1. However, if there are any problems with this grouping, then individual hand-edits for each day may need to be used:

  • ~ukca/hand_edits/Tutorials/reserve_monday for Monday 4th January, using reservation R3375651
  • ~ukca/hand_edits/Tutorials/reserve_tuesday for Tuesday 5th January, using reservation R3375652
  • ~ukca/hand_edits/Tutorials/reserve_wednesday for Wednesday 6th January, using reservation R3375653
  • ~ukca/hand_edits/Tutorials/reserve_thursday for Thursday 7th January, using reservation R3375656
  • ~ukca/hand_edits/Tutorials/reserve_friday for Friday 8th January, using reservation R3375658

If you are manually compiling, then you can do

qsub -q RESERVATION ./umui_runs/jobid-XXXXXXXXX/umuisubmit_rcf
qsub -q RESERVATION ./umui_runs/jobid-XXXXXXXXX/umuisubmit_run

where RESERVATION is the correct reservation code from the above list (e.g. R3375651 for Monday 4th January etc.).

Reservations can be seen using the pbs_rstat command, e.g.

[14:42:04 luke@eslogin006 ~]$ pbs_rstat
Name       Queue    User     State             Start / Duration / End              
R3375651.s R3375651 +,orange CO    Mon Jan 04 2016 1 / 16200 / Mon Jan 04 2016 1
R3375652.s R3375652 +,orange CO    Tue Jan 05 2016 1 / 16200 / Tue Jan 05 2016 1
R3375653.s R3375653 +,orange CO    Wed Jan 06 2016 1 / 16200 / Wed Jan 06 2016 1
R3375656.s R3375656 +,orange CO    Thu Jan 07 2016 1 / 16200 / Thu Jan 07 2016 1
R3375658.s R3375658 +,orange CO    Fri Jan 08 2016 1 / 9000 / Fri Jan 08 2016 1

Required files and worked solutions

Worked solutions are available for the practicals. These can be found both on ARCHER and on the local Cambridge workstations.


The files can be found within the



The Task5.1/ sub-directory holds the files required to make up the emissions ancillary. There is also a solution/ directory provided here as well.

The sample_output/ sub-directory contains the available sample output for each of the tasks.


In case ARCHER goes down, a duplicate of the ARCHER directory can be found at


on the MCS Linux system. There is also a bin/ sub-directory which contains Xconv, Xancil, and cdo binaries. The Code/ sub-direcrory contains the source-code for solutions for Tasks 4.2-9.1.

Copying data over to your normal ARCHER account

At the end of the course, your NCAS training accounts will be deactivated and the data within them deleted. To save any work that you have done, you will need to copy this data elesewhere. It is recommended that you copy the data over to your normal ARCHER account, and using rsync is a good way to do this.

Using rsync

  1. Log in to your normal ARCHER account:
    ssh -Y
  2. Make a directory to hold this data on the /work directory of your normal ARCHER account. e.g.
    cd /work/n02/n02/userid
    mkdir Tutorials
    cd Tutorials
    • Within this directory, then type pwd to get the full path to this directory.
  3. Log in to your NCAS training account:
    ssh -Y
  4. On your NCAS training account, type the following command, e.g.
    rsync -auvv directory_to_copy userid@localhost:/work/n02/n02/userid/Tutorials/.
    • Where e.g. /work/n02/n02/userid/Tutorials/. is the output from the pwd command earlier.

You can also use the rsync command to copy the output elsewhere, e.g. to your host institution. In this case change the localhost above to the name of the machine you want to copy the data to.

Written by Luke Abraham 2015