From 4ad1b707e40587a8be7caba9feedab5ba5e99d43 Mon Sep 17 00:00:00 2001
From: Fanny Wegner <fwegner@imm.uzh.ch>
Date: Thu, 30 Mar 2023 05:38:46 +0200
Subject: [PATCH] Update file UNIX_HPC_cheat_sheet.md

---
 exercises/UNIX_HPC_cheat_sheet.md | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/exercises/UNIX_HPC_cheat_sheet.md b/exercises/UNIX_HPC_cheat_sheet.md
index 4ef3946..1cf526f 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
-- 
GitLab