Skip to content
Closed
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
17 changes: 16 additions & 1 deletion hpctestlib/microbenchmarks/mpi/osu.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ class osu_benchmark(rfm.RunOnlyRegressionTest):
num_tasks = required
num_tasks_per_node = 1

#: Validation
#:
#: Use builtin OSU test validation
#:
#: :type: `bool`
#: :default: ``False``
validation = variable(bool, value=False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should not use an extra variable then and always run with the -c option. Therefore, we should also keep only the new validation test.


#: Parameter indicating the available benchmark to execute.
#:
#: :type: 2-element tuple containing the benchmark name and whether latency
Expand Down Expand Up @@ -146,6 +154,10 @@ def setup_per_benchmark(self):
self.executable_opts = ['-m', f'{self.message_size}',
'-x', f'{self.num_warmup_iters}',
'-i', f'{self.num_iters}']

if self.validation:
self.executable_opts += ['-c']

if self.device_buffers != 'cpu':
self.executable_opts += ['-d', self.device_buffers]

Expand All @@ -161,7 +173,10 @@ def setup_per_benchmark(self):

@sanity_function
def validate_test(self):
return sn.assert_found(rf'^{self.message_size}', self.stdout)
if self.validation:
return sn.assert_found(rf'^{self.message_size}.*Pass', self.stdout)
else:
return sn.assert_found(rf'^{self.message_size}', self.stdout)

@deferrable
def _extract_metric(self):
Expand Down