Listing 1. Top-level Slurm/sbatch script. This scripts specifies the
request for CPUs, memory and time on the cluster and sets up the
program that will be run on each processing node.

#!/bin/bash
# sbatch options
#SBATCH --job-name=RUN_CALFLAG
#SBATCH --partition=batch
#SBATCH --qos=short
#SBATCH --ntasks=20
#SBATCH --mem-per-cpu=18000
#SBATCH --cpus-per-task 1
#SBATCH --time=00:20:00

# matlab options
MATLAB=/usr/bin/matlab
MATOPT=' -nojvm -nodisplay -nosplash'

srun --output=~/run_calflag.log $MATLAB $MATOPT -r "run_calflag; exit;"

