Difference between revisions of "Annotated SLURM Script"
Line 2: | Line 2: | ||
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. | 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. | ||
− | {|cellspacing= | + | {|cellspacing=30 |
|-style="vertical-align:top;" | |-style="vertical-align:top;" | ||
|style="width: 50%"| | |style="width: 50%"| |
Revision as of 21:44, 11 November 2022
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 |