Skip to content

Commit

Permalink
PEP
Browse files Browse the repository at this point in the history
  • Loading branch information
Crivella committed Jul 15, 2024
1 parent 517faf8 commit a7e8244
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hpctestlib/sciapps/metalwalls/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class MetalWallsCheck(rfm.RunOnlyRegressionTest):
#: Parameter pack encoding the benchmark information.
#:
#: The first element of the tuple refers to the benchmark name,
#: the second is the final kinetic energy the third is the related
#: the second is the final kinetic energy the third is the related
#: tolerance, the fourth is the absolute temperature and the fifth is
#: the related tolerance
#:
Expand Down Expand Up @@ -213,22 +213,21 @@ def total_elapsed_time(self):
return sn.extractsingle(
r'Total elapsed time:\s+(?P<time>\S+)', 'run.out', 'time', float
)

@sn.deferrable
def extract_kinetic_energy(self):
"""Extract the final kinetic energy from the output file"""
rgx = r'\|step\| +kinetic energy: +(?P<flag>\S+)'
app = sn.extractall(rgx, 'run.out', 'flag', float)
return app[-1]

@sn.deferrable
def extract_temperature(self):
"""Extract the final temperature from the output file"""
rgx = r'\|step\| +temperature: +(?P<flag>\S+)'
app = sn.extractall(rgx, 'run.out', 'flag', float)
return app[-1]


@performance_function('s')
def extract_time(
self, name: str = None, parent: str = None, kind: str = None
Expand All @@ -242,7 +241,7 @@ def extract_time(
"""
if kind is None:
return 0

kind = kind.lower()
if kind == 'avg':
tag = 1
Expand Down

0 comments on commit a7e8244

Please sign in to comment.