Skip to content

Commit b6446a2

Browse files
author
Samuel Moors
committed
update comments
1 parent 56cc7a3 commit b6446a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eessi/testsuite/hooks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ def assign_tasks_per_compute_unit(test: rfm.RegressionTest):
161161
if not test.used_cpus_per_task:
162162
test.used_cpus_per_task = test.num_cpus_per_task
163163

164+
# Tell srun to use the number of actually used cpus per tasks, not the number of allocated cpus per task.
165+
# With the default srun launcher in ReFrame this doesn’t work because it sets `srun --cpus-per-task`.
166+
# To make it work, a custom srun launcher should be used that doesn’t set `srun --cpus-per-task`.
164167
test.env_vars['SLURM_CPUS_PER_TASK'] = test.used_cpus_per_task
165168

166169
if test.current_partition.launcher_type().registered_name == 'srun':
@@ -169,7 +172,6 @@ def assign_tasks_per_compute_unit(test: rfm.RegressionTest):
169172
# https://bugs.schedmd.com/show_bug.cgi?id=13351
170173
# https://bugs.schedmd.com/show_bug.cgi?id=11275
171174
# https://bugs.schedmd.com/show_bug.cgi?id=15632#c43
172-
# Also make sure srun uses the actually used cpus per tasks
173175
test.env_vars['SRUN_CPUS_PER_TASK'] = test.used_cpus_per_task
174176
log(f'Set environment variable SRUN_CPUS_PER_TASK to {test.env_vars["SRUN_CPUS_PER_TASK"]}')
175177

0 commit comments

Comments
 (0)