2 min read

Notes on GPSC Accounts


Shared Services Canada maintains the General Purpose Science Cluster (GPSC) high-performance computing cluster. These are my notes for accessing it from the AAFC network.


Multi-hop access from inside your department network requires logging into your ‘local’ cluster (<LOCAL HOSTNAME>), and then logging into GPSC (<GPSC HOSTNAME>) from there. You’ll need to get the actual hostnames for these from the cluster administrator.

  1. ssh into your local cluster using your GPSC username (not the same as your AAFC network user ID) and password.

  2. from your local cluster, ssh into the GPSC with the same credentials.


Use an RSA key for password-free logins, as I described here notes on Digital Ocean droplets.

I’ll never rember the hostnames, so I’ve added the following to ~/.ssh/config on my laptop:

Host gpsc
    Hostname <GPSC HOSTNAME>
    User <USERNAME>

Host aafc-gpsc
    Hostname <LOCAL HOSTNAME>
    User <USERNAME>

I also added first stanza to ~/.ssh/config on <LOCAL HOSTNAME>.

Together with the RSA key, this allows me to sign in to <LOCAL HOSTNAME> via ssh aafc-gpsc, and from there into the GPSC via ssh gpsc, without remembering the actual hostnames or password.

Emacs Config

For Emacs users, we can make this even easier by configuring TRAMP to use multi-hops. Add the following to your config (usually .emacs, or .emacs.d/init.el; TRAMP is installed with Emacs, no additional packages required):

(add-to-list 'tramp-default-proxies-alist 
               "/ssh:USERNAME@<LOCAL HOSTNAME>:"))

That allows me to open files on GPSC in my local Emacs via: C-x C-f /ssh:gpsc:FILENAME.

Slurm Scripts

The template for submitting jobs is:

#!/bin/bash -l
#SBATCH --job-name=JOB_NAME
#SBATCH --open-mode=append
#SBATCH --partition=standard
#SBATCH --time=1:00:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=1G

echo hello
sleep 45
echo goodbye

Note that you’ll need to include your actual <SUBMIT_COMMENT> and <ACCOUNT_NAME> as provided by the administrators.

With the above template saved to a file named slurm_script.sh, you can run it from the cluster via sbatch slurm_script.sh.

Be sure to update the job-name option to something informative, and of course increase the time, ntasks, cpus-per-task and mem-per-cpu to something appropriate for your job.