This repository has been added to this one: https://github.com/fasrc/User_Codes so this original will no longer be developed.
- Bash
- Julia
- Matlab
- Mathematica
- Python 2
- Python 3
- R
- SAS
- Stata
Scripts for submitting jobs to slurm can specify slurm settings starting at the beginning of the script.
- They must come after the initial shebang (!#) line if there is one.
- The lines should begin with #SBATCH.
- #SBATCH settings should come before any comments or they may not work.
- %x is the name of the file used to submit the job
- %j is the job id number
- when running a job array, %A is the overall job id, %a is the array index number
Typical #SBATCH lines include:
#SBATCH -n 1 # Number of cores requested; default: 1
#SBATCH -N 1 # Ensure that all cores are on one machine; default: unset- causes poor performance
#SBATCH -t 15 # Runtime in minutes; job killed after this amount of time; default: 10
#SBATCH -p serial_requeue # Partition to submit to; default: serial_requeue
#SBATCH --mem=4000 # 4GB; Memory shared across all cores in MB (see also –mem-per-cpu)
#SBATCH --open-mode=append; default: overwrite
#SBATCH -o %x_%j.out # Standard out goes to this file; default: slurm-JOBID.out
#SBATCH -e %x_%j.err # Standard err goes to this file; default: slurm-JOBID.err