Skip to content

Commit 2062d23

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into bugfix/module_collections_cli_usepath
2 parents cafc134 + 0803cce commit 2062d23

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

cscs-checks/apps/gromacs/gromacs_check.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import contextlib
7-
import itertools
87
import os
98

109
import reframe as rfm
@@ -100,27 +99,37 @@ def __init__(self, scale, variant):
10099
class GromacsCPUCheck(GromacsBaseCheck):
101100
def __init__(self, scale, variant):
102101
super().__init__('md.log')
103-
self.valid_systems = ['daint:mc']
102+
self.valid_systems = ['daint:mc', 'eiger:mc']
104103
self.descr = 'GROMACS CPU check'
105104
self.executable_opts = ['mdrun', '-dlb yes', '-ntomp 1', '-npme -1',
106105
'-nb cpu', '-s herflat.tpr']
107106

108107
if scale == 'small':
109108
self.valid_systems += ['dom:mc']
110-
self.num_tasks = 216
111-
self.num_tasks_per_node = 36
109+
if (self.current_system.name in ['daint', 'dom']):
110+
self.num_tasks = 216
111+
self.num_tasks_per_node = 36
112+
elif (self.current_system.name in ['eiger']):
113+
self.num_tasks = 768
114+
self.num_tasks_per_node = 128
112115
else:
113-
self.num_tasks = 576
114-
self.num_tasks_per_node = 36
116+
if (self.current_system.name in ['daint', 'dom']):
117+
self.num_tasks = 576
118+
self.num_tasks_per_node = 36
119+
elif (self.current_system.name in ['eiger']):
120+
self.num_tasks = 2048
121+
self.num_tasks_per_node = 128
115122

116123
references = {
117124
'prod': {
118125
'small': {
119126
'dom:mc': {'perf': (40.0, -0.05, None, 'ns/day')},
120-
'daint:mc': {'perf': (38.8, -0.10, None, 'ns/day')}
127+
'daint:mc': {'perf': (38.8, -0.10, None, 'ns/day')},
128+
'eiger:mc': {'perf': (103.00, -0.10, None, 'ns/day')}
121129
},
122130
'large': {
123-
'daint:mc': {'perf': (68.0, -0.20, None, 'ns/day')}
131+
'daint:mc': {'perf': (68.0, -0.20, None, 'ns/day')},
132+
'eiger:mc': {'perf': (146.00, -0.20, None, 'ns/day')}
124133
}
125134
},
126135
}

reframe/core/logging.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ def _create_file_handler(site_config, config_prefix):
247247

248248

249249
def _create_filelog_handler(site_config, config_prefix):
250-
basedir = os.path.abspath(site_config.get(f'{config_prefix}/basedir'))
251-
prefix = site_config.get(f'{config_prefix}/prefix')
250+
basedir = os.path.abspath(
251+
osext.expandvars(site_config.get(f'{config_prefix}/basedir'))
252+
)
253+
prefix = osext.expandvars(site_config.get(f'{config_prefix}/prefix'))
252254
filename_patt = os.path.join(basedir, prefix)
253255
append = site_config.get(f'{config_prefix}/append')
254256
return MultiFileHandler(filename_patt, mode='a+' if append else 'w+')

unittests/test_cli.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,22 @@ def test_performance_check_failure(run_reframe, tmp_path, perflogdir):
364364
'default' / 'PerformanceFailureCheck.log')
365365

366366

367-
def test_performance_report(run_reframe):
367+
def test_perflogdir_from_env(run_reframe, tmp_path, monkeypatch):
368+
monkeypatch.setenv('FOODIR', str(tmp_path / 'perflogs'))
368369
returncode, stdout, stderr = run_reframe(
370+
checkpath=['unittests/resources/checks/frontend_checks.py'],
371+
more_options=['-t', 'PerformanceFailureCheck'],
372+
perflogdir='$FOODIR'
373+
)
374+
assert returncode == 1
375+
assert 'Traceback' not in stdout
376+
assert 'Traceback' not in stderr
377+
assert os.path.exists(tmp_path / 'perflogs' / 'generic' /
378+
'default' / 'PerformanceFailureCheck.log')
379+
380+
381+
def test_performance_report(run_reframe):
382+
returncode, stdout, _ = run_reframe(
369383
checkpath=['unittests/resources/checks/frontend_checks.py'],
370384
more_options=['-t', 'PerformanceFailureCheck', '--performance-report']
371385
)

0 commit comments

Comments
 (0)