This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
guides:slurm:array-job [05.03.2020 14:10] Juha Kekäläinen created |
guides:slurm:array-job [18.10.2024 14:09] (current) Administrator |
||
---|---|---|---|
Line 1: | Line 1: | ||
# SLURM Job Array | # SLURM Job Array | ||
- | [SLURM job array](https:// | + | [SLURM job array](https:// |
+ | Below we have an example of [fastqc](https:// | ||
+ | Each job has 5 minutes of runtime and the job has 500 MB of RAM reserved. | ||
+ | |||
+ | ``` | ||
+ | #!/bin/bash | ||
+ | #SBATCH --job-name fastqc | ||
+ | #SBATCH --ntasks 1 # Number of task | ||
+ | #SBATCH --time 5 # Runtime in minutes. | ||
+ | #SBATCH --mem=500 | ||
+ | #SBATCH --partition small # Partition to submit | ||
+ | #SBATCH --output fastq_%A_%a.out.out | ||
+ | #SBATCH --error fastqc_%A_%a.err | ||
+ | #SBATCH --mail-user username@uef.fi | ||
+ | #SBATCH --mail-type ALL # ALL will alert you of job beginning, completion, failure etc | ||
+ | #SBATCH --array=1-100%3 | ||
+ | |||
+ | # Make sure that the results directory exists | ||
+ | mkdir -p ./results/ | ||
+ | |||
+ | # Load required modules | ||
+ | module load fastqc/ | ||
+ | |||
+ | # Search all the fastq files from the " | ||
+ | file=$(ls ./ | ||
+ | |||
+ | # Run quality analysis on each fastq file | ||
+ | fastqc -o ./results/ $file | ||
+ | ``` | ||
+ | |||
+ | Submit the job to computing queue with **sbatch** command. |