From 7dd70a1c66e30d00c999011d7a94cbfd074f32a6 Mon Sep 17 00:00:00 2001
From: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Date: Fri, 27 Sep 2024 10:45:26 +0200
Subject: [PATCH] Fix some minor issues - Script should be /bin/bash in case
 one wants it to be able to use the module system inside - Must create the
 directory elbencho doesn't - One should wait for the background processes
 before exiting the script

---
 storage-benchmark.sbatch | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/storage-benchmark.sbatch b/storage-benchmark.sbatch
index 15c5525..35ad96f 100644
--- a/storage-benchmark.sbatch
+++ b/storage-benchmark.sbatch
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #SBATCH -J arrh-storage-benchmark
 
 usage() {
@@ -34,6 +34,8 @@ if [ -z "$DIRECTORY" ]
 then usage
 fi
 
+mkdir -p $DIRECTORY
+
 NNODES=$SLURM_NNODES
 THREADS=$SLURM_CPUS_PER_TASK
 HOSTS=$(scontrol show hostnames | tr '\n' ',')
@@ -81,3 +83,5 @@ echo
 info "Benchmark done"
 
 elbencho --hosts "$HOSTS" --quit
+
+wait
-- 
GitLab