wiki:Docs/Mobilis

Setting up GC2 N96-ORCA1 job to run on Mobilis

It is assumed that the job will be submitted from UMUI on PUMA. The user should have access to PUMA and the UM, NEMO and CICE repositories.

Setup ssh-agent on PUMA

  1. Generate the authentication key on PUMA
     puma$ ssh-keygen -f ~/.ssh/id_dsa -C "<username>@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] <username>@puma.nerc.ac.uk
    

[TYPE-YOUR-PASSPHRASE] is 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.

  1. Add the public key to the ~/.ssh/authorized_keys file on NOC and MOBILIS.

To achieve this in a secure manner, do the following:

puma$ cat ~/.ssh/id_dsa.pub | ssh <username>@ssh.noc.soton.ac.uk 'mkdir -p .ssh ; cat - >> ~/.ssh/authorized_keys'
[Enter your NOC password]

Copy the ~/.ssh/authorized_keys file from NOC to Mobilis
NOC$ scp ~/.ssh/authorized_keys <username>@mobilis1:~/.ssh/authorized_keys

(NB: Sometimes, even though the file is copied across successfully, the above command will hang. In which case, do a Cntl-C to exit, and login to the remote platform and verify the file .ssh/authorized_keys has arrived safely)

  1. Verify the authentication works:
    puma$ ssh <username>@ssh.noc.soton.ac.uk
    Enter passphrase for key '<username>'@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 2 above, was successfully copied over to ARCHER.

  1. Make sure your ssh keys are safe:
    puma$ chmod -R 700 .ssh
    NOC$ chmod -R 700 .ssh
    MOBILIS$ chmod -R 700 .ssh
    
  1. Make the ssh-agent automatically start-up when your session runs.

5.1 Copy my setup script to $HOME/.ssh/setup, and ensure it has execute permission:

puma$ chmod u+x $HOME/.ssh/setup

5.2 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

  1. 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):
    puma$ ssh-add
    Enter passphrase for ~/.ssh/id_dsa (<username>@puma.nerc.ac.uk): [Type Passphrase]
    
  2. PUMA: Edit $HOME/.ssh/config to add the following lines
    Host ssh.noc.soton.ac.uk
    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes
    
  3. NOC: create, or append to, the file $HOME/.ssh/config
    Host *
    ForwardAgent yes
    ForwardX11 yes
    

Setup modules on MOBILIS

Add the following entries to .bashrc file

export PATH
export PATH=/hpcdata/working/umman/fcm-2014-04/bin:$PATH
module purge
module load slurm/2.5.7
module load intel/compiler/64/14.0/2013_sp1.2.144
module load openmpi/intel/64/1.6.5
module load hdf5_18/1.8.11
module load netcdf/intel/64/4.3.0
module list
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/jeff/packages/netcdf4/netcdf-fortran-4.2/mobilis/intel14.0/lib/

export UMDIR=/hpcdata/working/umman
export TARGET_MC=intel

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

Setup ssh tunnel in PUMA

1) Run the following ssh command to set up a tunnel:

ssh -L21452:mobilis1:22 <username>@ssh.noc.soton.ac.uk

This should take you directly onto the NOC Machine with no prompt for password/passphrase. This window needs to remain open for the job to submit successfully.

2) Test this out by running on PUMA

ssh -p21452 <username>@localhost

If all is well you should get logged into mobilis.

3) In your .profile on PUMA add the line

export MOBILIS_PORT=21452

Important : the port number should be unique for each user and user should select a random port number (from 21000 to 99999) to avoid using the same port number.

Setup new job in UMUI

1) Copy the job xkjai to a new experiment.

2) Navigate to Model Selection → User Information and Submit Method → General details
Set User-id to be your NOC id.

3) Navigate to Model Selection → FCM Configuration → FCM Extract directories and Output levels
Set Target machine root extract directory (UM_ROUTDIR) to /hpcdata/working/<username>/um

Last modified 17 months ago Last modified on 08/02/16 16:38:10