Difference between revisions of "Annotated SLURM Script"
Line 17: | Line 17: | ||
:Your email address to use for all batch system communications | :Your email address to use for all batch system communications | ||
<pre> | <pre> | ||
− | + | #SBATCH --mail-user=<EMAIL> | |
− | + | #SBATCH --mail-user=<EMAIL-ONE>,<EMAIL-TWO> | |
</pre> | </pre> | ||
;What emails to send | ;What emails to send |
Revision as of 14:13, 27 October 2023
This is a walk-through for a basic SLURM scheduler job script for a common case of a multi-threaded analysys. If the program you run is single-threaded (can use only one CPU core) then only use '--ntasks=1' line for the cpu request instead of all three listed lines. Annotations are marked with bullet points. You can click on the link below to download the raw job script file without the annotation. Values in brackets are placeholders. You need to replace them with your own values. E.g. Change '<job name>' to something like 'blast_proj22'. We will write additional documentation on more complex job layouts for MPI jobs and other situations when a simple number of processor cores is not sufficient.
#!/bin/bash
#SBATCH --job-name=<JOBNAME>
#SBATCH --mail-user=<EMAIL> #SBATCH --mail-user=<EMAIL-ONE>,<EMAIL-TWO>
#SBATCH --mail-type=FAIL,END
#SBATCH --output <my_job-%j.out>
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4 |
#SBATCH --mem=4gb
#SBATCH --time=72:00:00
#SBATCH --account=<GROUP>
#SBATCH --array=<BEGIN-END>
date;hostname;pwd Below is the shell script part - the commands you will run to analyze your data. The following is an example.
module load ncbi_blast
blastn -db nt -query input.fa -outfmt 6 -out results.xml --num_threads 4 date |