From 4ff2103dd54fb8006286f2da23f72fe8737c4950 Mon Sep 17 00:00:00 2001
From: pat-alt <altmeyerpat@gmail.com>
Date: Mon, 16 Oct 2023 10:12:14 +0200
Subject: [PATCH] open blas

---
 experiments/jobscripts/testing/lin_sep.sh | 4 +---
 experiments/slurm_header.sh               | 3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)
 create mode 100644 experiments/slurm_header.sh

diff --git a/experiments/jobscripts/testing/lin_sep.sh b/experiments/jobscripts/testing/lin_sep.sh
index 96345366..9c8af82c 100644
--- a/experiments/jobscripts/testing/lin_sep.sh
+++ b/experiments/jobscripts/testing/lin_sep.sh
@@ -9,10 +9,8 @@
 #SBATCH --account=research-eemcs-insy
 #SBATCH --mail-type=END     # Set mail type to 'END' to receive a mail when the job finishes. 
 
-module load 2023r1 julia
 module load openmpi
 
-set -x
-export SRUN_CPUS_PER_TASK="$SLURM_CPUS_PER_TASK"
+source experiments/slurm_header.sh
 
 srun julia --project=experiments --threads $SLURM_CPUS_PER_TASK experiments/run_experiments.jl -- data=linearly_separable output_path=results mpi grid_search n_individuals=10 threaded > experiments/grid_search_linearly_separable.log
diff --git a/experiments/slurm_header.sh b/experiments/slurm_header.sh
new file mode 100644
index 00000000..48da377b
--- /dev/null
+++ b/experiments/slurm_header.sh
@@ -0,0 +1,3 @@
+set -x                                                  # keep log of executed commands
+export SRUN_CPUS_PER_TASK="$SLURM_CPUS_PER_TASK"        # assign extra environment variable to be safe 
+export OPENBLAS_NUM_THREADS=1                           # avoid that OpenBLAS calls too many threads
\ No newline at end of file
-- 
GitLab