wiki:hpc

Getting an account

First, you need to send an email to Joseph Farran (email: jfarran@…) and request an account. For general info go to http://hpc.oit.uci.edu/running-jobs.

ssh configuration

You can add the following lines to ~/.ssh/config on your local machine:

Host hpc hpc.oit.uci.edu
  HostName hpc.oit.uci.edu
  User YOURHPCUSERNAME
  HostKeyAlias hpc.uci.edu
  HostbasedAuthentication no

and replace YOURHPCUSERNAME by your hpc username.

Once this is done, you can ssh hpc by simply doing:

ssh hpc

Password-less ssh

Once you have the account, you can setup a public key authentification in order to avoid having to input your password for each run. You need to have a SSH public/private key pair. If you do not, you can create a SSH public/private key pair by typing the following command and following the prompts (no passphrase necessary):

$your_localhost% ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):RETURN
Enter passphrase (empty for no passphrase):RETURN
Enter same passphrase again:RETURN
Your identification has been saved in /Users/username/.ssh/id_rsa.
Your public key has been saved in /Users/username/.ssh/id_rsa.pub.

Two files were created: your private key /Users/username/.ssh/id_rsa, and the public key /Users/username/.ssh/id_rsa.pub. The private key is read-only and only for you, it is used to decrypt all correspondence encrypted with the public key. The contents of the public key need to be copied to ~/.ssh/authorized_keys on your hpc account:

$your_localhost%scp ~/.ssh/id_rsa.pub username@your_remotehost:~

Now on hpc, copy the content of id_rsa.pub:

$your_remotehost%cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
$your_remotehost%rm ~/id_rsa.pub

Environment

On hpc, add the following lines to ~/.bashrc:

export ISSM_DIR=PATHTOTRUNK
source $ISSM_DIR/etc/environment.sh
module load cmake/2.8.10.2

Log out and log back in to apply this change.

Installing ISSM on hpc

hpc will only be used to run the code, you will use your local machine for pre and post processing, you will never use hpc's matlab. You can check out ISSM and install the following packages:

  • autotools
  • PETSc 3.7 (use the hpc script and follow the instructions, you will need to submit a job and compile PETSc manually, do not make test, it will not work on the cluster)
  • m1qn3

Use the following configuration script (adapt to your needs):

./configure \
 --prefix=$ISSM_DIR \
 --with-wrappers=no \
 --with-kml=no \
 --with-bamg=no \
 --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
 --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
 --with-m1qn3-dir=$ISSM_DIR/externalpackages/m1qn3/install \
 --with-mpi-include="/data/apps/mpi/openmpi-1.8.3/gcc/4.8.3/include" \
 --with-mpi-libflags="-L/data/apps/mpi/openmpi-1.8.3/gcc/4.8.3/lib -lmpi_cxx -lmpi -lmpi_usempi" \
 --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
 --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
 --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
 --with-numthreads=16 \
 --with-fortran-lib="-L/data/apps/gcc/4.7.3/lib64 -lgfortran" \
 --enable-debugging \
 --enable-development

hpc_settings.m

HPC staff ask that no "serious work" should be done on your home directory, you should create an execution directory as /pub/$USERNAME/execution.

You have to add a file in $ISSM_DIR/src/m entitled hpc_settings.m with your personal settings on your local ism install:

cluster.login='mmorligh';
cluster.port=8000;
cluster.queue='pub64';
cluster.codepath='/data/users/mmorligh/trunk-jpl/bin/';
cluster.executionpath='/data/users/mmorligh/trunk-jpl/execution/';

use your username for the login and enter your code path and execution path. These settings will be picked up automatically by matlab when you do md.cluster=hpc()

Running jobs on hpc

On hpc, you can use up to 64 cores per node. The more nodes and the longer the requested time, the more you will have to wait in the queue. So choose your settings wisely:

md.cluster=hpc('numnodes',1,'cpuspernode',8);

The list of available queues is 'pub64','free64','free48','free*,pub64' and 'free*'.

to have a job of 8 cores on one node. If the run lasts longer than 10 minutes, it will be killed and you will not be able to retrieve your results.

Now if you want to check the status of your job and the queue you are using, type in the bash with the hpc session:

qstat -u USERNAME

You can delete your job manually by typing:

qdel JOBID

where JOBID is the ID of your job (indicated in the Matlab session). Matlab indicates too the directory of your job where you can find the files JOBNAME.outlog and JOBNAME.errlog. The outlog file contains the informations that would appear if you were running your job on your local machine and the errlog file contains the error information in case the job encounters an error.

If you want to load results from the cluster manually (for example if you have an error due to an internet interruption), you find in the informations Matlab gave you /home/srebuffi/trunk-jpl/execution//SOMETHING/JOBNAME.lock , you copy the SOMETHING and you type in Matlab:

md=loadresultsfromcluster(md,'SOMETHING');
Last modified 5 years ago Last modified on 01/15/19 14:20:45
Note: See TracWiki for help on using the wiki.