Totten (hosted by EAPS)
Table of Contents
- SSH Configuration
- Environment
- Installing ISSM on Totten
- Installing ISSM with CoDiPack (AD)
- Running a Jupyter Notebook on Totten
Important
Totten has several drives. Your home directory is on a small drive (6 TB), so make sure to work on the big RAID system
/totten_1, which has 83 TB. You will probably need to create a directory with,cd /totten_1 mkdir <USERNAME>replacing
<USERNAME>with your Totten username. This is were you should install ISSM and create your “projects” directory.
SSH Configuration
Add the following lines to ~/.ssh/config on your local machine:
Host totten totten.dartmouth.edu
HostName totten.dartmouth.edu
User <USERNAME>
replacing <USERNAME> with your Totten username. Then, you can ssh to Totten with,
ssh totten
Password-less SSH
You can setup public key authentication in order to avoid having to input your password all the time you log onto Totten. 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 Totten 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 Totten, add the following lines to ~/.bashrc:
export ISSM_DIR=<PATH_TO_ISSM>
source $ISSM_DIR/etc/environment.sh
# MATLAB alias
alias ma='LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6:/usr/lib/x86_64-linux-gnu/libgfortran.so.5:$ISSM_DIR/externalpackages/petsc/install/lib/libmpi.so:$ISSM_DIR/externalpackages/petsc/install/lib/libmpifort.so:$ISSM_DIR/externalpackages/petsc/install/lib/libmpifort.so.12 /usr/local/MATLAB/R2026b/bin/matlab -nodesktop -nosplash -r "addpath $ISSM_DIR/src/m/dev; devpath;"'
replacing <PATH_TO_ISSM> with the path to the directory that you cloned the ISSM source code repository to. Feel free to remove anything that you may have by default in this file. Log out and log back in to apply this change.
Installing ISSM on Totten
You can follow the detailed instructions for compiling ISSM on Linux. You will need to install the following packages:
Clone the ISSM source code repository on GitHub and install the following packages:
- autotools
- petsc (use the latest available version)
- 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-development \
--enable-debugging \
--with-numthreads=32 \
--with-matlab-dir="/usr/local/MATLAB/R2026b" \
--with-mpi-include="$ISSM_DIR/externalpackages/petsc/install/include" \
--with-mpi-libflags="-L$ISSM_DIR/externalpackages/petsc/install/lib -lmpi -lmpifort"\
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
--with-triangle-dir="$ISSM_DIR/externalpackages/triangle/install" \
--with-metis-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-blas-lapack-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-scalapack-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-mumps-dir="$ISSM_DIR/externalpackages/petsc/install/" \
--with-parmetis-dir="$ISSM_DIR/externalpackages/petsc/install/"
Installing ISSM with CoDiPack (AD)
You will need to install the following additional packages:
- cmake
- codipack
- medipack
- adjointpetsc
Use the following configuration script (adapt to your needs):
export CXXFLAGS="-g -O3 -fPIC -std=c++11 -DCODI_ForcedInlines"
./configure \
--prefix=$ISSM_DIR\
--without-Love \
--with-matlab-dir="/usr/local/MATLAB/R2021b" \
--with-mpi-include=$ISSM_DIR/externalpackages/petsc/install/include \
--with-mpi-libflags="-L$ISSM_DIR/externalpackages/petsc/install/lib -lmpi -lmpicxx -lmpifort"\
--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-adjointpetsc-dir=$ISSM_DIR/externalpackages/adjointpetsc/install \
--with-metis-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-parmetis-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \
--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
--with-codipack-dir="$ISSM_DIR/externalpackages/codipack/install" \
--with-medipack-dir="$ISSM_DIR/externalpackages/medipack/install" \
--with-fortran-lib="-L/usr/lib/x86_64-linux-gnu -lgfortran" \
--with-numthreads=32 \
--enable-tape-alloc \
--enable-development \
--enable-debugging
Running a Jupyter Notebook on Totten
You can run a Jupyter Notebook on Totten with,
jupyter notebook --no-browser --port=8080
Keep this terminal alive, where you will need the token to access the Notebook.
To access your Notebook via web browser on your local machine, you need to link Totten’ port 8080 to your localhost:8080 by running the following on your local machine:
ssh -L 8080:localhost:8080 yourname@totten.dartmouth.edu
Then, open a web browser on your local machine and access the Jupyter Notebook from http://localhost:8080/. You might be asked to enter the token, which you can find in the terminal you kept alive for Jupyter Notebook.