File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments