Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions eessi/testsuite/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,23 @@ def assign_tasks_per_compute_unit(test: rfm.RegressionTest):

Arguments:
- test: the ReFrame test to which this hook should apply

The following test attributes must be set:
- compute_unit: a device as listed in eessi.testsuite.constants.COMPUTE_UNITS
- num_tasks_per_compute_unit: the number of tasks per compute unit

Examples:
On a single node with 2 sockets, 64 cores and 128 hyperthreads:
- assign_tasks_per_compute_unit(test, COMPUTE_UNITS.HWTHREAD) will launch 128 tasks with 1 thread per task
- assign_tasks_per_compute_unit(test, COMPUTE_UNITS.CPU) will launch 64 tasks with 2 threads per task
- assign_tasks_per_compute_unit(test, COMPUTE_UNITS.CPU_SOCKET) will launch 2 tasks with 64 threads per task
- test.compute_unit = COMPUTE_UNITS.HWTHREAD will launch 128 tasks with 1 thread per task
- test.compute_unit = COMPUTE_UNITS.CPU will launch 64 tasks with 2 threads per task
- test.compute_unit = COMPUTE_UNITS.CPU_SOCKET will launch 2 tasks with 64 threads per task

"""
for attribute in ['compute_unit', 'num_tasks_per_compute_unit']:
if not hasattr(test, attribute):
raise NotImplementedError(
f'test attribute {attribute} must be defined before calling assign_tasks_per_compute_unit')

compute_unit = test.compute_unit
num_per = test.num_tasks_per_compute_unit
log(f'assign_tasks_per_compute_unit with compute_unit: {compute_unit} and num_per: {num_per}')
Expand Down
Loading