Frontera (TACC)
Table of Contents
- Getting an Account
- SSH Configuration
- Environment
- Installing ISSM on Frontera
- Installing ISSM with CoDiPack (AD) on Frontera
- Installing ISSM with MATLAB on Frontera
- Cluster Class Settings
- Running Jobs on Frontera
- Using DeepXDE
Getting an Account
Coming soon…
SSH Configuration
Add the following lines to ~/.ssh/config on your local machine,
Host frontera.tacc.utexas.edu frontera
HostName frontera.tacc.utexas.edu
User <USERNAME>
replacing <USERNAME> with your TACC username. Then, you can ssh to Frontera with,
ssh frontera
Make sure to also include the following in your ~/.ssh/config,
Host *
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist yes
which will allow you to use an existing SSH connection for multiple sessions. As long as you have an active connection, SSH will not need a password or token to create a new session. You may need to run mkdir ~/.ssh/sockets if this directory does not exist.
Environment
On Frontera, add the following lines to ~/.bashrc or ~/.bash_login:
export ISSM_DIR=<PATH_TO_ISSM>
source $ISSM_DIR/etc/environment.sh
module load intel/23.1.0
module load impi/21.9.0
module load petsc/3.21
replacing <PATH_TO_ISSM> with the path to the directory that you cloned the ISSM source code repository to. Then, run,
source ~/.bashrc
or
source ~/.bash_login
(depending on which shell profile file you modified) or log out and log back in to apply this change.
Installing ISSM on Frontera
Frontera will only be used to run the code: you will use your local machine for pre- and post-processing; you will never use Frontera’ MATLAB. You can check out ISSM and install the following packages:
- m1qn3
Follow the detailed instructions for compiling ISSM on Linux, and use the following configuration script (adapt to your needs),
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export CXXFLAGS="-g -O3 -std=c++11 -fp-model=precise"
./configure \
--prefix="${ISSM_DIR}" \
--enable-debugging \
--enable-development \
--with-wrappers=no \
--with-mpi-include="${TACC_IMPI_INC}" \
--with-mpi-libflags="-L${TACC_IMPI_LIB}/release_mt -lmpi -lmpifort -lifcore" \
--with-mkl-libflags="-L${TACC_MKL_LIB} -qmkl=parallel" \
--with-petsc-dir="${TACC_PETSC_DIR}" \
--with-petsc-arch="${ISSM_ARCH}" \
--with-metis-dir="${TACC_PETSC_DIR}" \
--with-mumps-dir="${TACC_PETSC_DIR}" \
--with-scalapack-dir="${TACC_PETSC_DIR}" \
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install"
Installing ISSM with CoDiPack (AD) on Frontera
You will need to install the following additional packages in order:
- codipack
- medipack
Use the following configuration script (adapt to your needs, making sure to not include --with-petsc-dir),
export CC=mpicc
export CXX=mpicxx
export FC=mpifort
export CXXFLAGS="-g -O3 -std=c++11 -fp-model=precise"
./configure \
--prefix="${ISSM_DIR}" \
--enable-debugging \
--enable-development \
--enable-tape-alloc \
--with-wrappers=no \
--without-kriging \
--without-kml \
--without-Love \
--without-Sealevelchange \
--with-mpi-include="${TACC_IMPI_INC}" \
--with-mpi-libflags="-L${TACC_IMPI_LIB}/release_mt -lmpi -lmpifort -lifcore" \
--with-mkl-libflags="-L${TACC_MKL_LIB} -qmkl=parallel -lptscotchparmetisv3 -lptscotch -lptscotcherr -lscotch -lscotcherr -lptesmumps -lscalapack" \
--with-metis-dir="${TACC_PETSC_DIR}" \
--with-mumps-dir="${TACC_PETSC_DIR}" \
--with-parmetis-dir="${TACC_PETSC_DIR}" \
--with-codipack-dir="${ISSM_DIR}/externalpackages/codipack/install" \
--with-medipack-dir="${ISSM_DIR}/externalpackages/medipack/install" \
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install"
Installing ISSM with MATLAB on Frontera
If you want to use Frontera to process the model after running it and keep the data on Frontera, you can install ISSM with a MATLAB interface. Before doing the following steps, you should check with TACC to make sure you have the access to MATLAB on Frontera.
You will need to use interactive mode to compile ISSM with MATLAB.
Clone the ISSM source code repository on GitHub and install the following packages:
- triangle
- m1qn3
Follow the detailed instructions for compiling ISSM on Linux, and use the following configuration script (adapt to your needs),
./configure \
--prefix="${ISSM_DIR}" \
--enable-debugging \
--enable-development \
--with-matlab-dir="/home1/apps/matlab/2023a/" \
--with-mpi-include="${TACC_IMPI_INC}" \
--with-mpi-libflags="-L${TACC_IMPI_LIB}/release_mt -lmpi" \
--with-mkl-libflags="-L${TACC_MKL_LIB} -mkl=parallel" \
--with-petsc-dir="${TACC_PETSC_DIR}" \
--with-petsc-arch="${ISSM_ARCH}" \
--with-metis-dir="${TACC_PETSC_DIR}/${PETSC_ARCH}" \
--with-mumps-dir="${TACC_PETSC_DIR}/${PETSC_ARCH}" \
--with-scalapack-dir="${TACC_PETSC_DIR}/${PETSC_ARCH}" \
--with-m1qn3-dir="${ISSM_DIR}/externalpackages/m1qn3/install" \
--with-triangle-dir="${ISSM_DIR}/externalpackages/triangle/install"
You will need to compile ISSM serially with make install.
Remember, Frontera is a remote cluster, use matlab -nodesktop -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath; when running MATLAB.
Before downloading the .outbin, you will need to set
md.cluster.name = oshostname()
md.miscellaneous.name = '<OUTBIN_FILENAME>'
then run,
md=loadresultsfromcluster(md, 'runtimename', '<EXECUTION_DIR>')
to load the results.
Cluster Class Settings
In order to connect to Frontera 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/frontera_settings.m, which might include,
cluster.login='<USERNAME>';
cluster.codepath='<PATH_TO_ISSM_ON_CLUSTER>/bin/';
cluster.executionpath='<PATH_TO_ISSM_ON_CLUSTER>/execution/';
Cluster class frontera.py still needs to be developed.
replacing <USERNAME> with your TACC username and entering your code path and execution path. These settings will be picked up automatically you run md.cluster=frontera().
Note that the `executionpath’ creates temporary binary files that can be removed once the job is complete. For this reason, you can set the path to be somewhere on the $SCRATCH filesystem, which provides unlimited temporary storage on Frontera.
Running Jobs on Frontera
On Frontera, each node has 56 cores and you can use any multiple of 56 for the total number of processors. he more nodes and the longer the requested time, the more you will have to wait in the queue, so choose your settings wisely.
The most commonly used queues are normal, development, and flex. More details on Frontera’ queues.
Note
In order to use
normalqueue, you will have to request at least3nodes.
For example, use,
md.cluster=frontera('numnodes',3);
Cluster class frontera.py still needs to be developed.
Before you run your job, make sure to have an active open SSH connection to Frontera so that you don’t need to enter your password.
To manually submit a job on Frontera, run,
sbatch job.queue
If you want to check the status of your job and the node you are using on Frontera, run,
showq -u <USERNAME>
replacing <USERNAME> with your TACC username.
You can delete a job manually with,
scancel <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.
Using DeepXDE
Frontera supports containers with Apptainer. A precompiled DeepXDE image with Tensorflow v.2 backend is available at docker://chenggongdartmouth/deepxde:v1.2 or at docker://mkrish234/deepxde:v0.3`.
You might need to build an apptainer image from the Docker image in Frontera. First find the path to your login node on Frontera with pwd. Then, allocate a compute node with,
idev -m 60 -p rtx -N 1 -n 8
You will need to load the apptainer module with,
module load tacc-apptainer
Then, build the apptainer image from the Docker image with,
apptainer build <PATH_TO_LOGIN_NODE>/deepxde docker://<DOCKER_IMAGE>
The following is an example of using DeepXDE to run a script./test.py on Frontera (with GPU node),
#!/bin/bash
#SBATCH -J job_name # job name
#SBATCH -o output.%j # output file named, output.jobID
#SBATCH -e error.%j # error file named, error.jobID
#SBATCH -p rtx # queue name
#SBATCH -N 1 # number of nodes requested
#SBATCH --ntasks-per-node 4 # tasks per node
#SBATCH -t 10:00:00 # time, hh:mm:ss
#SBATCH --mail-user=<EMAIL_ADDRESS>
#SBATCH --mail-type=all
module load tacc-apptainer
stdbuf -i0 -o0 -e0 apptainer exec --nv --bind ~/:/mnt ~/deepxde python -u /mnt/test.py