HPC3 (UCI)

Table of Contents

  1. Getting an Account
  2. SSH Configuration
    1. Password-less SSH
  3. Environment
  4. Installing ISSM on HPC3
  5. Cluster Class Settings
  6. Running Jobs on HPC3

Getting an Account

Request an account on HPC3.

SSH Configuration

Add the following lines to ~/.ssh/config on your local machine,

Host hpc3 hpc3.oit.uci.edu
  HostName hpc3.oit.uci.edu
  User <USERNAME>
  HostKeyAlias hpc3.uci.edu
  HostbasedAuthentication no

replacing <USERNAME> with your HPC3 username (which should be your Dartmouth NetID). Then, you can ssh to HPC3 with,

ssh hpc3

Password-less SSH

You can setup public key authentication in order to avoid having to input your password all the time you log onto HPC3. You need an SSH public/private key pair on your local machine. If you do not have one, you can create one by executing the following command on your local machine (no passphrase necessary; press Enter at each prompt to accept the defaults),

localhost$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
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 are created:

  • your private key /Users/username/.ssh/id_rsa, and
  • the public key /Users/username/.ssh/id_rsa.pub.

The private key must be kept private and never shared — keep its file permissions restricted (600). The contents of the public key need to be copied to ~/.ssh/authorized_keys on the remote machine,

localhost$ scp ~/.ssh/id_rsa.pub username@remotehost:~

Now, log onto HPC3 and add the content of id_rsa.pub to ~/.ssh/authorized_keys,

remotehost$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
remotehost$ rm ~/id_rsa.pub

If you get an error message about /home/username/.ssh/authorized_keys: No such file or directory, you may need to create a .ssh directory first,

remotehost$ mkdir ~/.ssh
remotehost$ chmod 700 ~/.ssh

Environment

On HPC3, add the following lines to ~/.bashrc,

# Load modules
module load cmake/2.8.10.2

# ISSM
export ISSM_DIR=<PATH_TO_ISSM>
source $ISSM_DIR/etc/environment.sh

replacing <PATH_TO_ISSM> with the path to the directory that you cloned the ISSM source code repository to (note that this should be a subdirectory of /pub/<USERNAME>/). Then, run,

source ~/.bashrc

or log out and log back in to apply this change.

Installing ISSM on HPC3

HPC3 will only be used to run the code: you will use your local machine for pre- and post-processing; you will never use HPC3’ Python.

Clone the ISSM source code repository on GitHub and install the following packages:

  • autotools
  • petsc (you will need to submit a job and compile PETSc manually; do not build the tests as they not work on the cluster)
  • m1qn3

Follow the detailed instructions for compiling ISSM on Linux, and use the following configuration script (adapt to your needs),

#!/bin/sh
./configure \
    --prefix="${ISSM_DIR}" \
    --enable-debugging \
    --enable-development \
    --with-wrappers=no \
    --with-numthreads=16 \
    --with-kml=no \
    --with-bamg=no \
    --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-fortran-lib="-L/data/apps/gcc/4.7.3/lib64 -lgfortran" \
    --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-blas-lapack-dir="${ISSM_DIR}/externalpackages/petsc/install" \
    --with-mumps-dir="${ISSM_DIR}/externalpackages/petsc/install" \
    --with-scalapack-dir="${ISSM_DIR}/externalpackages/petsc/install"

Cluster Class Settings

In order to connect to HPC3 from the machine that you are doing model setup and results analysis on, you will need to create a cluster class settings file for your chosen scripting interface.

Create $ISSM_DIR/src/m/hpc_settings.m, which might include,

cluster.login='<USERNAME>';
cluster.port=8000;
cluster.queue='pub64';
cluster.codepath='<PATH_TO_ISSM_ON_CLUSTER>/bin/';
cluster.executionpath='<PATH_TO_ISSM_ON_CLUSTER>/execution/';

Cluster class hpc.py still needs to be developed.

replacing <USERNAME> with your HPC3 username and entering your code path and execution path (<PATH_TO_ISSM_ON_CLUSTER> should be in /pub/<USERNAME>/). These settings will be picked up automatically when you run md.cluster=hpc().

The list of available queues is:

  • pub64
  • free64
  • free48
  • free*,pub64
  • free*

Running Jobs on HPC3

On HPC3, 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 accordingly. For example,

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

Cluster class hpc.py still needs to be developed.

will request 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.

If you want to check the status of your job and the queue that you are using, run,

qstat -u <USERNAME>

You can delete your job manually by typing,

qdel <JOB_ID>

where <JOB_ID> is the job ID reported on your local machine when you submitted your solution request. Also reported is the directory where you can find log files associated with the run (i.e. <JOB_ID>.outlog and <JOB_ID>.errlog). The outlog contains the information that would normally be printed to the console if you were running the job on your local machine. Likewise, the errlog contains any information printed in case of error.

If you would like to load results from the cluster manually (for example, if you encountered an error due to network disconnection), run,

md=loadresultsfromcluster(md,'runtimename','<EXEC_DIR>');

where <EXEC_DIR> is the parent of the job on your local machine, for example,

${ISSM_DIR}/execution/<EXEC_DIR>/<JOB_ID>.lock