• on many clusters just to submit jobs; need specific submit-script (examples provided in cluster documentation)
  • on odyssey also used for interactive jobs (so essentially everything!)
  • be aware which queues are available!
  • know what your jobscript-settings do

Examples for slurm on odyssey (see https://www.rc.fas.harvard.edu/resources/running-jobs/):

Interactive session:

srun -p test –pty –mem 500 -t 0-08:00 /bin/bash

… you might want to define an alias for this 🙂

submit job-script (called job.slurm in this case)

sbatch job.slurm

example job-script:

#!/bin/bash
#SBATCH -n 64
#SBATCH –ntasks-per-node=32
#SBATCH -p shared
#SBATCH -o ./OUTPUT.%j.out
#SBATCH -e ./ERROR.%j.err
#SBATCH –exclusive
#SBATCH –job-name=”testsim_001″
#SBATCH —mail-user=my.email@gmail.com
#SBATCH –mail-type=BEGIN
#SBATCH –mail-type=END
#SBATCH –mail-type=FAIL
#SBATCH –mem-per-cpu=3600
#SBATCH -t 2-00:00

source new-modules.sh
module load gcc/7.1.0-fasrc01
module load openmpi/2.0.2-fasrc01
module load gsl
module load hdf5
module load fftw

mpiexec -np $SLURM_NTASKS ./Arepo ./param.txt