diff --git a/exercises/UNIX_HPC_cheat_sheet.md b/exercises/UNIX_HPC_cheat_sheet.md index 4ef39462109e3116e02e42057cbca4033b158255..1cf526fa5b852849fb9f3952fceb3e765a812706 100644 --- a/exercises/UNIX_HPC_cheat_sheet.md +++ b/exercises/UNIX_HPC_cheat_sheet.md @@ -141,14 +141,30 @@ command1 command2 srun my_software_container.sif my_software [parameters] - - ``` + Submit script as job to the computing nodes: ```bash sbatch myjob.sh ``` +Job arrays for applying the same processing routine with changed parameters for each instance (e.g., input files) + +```bash +#!/usr/bin/env bash +#SBATCH --cpus-per-task=[number] +#SBATCH --mem=[memory] +#SBATCH --time=[hr:min:sec] +#SBATCH --job-name=[name] +#SBATCH --output=[name]_%j.out +#SBATCH --error=[name]_%j.err +#SBATCH --array=1-16 # specify size of array + +srun your_application $SLURM_ARRAY_TASK_ID + +``` + + ## Managing jobs ```bash