UKCA Training: Logging in and Setting up

From UKCA

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
  3. Software updates may need to be applied - this may take some time.
    • If the workstation needs to reboot after updates, 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 in the white envelope. These details are unique to you - do not share them with others.

PUMA and ARCHER

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 -X userid@puma.nerc.ac.uk
  2. Log in to ARCHER using the provided training account username and password: ssh -X ncastrXX@login.archer.ac.uk
    • 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
    • When password-less logins have been set-up, you will be able to login to ARCHER directly from PUMA
  3. If you have NOT already done so, generate your SSH-key:
  4. puma$ ssh-keygen -f ~/.ssh/id_dsa -C " userid@puma.nerc.ac.uk" 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/id_dsa.pub. The key fingerprint is: md5 1024 String of characters userid@puma.nerc.ac.uk
    • 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. Note: Please DO NOT use an empty passphrase as this presents a security issue.
  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/id_dsa.pub | ssh ncastrXX@login.archer.ac.uk '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 ncastrXX@login.archer.ac.uk Enter passphrase for key userid@puma.nerc.ac.uk: 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.
  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 (userid@puma.nerc.ac.uk): 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: https://puma.nerc.ac.uk/trac/UM_TUTORIAL/wiki/sshAgent

Setting-up your .profile on ARCHER

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

export UMDIR=/work/n02/n02/hum 
TARGET_MC=cce

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

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

UMUI Jobs

  1. You should modify the UMUI to use the ARCHER training account username in the
  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 88 nodes. This reservation runs from 12.30-18:00 from the 5th-9th January 2015.
    • To make use of this queue, you should make sure that the following hand-edit is included and turned on:
    ~ukca/hand_edits/Tutorials/course1-queue
  4. The UKCA tutorial jobs that you will be running make use of pre-compiled builds. For technical reasons you should not try to recompile the reconfiguration executable, as this is using one from a central location.
  5. Once the job is running, you can check the progress of the job by typing qstat -u $USER, e.g.
  6. ncastr01@eslogin003:~> qstat -u $USER sdb: Req'd Req'd Elap Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time --------------- -------- -------- ---------- ------ --- --- ------ ----- - ----- 2590413.sdb ncastr01 S2528390 xkwbb_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 ./umui_runs/jobid-XXXXXXXXX/umuisubmit_compile
    • jobid-XXXXXXXXX is the most recent directory in your ./umui_runs directory.
  6. After the job has compiled, you should then
    • Submit the reconfiguration step by:
    qsub ./umui_runs/jobid-XXXXXXXXX/umuisubmit_rcf
    • 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 5th January, using reservation R2577849
  • ~ukca/hand_edits/Tutorials/reserve_tuesday for Tuesday 6th January, using reservation R2577850
  • ~ukca/hand_edits/Tutorials/reserve_wednesday for Wednesday 7th January, using reservation R2577853
  • ~ukca/hand_edits/Tutorials/reserve_thursday for Thursday 8th January, using reservation R2577854
  • ~ukca/hand_edits/Tutorials/reserve_friday for Friday 9th January, using reservation R2577855

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. R2577849 for Monday 5th January etc.).