ACI (Penn State)

Table of Contents

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

Getting an Account

New users have to ask Byron for an account.

SSH Configuration

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

Host aci aci-b.aci.ics.psu.edu
    HostName aci-b.aci.ics.psu.edu
    User <USERNAME>
    HostbasedAuthentication no

replacing <USERNAME> with your ACI username. Once this is done, you can SSH to ACI with,

ssh aci

Password-less SSH

You can setup public key authentication in order to avoid having to input your password all the time you log onto ACI. 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 ACI 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 ACI, add the following lines to ~/.bashrc,

# Load modules
module load intel/16.0.3
module load mkl/11.3.3
module load impi/5.1.3

# ISSM
export ISSM_DIR=<PATH_TO_ISSM>
source $ISSM_DIR/etc/environment.sh
alias cdi="cd ${ISSM_DIR}"

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 /gpfs/, not your home directory). Then, run,

source ~/.bashrc

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

Installing ISSM on ACI

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

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-development \
    --with-wrappers=no \
    --with-mpi-include="/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/include/" \
    --with-mpi-libflags="-L/opt/intel/compilers_and_libraries_2016.3.210/linux/mpi/intel64/lib/ -lmpicxx -lmpifort -lmpi -lmpigi -lifcore -lifport" \
    --with-mkl-libflags="-L/opt/intel/compilers_and_libraries_2016.3.210/linux/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core" \
    --with-petsc-dir="${ISSM_DIR}/externalpackages/petsc/install" \
    --with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install" \
    --with-metis-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 ACI 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/aci_settings.m, which might include,

cluster.name='aci';
cluster.login='eps5217';
cluster.queue='brp106_a_g_sc_default';
cluster.codepath='<PATH_TO_ISSM_ON_CLUSTER>/bin/';
cluster.executionpath='/gpfs/scratch/<USERNAME>/ISSM/execution/';
cluster.nodes=1;
cluster.ppn=20;
cluster.time=3*60;

Cluster class aci.py still needs to be developed.

replacing <USERNAME> with your ACI username and entering your code path and execution path (should be in scratch space, for example, /gpfs/scratch/<USERNAME>/ISSM/execution). These settings will be picked up automatically when you run md.cluster=aci().

Make sure your module list includes pkgsrc, comp-intel/2016.2.181, and mpi-sgi/mpt.

Running Jobs on ACI

On ACI, the more nodes and the longer the requested time, the more you will have to wait in the queue, so choose your settings wisely. For example, use,

md.cluster=aci('numnodes',8,'time',30,'processor','wes','queue','devel');
md.cluster.time=10;

Cluster class aci.py still needs to be developed.

to have a maximum job time of 10 minutes and 8 westmere nodes. 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 node you are using on ACI, run,

qstat -u <USERNAME>

You can delete a job manually with,

qdel <JOBID>

where <JOBID> is the ID of the job indicated in the MATLAB session. MATLAB also indicates the directory where you job is running, which contains the files <JOBNAME>.outlog and <JOBNAME>.errlog. The outlog file contains any information that would appear if you were running your job on your local machine and the errlog file contains any information pertaining to errors that the job encounters.

To watch your current jobs,

watch qstat  -a

If you want to load results from the cluster manually (for example if you have an error due to a connection interruption), inspect your MATLAB session, using $ISSM_DIR/execution/<LAUNCHSTRING>/<JOBNAME>.lock to populate and run,

md=loadresultsfromcluster(md,'<LAUNCHSTRING>','<JOBNAME>');