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
16 changes: 7 additions & 9 deletions cscs-checks/microbenchmarks/hpcg/hpcg_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def __init__(self):
self.modules = ['craype-hugepages8M']
self.build_system = 'Make'
self.prebuild_cmds = ['cp -r ${MKLROOT}/benchmarks/hpcg/* .',
'mv Make.CrayXC setup',
'./configure CrayXC']
'mv Make.CrayXC setup', './configure CrayXC']

self.num_tasks = 0
self.num_tasks_per_core = 2
Expand All @@ -116,9 +115,9 @@ def __init__(self):
}

self.executable = 'bin/xhpcg_avx2'
self.executable_opts = ['--nx=%d' % self.problem_size,
'--ny=%d' % self.problem_size,
'--nz=%d' % self.problem_size, '-t2']
self.executable_opts = [f'--nx={self.problem_size}',
f'--ny={self.problem_size}',
f'--nz={self.problem_size}', '-t2']

self.reference = {
'dom:mc': {
Expand Down Expand Up @@ -146,9 +145,8 @@ def num_tasks_assigned(self):
@property
@sn.sanity_function
def outfile_lazy(self):
pattern = 'n%d-%dp-%dt-*.yaml' % (self.problem_size,
self.job.num_tasks,
self.num_cpus_per_task)
pattern = (f'n{self.problem_size}-{self.job.num_tasks}p-'
f'{self.num_cpus_per_task}t*.*')
return sn.getitem(sn.glob(pattern), 0)

@rfm.run_before('compile')
Expand All @@ -168,7 +166,7 @@ def set_performance(self):
num_nodes = self.num_tasks_assigned / self.num_tasks_per_node
self.perf_patterns = {
'gflops': sn.extractsingle(
r'HPCG result is VALID with a GFLOP\/s rating of:\s*'
r'HPCG result is VALID with a GFLOP\/s rating of(=|:)\s*'
r'(?P<perf>\S+)',
self.outfile_lazy, 'perf', float) / num_nodes
}
Expand Down