From 485d1a7aabfc8785ee3bbddc99296d1dd22dea43 Mon Sep 17 00:00:00 2001
From: Andreas Herten <a.herten@fz-juelich.de>
Date: Sun, 18 Jun 2023 14:06:20 +0200
Subject: [PATCH] Add aux env scripts

---
 env.sh     | 14 ++++++++++++++
 modules.sh |  9 +++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 env.sh
 create mode 100644 modules.sh

diff --git a/env.sh b/env.sh
new file mode 100644
index 0000000..934378e
--- /dev/null
+++ b/env.sh
@@ -0,0 +1,14 @@
+project="training2317"
+export JSCCOURSE_DIR_GROUP=/p/project/$project
+export JSCCOURSE_DIR_LOCAL=${JSCCOURSE_DIR_LOCAL_BASE:-$HOME}/MSA-Workshop
+
+jutil env activate -p $project -A $project
+
+export _JSC_MATERIAL_SYNC="rsync --archive --update --exclude='.*' --exclude='.*/' $JSCCOURSE_DIR_GROUP/material/ $JSCCOURSE_DIR_LOCAL"
+export _JSC_MATERIAL_SYNC_FORCE="rsync --archive --exclude='.*' --exclude='.*/' $JSCCOURSE_DIR_GROUP/material/ $JSCCOURSE_DIR_LOCAL"
+alias jsc-material-sync='bash -c "eval $_JSC_MATERIAL_SYNC"'
+alias jsc-material-sync-force='bash -c "eval $_JSC_MATERIAL_SYNC_FORCE"'
+
+export MPI_HOME=$EBROOTPSMPI
+
+source ${JSCCOURSE_DIR_GROUP}/modules.sh
\ No newline at end of file
diff --git a/modules.sh b/modules.sh
new file mode 100644
index 0000000..2e9d79a
--- /dev/null
+++ b/modules.sh
@@ -0,0 +1,9 @@
+if [[ "$SYSTEMNAME" == "juwelsbooster" || "$SYSTEMNAME" == "juwels" ]]; then
+	echo "Extending \$MODULEPATH with custom directory" >&2
+	module use /p/project/training2317/easybuild/${SYSTEMNAME}/modules/all/Compiler/mpi/GCC/11.3.0/
+	echo "Loading MSA-aware ParaStationMPI module" >&2
+	module load GCC ParaStationMPI/5.8.1-1-msa-aware
+else
+	echo "Only JUWELS Cluster / JUWELS Booster are currently supported!"
+fi
+
-- 
GitLab