Skip to content

Commit 8d426fd

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into doc/expand-tutorials
2 parents 6d927fa + 278ed31 commit 8d426fd

File tree

7 files changed

+44
-85
lines changed

7 files changed

+44
-85
lines changed

cscs-checks/analytics/spark/spark_check.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

cscs-checks/analytics/spark/src/spark_pi.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

cscs-checks/prgenv/environ_check.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,15 @@ def __init__(self, module_name):
6262
sn.assert_found(f'{envvar_prefix}_VERSION', self.stderr)
6363
])
6464

65-
# These modules should be fixed in later releases
65+
# FIXME: These modules should be fixed in later releases,
66+
# while gcc was fixed in 20.11
67+
6668
cdt = osext.cray_cdt_version()
67-
if (cdt and cdt <= '20.10' and
68-
module_name in ['cray-petsc-complex',
69-
'cray-petsc-complex-64',
70-
'cudatoolkit', 'gcc']):
69+
if ((cdt and cdt <= '20.11' and
70+
module_name in ['cray-petsc-complex',
71+
'cray-petsc-complex-64',
72+
'cudatoolkit']) or
73+
(cdt and cdt < 20.11 and module_name == 'gcc')):
7174
self.valid_systems = []
7275

7376
self.maintainers = ['EK', 'VH']

cscs-checks/system/slurm/slurm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def __init__(self):
112112

113113
@rfm.run_before('run')
114114
def set_memory_limit(self):
115-
self.job.options += ['--mem=120000']
115+
self.job.options = ['--mem=120000']
116116

117117

118118
@rfm.simple_test
@@ -171,7 +171,7 @@ def __init__(self):
171171
def set_slurm_constraint(self):
172172
cabinet = self.cabinets.get(self.current_partition.fullname)
173173
if cabinet:
174-
self.job.options += [f'--constraint={cabinet}']
174+
self.job.options = [f'--constraint={cabinet}']
175175

176176

177177
@rfm.simple_test
@@ -188,7 +188,7 @@ def __init__(self):
188188

189189
@rfm.run_before('run')
190190
def set_memory_limit(self):
191-
self.job.options += ['--mem=2000']
191+
self.job.options = ['--mem=2000']
192192

193193

194194
@rfm.simple_test

docs/configure.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,10 @@ You can view logger's log level as a general cut off.
192192
For example, if we have set it to ``warning``, no debug or informational messages would ever be printed.
193193

194194
Finally, there is a special set of handlers for handling performance log messages.
195-
These are stored in the ``handlers_perflog`` property.
196-
The performance handler in this example will create a file per test and per system/partition combination and will append the performance data to it every time the test is run.
197-
Notice in the ``format`` property how the message to be logged is structured such that it can be easily parsed from post processing tools.
195+
Performance log messages are generated *only* for `performance tests <tutorial_basics.html#writing-a-performance-test>`__, i.e., tests defining the :attr:`perf_patterns <reframe.core.pipeline.RegressionTest.perf_patterns>` attribute.
196+
The performance log handlers are stored in the ``handlers_perflog`` property.
197+
The ``filelog`` handler used in this example will create a file per test and per system/partition combination (``./<system>/<partition>/<testname>.log``) and will append to it the obtained performance data every time a performance test is run.
198+
Notice how the message to be logged is structured in the ``format`` property, such that it can be easily parsed from post processing tools.
198199
Apart from file logging, ReFrame offers more advanced performance logging capabilities through Syslog and Graylog.
199200

200201

reframe/frontend/dependencies.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ def resolve_dep(src, dst):
6161
# c stands for check or case depending on the context
6262
# p stands for partition
6363
# e stands for environment
64-
# t stands for target
6564

6665
# We use an ordered dict here, because we need to keep the order of
6766
# partitions and environments
@@ -79,8 +78,23 @@ def resolve_dep(src, dst):
7978
if when((psrc, esrc), (pdst, edst)):
8079
c.deps.append(d)
8180
except DependencyError as e:
82-
getlogger().warning(f'{e}; skipping test case...')
83-
skipped_cases.append(c)
81+
getlogger().warning(f'{e}; skipping dependent test cases:')
82+
83+
# FIXME: we need to unit test this properly
84+
skip_nodes = {c}
85+
while skip_nodes:
86+
v = skip_nodes.pop()
87+
skipped_cases.append(v)
88+
getlogger().warning(f' - {v}')
89+
pruned_nodes = []
90+
for u, adj in graph.items():
91+
if v in adj:
92+
skip_nodes.add(u)
93+
pruned_nodes.append(u)
94+
95+
for u in pruned_nodes:
96+
del graph[u]
97+
8498
continue
8599

86100
graph[c] = util.OrderedSet(c.deps)

reframe/frontend/statistics.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def tasks(self, run=-1):
3030
try:
3131
return self._alltasks[run]
3232
except IndexError:
33-
raise errors.StatisticsError('no such run: %s' % run) from None
33+
raise errors.StatisticsError(f'no such run: {run}') from None
3434

3535
def failures(self, run=-1):
3636
return [t for t in self.tasks(run) if t.failed]
@@ -58,11 +58,10 @@ def retry_report(self):
5858
if t.check.current_environ:
5959
environ_name = t.check.current_environ.name
6060

61-
key = '%s:%s:%s' % (t.check.name, partition_name, environ_name)
6261
# Overwrite entry from previous run if available
63-
messages[key] = (
64-
' * Test %s was retried %s time(s) and %s.' %
65-
(t.check.info(), run, 'failed' if t.failed else 'passed')
62+
messages[f"{t.check.name}:{partition_name}:{environ_name}"] = (
63+
f" * Test {t.check.info()} was retried {run} time(s) and "
64+
f"{'failed' if t.failed else 'passed'}."
6665
)
6766

6867
for key in sorted(messages.keys()):
@@ -208,7 +207,7 @@ def print_failure_report(self, printer):
208207
printer.info(f" * Maintainers: {r['maintainers']}")
209208
printer.info(f" * Failing phase: {r['fail_phase']}")
210209
printer.info(f" * Rerun with '-n {r['name']}"
211-
f" -p {r['environment']} --system {r['system']}'")
210+
f" -p {r['environment']} --system {r['system']} -r'")
212211
printer.info(f" * Reason: {r['fail_reason']}")
213212

214213
tb = ''.join(traceback.format_exception(*r['fail_info'].values()))
@@ -248,8 +247,8 @@ def print_failure_stats(self, printer):
248247
num_failures += len(l)
249248

250249
stats_body = ['']
251-
stats_body.append('Total number of test cases: %s' % num_tests)
252-
stats_body.append('Total number of failures: %s' % num_failures)
250+
stats_body.append(f'Total number of test cases: {num_tests}')
251+
stats_body.append(f'Total number of failures: {num_failures}')
253252
stats_body.append('')
254253
stats_body.append(stats_header)
255254
stats_body.append(stats_hline)
@@ -276,16 +275,16 @@ def performance_report(self):
276275
if t.check.perfvalues.keys():
277276
if t.check.name != previous_name:
278277
report_body.append(line_width * '-')
279-
report_body.append('%s' % t.check.name)
278+
report_body.append(t.check.name)
280279
previous_name = t.check.name
281280

282281
if t.check.current_partition.fullname != previous_part:
283282
report_body.append(
284-
'- %s' % t.check.current_partition.fullname)
283+
f'- {t.check.current_partition.fullname}')
285284
previous_part = t.check.current_partition.fullname
286285

287-
report_body.append(' - %s' % t.check.current_environ)
288-
report_body.append(' * num_tasks: %s' % t.check.num_tasks)
286+
report_body.append(f' - {t.check.current_environ}')
287+
report_body.append(f' * num_tasks: {t.check.num_tasks}')
289288

290289
for key, ref in t.check.perfvalues.items():
291290
var = key.split(':')[-1]
@@ -295,7 +294,7 @@ def performance_report(self):
295294
except IndexError:
296295
unit = '(no unit specified)'
297296

298-
report_body.append(' * %s: %s %s' % (var, val, unit))
297+
report_body.append(f' * {var}: {val} {unit}')
299298

300299
if report_body:
301300
return '\n'.join([report_start, report_title, *report_body,

0 commit comments

Comments
 (0)