Skip to content

Commit

Permalink
Always at least 1 task per node. I.e. even on a 2-core node, if we us…
Browse files Browse the repository at this point in the history
…e 1/4 node, we should launch 1 task
  • Loading branch information
Caspar van Leeuwen committed Jun 28, 2024
1 parent 70b1008 commit 00c4795
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions eessi/testsuite/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ def _assign_one_task_per_cpu(test: rfm.RegressionTest):
# neither num_tasks_per_node nor num_cpus_per_task are set
if not test.num_tasks_per_node and not test.num_cpus_per_task:
check_proc_attribute_defined(test, 'num_cpus_per_core')
test.num_tasks_per_node = int(
test.default_num_cpus_per_node / test.current_partition.processor.num_cpus_per_core
test.num_tasks_per_node = min(
int(test.default_num_cpus_per_node / test.current_partition.processor.num_cpus_per_core),
1
)
test.num_cpus_per_task = int(test.default_num_cpus_per_node / test.num_tasks_per_node)

Expand Down

0 comments on commit 00c4795

Please sign in to comment.