Tongji University’ HPC
Table of Contents
- Overview
- Getting an account
- SSH configuration
- AMD Nodes (recommended)
- Installing PETSc
- Installing ISSM on AMD nodes
- Alternative Installation: Intel Nodes
- Cluster Class Settings
- Storage
- Running Jobs on Tongji University’ HPC
- Monitoring and Cancelling Jobs
- Loading Results Manually
- Slurm
Overview
Tongji University’ Scientific Computing Platform can be used as a remote execution cluster for ISSM. The recommended workflow is:
- prepare and inspect models with a local MATLAB or Python installation of ISSM;
- submit simulations to a binary-only ISSM installation on Tongji University’ HPC; and
- retrieve the completed results for post-processing on the local workstation.
Recommended platform
Use the AMD CPU nodes for the standard Tongji University’ HPC installation. The main instructions below therefore describe the AMD environment and AMD
configure.sh.Intel CPU nodes remain supported as an alternative. Their module environment and
configure.share provided in a separate section near the end of the installation instructions.
If you intend to use both CPU architectures, keep completely separate ISSM installations,
/path/to/ISSM-amd
/path/to/ISSM-intel
Do not share the PETSc installation or compiled ISSM binaries between the AMD and Intel checkouts.
Getting an account
See the Tongji University Scientific Computing Service Platform documentation (use in-browser translation) for account application and access information.
SSH configuration
Follow Tongji University Scientific Computing Service Platform account and SSH instructions (use in-browser translation). Password-less SSH is recommended for remote job submission from ISSM.
You may also define an SSH alias in ~/.ssh/config on your local workstation,
Host tjhpc
HostName <LOGIN_HOST>
User <USERNAME>
replacing <HOSTNAME> with the Tongji University’ HPC machine you will be connecting to and
ssh tjhpc
AMD Nodes (recommended)
Add the following lines to ~/.bashrc on Tongji University’ HPC, or place them near the beginning of the AMD Slurm job script,
# Load modules
module purge
module load gcc/13.2.0
module load cmake/3.31.6
# ISSM
export ISSM_DIR=/path/to/ISSM-amd
export PETSC_PREFIX="${ISSM_DIR}/externalpackages/petsc/install"
source "${ISSM_DIR}/etc/environment.sh"
# Use the MPICH installation built together with PETSc.
export PATH="${PETSC_PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${PETSC_PREFIX}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
Replace /path/to/ISSM-amd with the absolute path to the AMD ISSM checkout, then reload the environment with,
source ~/.bashrc
MPI requirement
Do not load the cluster’s
openmpi/5.0.6module for this installation. PETSc is compiled with its downloaded MPICH 4.3.0. Mixing Open MPI with PETSc’ MPICH may cause link-time or runtime errors.
Check the active MPI wrappers,
which mpicc
which mpicxx
which mpifort
which mpiexec
mpicc -show
After PETSc has been installed, also check its runtime dependencies,
ldd "${PETSC_PREFIX}/lib/libpetsc.so.3.23" \
| grep -E "libmpi|libmpifort"
The MPI wrappers and shared libraries should resolve inside,
${ISSM_DIR}/externalpackages/petsc/install/
Installing PETSc
This configuration uses PETSc 3.23.6 and the script,
externalpackages/petsc/install-3.23-tjhpc.sh
Required Downloads
Because some external downloads may be inaccessible from Tongji University’ HPC due to bandwidth restrictions, download the following archives manually and place them in,
${ISSM_DIR}/externalpackages/petsc/downloads/
Required packages:
- petsc-pkg-fblaslapack-e8a03f57d64c.tar.gz
- petsc-pkg-metis-69fb26dd0428.tar.gz
- mpich-4.3.0.tar.gz
- MUMPS_5.7.3.tar.gz
- petsc-pkg-parmetis-f5e3aab04fd5.tar.gz
- scalapack-0e8767285b7a201c7b1ff34d2c2bb009534145df.tar.gz
- zlib-1.3.1.tar.gz
Download Mirrors
The following upstream locations can be used to obtain the required packages. When the downloaded archive has a different name, save or rename it to the exact filename expected by install-3.23-tjhpc.sh.
MPICH
Expected filename: mpich-4.3.0.tar.gz
fblaslapack
Expected filename: petsc-pkg-fblaslapack-e8a03f57d64c.tar.gz
- Repository:
git clone https://bitbucket.org/petsc/pkg-fblaslapack - Bitbucket release archive
For example,
curl -L \
"https://bitbucket.org/petsc/pkg-fblaslapack/get/v3.4.2-p3.tar.gz" \
-o petsc-pkg-fblaslapack-e8a03f57d64c.tar.gz
zlib
Expected filename: zlib-1.3.1.tar.gz
METIS
Expected filename: petsc-pkg-metis-69fb26dd0428.tar.gz
- Repository:
git clone https://bitbucket.org/petsc/pkg-metis.git - Bitbucket release archive
For example,
curl -L \
"https://bitbucket.org/petsc/pkg-metis/get/v5.1.0-p12.tar.gz" \
-o petsc-pkg-metis-69fb26dd0428.tar.gz
ParMETIS
Expected filename: petsc-pkg-parmetis-f5e3aab04fd5.tar.gz
- Repository:
git clone https://bitbucket.org/petsc/pkg-parmetis.git - Bitbucket release archive
For example,
curl -L \
"https://bitbucket.org/petsc/pkg-parmetis/get/v4.0.3-p9.tar.gz" \
-o petsc-pkg-parmetis-f5e3aab04fd5.tar.gz
MUMPS
Expected filename: MUMPS_5.7.3.tar.gz
ScaLAPACK
Expected filename: scalapack-0e8767285b7a201c7b1ff34d2c2bb009534145df.tar.gz
- Repository:
git clone https://github.com/Reference-ScaLAPACK/scalapack - GitHub commit archive
Downloading Directly Into the PETSc Downloads Directory
Create the directory first with,
mkdir -p "${ISSM_DIR}/externalpackages/petsc/downloads"
cd "${ISSM_DIR}/externalpackages/petsc/downloads"
You can then use any of the mirrors above with curl -L -o <EXPECTED_FILENAME> <URL>. For example,
curl -L \
"https://github.com/pmodels/mpich/releases/download/v4.3.0/mpich-4.3.0.tar.gz" \
-o mpich-4.3.0.tar.gz
curl -L \
"https://web.cels.anl.gov/projects/petsc/download/externalpackages/MUMPS_5.7.3.tar.gz" \
-o MUMPS_5.7.3.tar.gz
curl -L \
"https://github.com/Reference-ScaLAPACK/scalapack/archive/0e8767285b7a201c7b1ff34d2c2bb009534145df.tar.gz" \
-o scalapack-0e8767285b7a201c7b1ff34d2c2bb009534145df.tar.gz
The filenames must match exactly because they are passed directly to PETSc’ --download-* options.
PETSc Installation
Run the installation on an AMD compute node with,
cd "${ISSM_DIR}/externalpackages/petsc"
chmod +x install-3.23-tjhpc.sh
./install-3.23-tjhpc.sh
source "${ISSM_DIR}/etc/environment.sh"
The same PETSc procedure can also be used for the optional Intel installation, provided that it is run inside the separate Intel ISSM checkout.
Installing ISSM on AMD nodes
Generate the Autotools files,
cd "${ISSM_DIR}"
autoreconf -ivf
Create ${ISSM_DIR}/configure.sh with,
#!/bin/bash
set -eu
PETSC_PREFIX="${ISSM_DIR}/externalpackages/petsc/install"
export CC="${PETSC_PREFIX}/bin/mpicc"
export CXX="${PETSC_PREFIX}/bin/mpicxx"
export FC="${PETSC_PREFIX}/bin/mpifort"
export CFLAGS="-g -O2"
export CXXFLAGS="-g -O2 -std=c++11"
export FCFLAGS="-g -O2"
export PATH="${PETSC_PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${PETSC_PREFIX}/lib:${LD_LIBRARY_PATH}"
export LDFLAGS="-Wl,-rpath,${PETSC_PREFIX}/lib"
./configure \
--prefix="${ISSM_DIR}" \
--enable-development \
--with-wrappers=no \
--with-mpi-include="${PETSC_PREFIX}/include" \
--with-mpi-libflags="-L${PETSC_PREFIX}/lib -lmpi -lmpifort" \
--with-petsc-dir="${PETSC_PREFIX}" \
--with-blas-lapack-dir="${PETSC_PREFIX}" \
--with-metis-dir="${PETSC_PREFIX}" \
--with-scalapack-dir="${PETSC_PREFIX}" \
--with-mumps-dir="${PETSC_PREFIX}"
Run the configuration and compilation on an AMD compute node,
chmod +x configure.sh
./configure.sh
make -j20
make install
Confirm that the executable was created and that PETSc’ MPICH is loaded,
ls -l "${ISSM_DIR}/bin/issm.exe"
ldd "${ISSM_DIR}/bin/issm.exe" \
| grep -E "libpetsc|libmpi|libmpifort|libstdc\+\+"
All MPI libraries should resolve from,
${ISSM_DIR}/externalpackages/petsc/install/lib/
MPI Runtime Errors
If ISSM reports an error such as
undefined symbol: MPI_Type_get_envelope_c, another MPI implementation is being loaded at runtime. Remove any Open MPI module and make sure${PETSC_PREFIX}/libappears before other MPI library directories inLD_LIBRARY_PATH.
Alternative Installation: Intel Nodes
The Intel installation is optional. Use a separate checkout, such as,
/path/to/ISSM-intel
Load the Intel environment,
module purge
module load intel/oneapi/24.0
module load gcc/13.2.0
module load cmake/3.31.6
export ISSM_DIR=/path/to/ISSM-intel
export PETSC_PREFIX="${ISSM_DIR}/externalpackages/petsc/install"
export MKL_LIBDIR="/share/apps/oneapi24.0/mkl/latest/lib/intel64"
source "${ISSM_DIR}/etc/environment.sh"
export PATH="${PETSC_PREFIX}/bin:${PATH}"
export LD_LIBRARY_PATH="${PETSC_PREFIX}/lib:${MKL_LIBDIR}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
Install PETSc using the same procedure described above, but from the Intel ISSM checkout. Then create ${ISSM_DIR}/configure.sh with,
#!/bin/bash
set -eu
PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/install"
MKL_LIBDIR="/share/apps/oneapi24.0/mkl/latest/lib/intel64"
export CC="${PETSC_DIR}/bin/mpicc"
export CXX="${PETSC_DIR}/bin/mpicxx"
export FC="${PETSC_DIR}/bin/mpifort"
export CFLAGS="-g -O2 -fPIC"
export CXXFLAGS="-g -O2 -fPIC -std=c++11"
export FCFLAGS="-g -O2 -fPIC"
export PATH="${PETSC_DIR}/bin:${PATH}"
export LD_LIBRARY_PATH="${PETSC_DIR}/lib:${MKL_LIBDIR}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
export LDFLAGS="-Wl,-rpath,${PETSC_DIR}/lib -Wl,-rpath,${MKL_LIBDIR}"
./configure \
--prefix="${ISSM_DIR}" \
--enable-development \
--with-wrappers=no \
--with-mpi-include="${PETSC_DIR}/include" \
--with-mpi-libflags="-L${PETSC_DIR}/lib -lmpi -lmpifort" \
--with-mkl-libflags="-L${MKL_LIBDIR} -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -lm -ldl" \
--with-petsc-dir="${PETSC_DIR}" \
--with-metis-dir="${PETSC_DIR}" \
--with-parmetis-dir="${PETSC_DIR}" \
--with-scalapack-dir="${PETSC_DIR}" \
--with-mumps-dir="${PETSC_DIR}"
Build the Intel installation on an Intel compute node,
cd "${ISSM_DIR}"
autoreconf -ivf
chmod +x configure.sh
./configure.sh
make -j20
make install
Note
Do not use the Intel executable on AMD nodes or the AMD executable on Intel nodes.
Cluster Class Settings
In order to connect to Tongji University’ HPC 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/tjhpc_settings.m, which might include,
cluster.login = '<USERNAME>';
cluster.emailname = '<EMAIL>';
cluster.codepath = '<PATH_TO_ISSM_ON_CLUSTER>/bin/';
cluster.executionpath = '<PATH_TO_ISSM_ON_CLUSTER>/execution/';
Cluster class tjhpc.py still needs to be developed.
replacing <USERNAME> with your Tongji University’ HPC username, <EMAIL> with the email address that you would like to receive notifications to when your job has completed, and entering your code path and execution path. These settings will be picked up automatically when you run md.cluster = tjhpc().
If you receive any runtime errors, ensure the tjhpc cluster class is available at $ISSM_DIR/src/m/classes/clusters/tjhpc.m.
Set cluster.codepath and cluster.executionpath to the AMD installation unless you deliberately intend to run on Intel nodes.
Storage
Your home directory has approximately 1.5 TB of storage. The higher-performance location /ssdfs/datahome/<USERNAME> has approximately 500 GB. Consult Tongji University Scientific Computing Service Platform data transfer and storage documentation before selecting the execution directory.
For example,
mkdir -p /ssdfs/datahome/<USERNAME>/ISSM/execution
Running Jobs on Tongji University’ HPC
For example, to request one node and eight CPU cores from MATLAB, use,
md.cluster = tjhpc('numnodes', 1, 'cpuspernode', 8);
Cluster class tjhpc.py still needs to be developed.
Use the AMD partition or AMD resource type in the Tongji University’ HPC job configuration unless an Intel run is specifically required. Request only the resources needed by the model because larger node counts, longer wall times, and larger memory requests may increase queuing time.
See Tongji University Scientific Computing Service Platform documentation for resource configuration and job submission.
Monitoring and Cancelling Jobs
A comparison of PBS and Slurm commands is available in the Slurm Rosetta stone. An overview of Slurm on Tongji University’ HPC.
If you want to check the status of your job and the node you are using on Tongji University’ HPC, run,
squeue -u <USERNAME>
replacing <USERNAME> with your Tongji University’ HPC username.
Inspect a job,
scontrol show job <JOBID>
Cancel a job,
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.
Loading Results Manually
If a network interruption prevents MATLAB from retrieving completed results automatically, use,
md = loadresultsfromcluster(md, 'LAUNCHSTRING', 'JOBNAME');
When md.settings.waitonlock > 0, set the runtime name first,
md.private.runtimename = 'LAUNCHSTRING';
md = loadresultsfromcluster(md, 'LAUNCHSTRING', 'JOBNAME');
Slurm
A comparison of PBS and Slurm commands is available in the Slurm Rosetta stone. An overview of Slurm on Tongji University’ HPC is available here.