ssh configuration
You can add the following lines to ~/.ssh/config
on your local machine:
Host gscc login.gscc.umt.edu HostName login.gscc.umt.edu User USERNAME HostKeyAlias login.gscc.umt.edu HostbasedAuthentication no
and replace USERNAME
by your gscc username.
Once this is done, you can ssh gscc by simply doing:
ssh gscc
Password-less ssh
Once you have the account, you can setup a public key authentification in order to avoid having to input your password for each run. You need to have a SSH public/private key pair. If you already have one, you can skip their creation described below. If you do not, you can create a SSH public/private key pair by typing the following command and following the prompts (no passphrase necessary):
$your_localhost% ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users/username/.ssh/id_rsa):RETURN Enter passphrase (empty for no passphrase):RETURN Enter same passphrase again:RETURN 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 were created: your private key /Users/username/.ssh/id_rsa
, and the public key /Users/username/.ssh/id_rsa.pub
. The private key is read-only and only for you, it is used to decrypt all correspondence encrypted with the public key. The contents of the public key need to be copied to ~/.ssh/authorized_keys
on your gscc account:
$your_localhost%scp ~/.ssh/id_rsa.pub username@your_remotehost:~
Now on gscc, copy the content of id_rsa.pub:
$your_remotehost%cat ~/id_rsa.pub >> ~/.ssh/authorized_keys $your_remotehost%rm ~/id_rsa.pub
Install
Install Anaconda
We will install ISSM within an Anaconda environment on GSCC. The Anaconda environment will act as an isolated compile environment. To install Anaconda3 run
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh chmod 755 Anaconda3-2020.11-Linux-x86_64.sh ./Anaconda3-2020.11-Linux-x86_64.sh
Answer no at the final prompt. Activate Anaconda by typing.
source ~/anaconda3/bin/activate
Setup Anaconda3 environment
Now we'll set up an Anaconda environment called issm. Create a file on GSCC called environment.yml. Copy the following contents:
name: issm channels: - conda-forge dependencies: - python=3.7 - gcc_linux-64 - gxx_linux-64 - fortran-compiler - petsc=3.12 - numpy - scipy - matplotlib - cmake - libtool - lapack - netcdf4 - mpi - libtool - automake - pip
With Anacodna activated, run the following to create and activate the environment.
conda env create -f environment.yml conda activate issm
Install ISSM
Copy ISSM files on your home directory on GSCC, add the following lines to your ~/.bashrc
on GSCC:
module unload rocks-openmpi export ISSM_DIR=/home/jd231341e/trunk-jpl/ export CONDA_DIR=/home/jd231341e/anaconda3/envs/test/ source $ISSM_DIR/etc/environment.sh source ~/anaconda3/bin/activate conda activate issm
This will automatically activate the Anaconda environment when you login and disable the default MPI in favor of Anaconda's installed MPI version. Most of the dependencies can be installed through Conda but m1qn3 needs to be installed manually
source $ISSM_DIR/etc/environment.sh cd $ISSM_DIR/externalpackages/m1qn3 ./install.sh
Now we can configure and install ISSM via:
cd $ISSM_DIR source $ISSM_DIR/etc/environment.sh autoreconf -ivf ./configure \ --prefix="$ISSM_DIR" \ --disable-static \ --enable-development \ --with-numthreads=8 \ --with-python-version=3.7 \ --with-python-dir="$CONDA_DIR" \ --with-python-numpy-dir="$CONDA_DIR/lib/python3.7/site-packages/numpy/core/include/numpy" \ --with-fortran-lib="-L$CONDA_DIR/lib/gcc/x86_64-conda-linux-gnu/7.5.0/ -lgfortran" \ --with-mpi-include="$CONDA_DIR/lib/include" \ --with-mpi-libflags="-L$CONDA_DIR/lib" \ --with-metis-dir="$CONDA_DIR/lib" \ --with-scalapack-dir="$CONDA_DIR/lib" \ --with-mumps-dir="$CONDA_DIR/lib" \ --with-petsc-dir="$CONDA_DIR" \ --with-m1qn3-dir="$ISSM_DIR/externalpackages/m1qn3/install" make --jobs=8 make install
Example Run on GSCC
If you have ISSM installed on your own machine with the Matlab interface and the GSCC cluster file, you can launch runs using the gscc cluster. For example:
md.cluster=gscc(); md.cluster.np = 2; md.cluster.time = 60*60*10; md=solve(md,'Transient'); md=loadresultsfromcluster(md,'LAUNCHSTRING','JOBNAME');
` To troubleshoot, note that logfiles for submitted runs will appear in trunk-jpl/execution/ on GSCC. The input file, and queue file for SLURM will appear here.