From 693a149f76df20f6302135acc58c298b18150312 Mon Sep 17 00:00:00 2001 From: Cristian C Lalescu <Cristian.Lalescu@ds.mpg.de> Date: Mon, 13 Jan 2020 13:23:34 +0100 Subject: [PATCH] tweak basic SLURM config --- TurTLE/_code.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TurTLE/_code.py b/TurTLE/_code.py index 2b235ed5..b49c8f2e 100644 --- a/TurTLE/_code.py +++ b/TurTLE/_code.py @@ -725,10 +725,11 @@ class _code(_base): ## make sure that "~/.config/TurTLE/bashrc" exists and builds desired job environment #script_file.write('#SBATCH --export=NONE\n') #script_file.write('#SBATCH --get-user-env\n') + #script_file.write('export OMP_PLACES=cores\n') # or threads, as appropriate + # also look up OMP_PROC_BIND and SLURM_HINT #script_file.write('source ~/.config/TurTLE/bashrc\n') if nb_threads_per_process > 1: - script_file.write('export OMP_NUM_THREADS={0}\n'.format(nb_threads_per_process)) - script_file.write('export OMP_PLACES=cores\n') + script_file.write('export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}\n') script_file.write('echo "Start time is `date`"\n') script_file.write('cd ' + self.work_dir + '\n') -- GitLab