Skip to content

Commit e9c96a4

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into bugfix/tests_no_valid_prgenvs
2 parents 63ef2b8 + 1809565 commit e9c96a4

File tree

1 file changed

+70
-29
lines changed

1 file changed

+70
-29
lines changed

cscs-checks/prgenv/environ_check.py

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,65 +13,106 @@ class DefaultPrgEnvCheck(rfm.RunOnlyRegressionTest):
1313
def __init__(self):
1414
self.descr = 'Ensure PrgEnv-cray is loaded by default'
1515
self.valid_prog_environs = ['builtin']
16-
self.valid_systems = ['daint:login', 'dom:login']
16+
self.valid_systems = ['daint:login', 'dom:login', 'eiger:login']
1717
self.executable = 'module'
18-
self.executable_opts = ['list', '-t']
1918
self.maintainers = ['TM', 'CB']
2019
self.tags = {'production', 'craype'}
2120
self.sanity_patterns = sn.assert_found(r'^PrgEnv-cray', self.stderr)
2221

22+
if self.current_system.name == 'eiger':
23+
self.executable_opts = ['list']
24+
prgenv_patt = r'1\) cpe-cray'
25+
else:
26+
self.executable_opts = ['list', '-t']
27+
prgenv_patt = r'^PrgEnv-cray'
28+
29+
self.sanity_patterns = sn.assert_found(prgenv_patt, self.stderr)
30+
2331

2432
@rfm.simple_test
2533
class EnvironmentCheck(rfm.RunOnlyRegressionTest):
2634
def __init__(self):
2735
self.descr = 'Ensure programming environment is loaded correctly'
28-
self.valid_systems = ['daint:login', 'dom:login']
29-
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu',
30-
'PrgEnv-intel', 'PrgEnv-pgi']
31-
36+
self.valid_systems = ['daint:login', 'dom:login', 'eiger:login']
37+
self.valid_prog_environs = ['PrgEnv-cray', 'PrgEnv-gnu', 'PrgEnv-pgi',
38+
'PrgEnv-intel', 'PrgEnv-aocc']
3239
self.executable = 'module'
33-
self.executable_opts = ['list', '-t']
34-
self.sanity_patterns = sn.assert_found(self.env_module_patt,
35-
self.stderr)
40+
if self.current_system.name == 'eiger':
41+
self.executable_opts = ['list']
42+
else:
43+
self.executable_opts = ['list', '-t']
44+
3645
self.maintainers = ['TM', 'CB']
3746
self.tags = {'production', 'craype'}
3847

39-
@property
40-
@sn.sanity_function
41-
def env_module_patt(self):
42-
return r'^%s' % self.current_environ.name
48+
@rfm.run_before('sanity')
49+
def set_sanity(self):
50+
# NOTE: On eiger, the first module of each programming environment,
51+
# follows the 'cpe-<name>' pattern where <name> corresponds to the
52+
# 'PrgEnv-<name>' used.
53+
if self.current_system.name == 'eiger':
54+
module_patt = rf'1\) cpe-{self.current_environ.name[7:]}'
55+
else:
56+
module_patt = rf'^{self.current_environ.name}'
57+
58+
self.sanity_patterns = sn.assert_found(module_patt, self.stderr)
4359

4460

45-
@rfm.parameterized_test(['cray-fftw'], ['cray-hdf5'], ['cray-hdf5-parallel'],
46-
['cray-libsci'], ['cray-netcdf'],
47-
['cray-netcdf-hdf5parallel'], ['cray-petsc'],
48-
['cray-petsc-64'], ['cray-petsc-complex'],
49-
['cray-petsc-complex-64'], ['cray-python'],
50-
['cray-R'], ['cray-tpsl'], ['cray-tpsl-64'],
51-
['cudatoolkit'], ['gcc'], ['papi'], ['pmi'])
5261
class CrayVariablesCheck(rfm.RunOnlyRegressionTest):
53-
def __init__(self, module_name):
62+
cray_module = parameter()
63+
64+
def __init__(self):
5465
self.descr = 'Check for standard Cray variables'
55-
self.valid_systems = ['daint:login', 'dom:login']
5666
self.valid_prog_environs = ['builtin']
5767
self.executable = 'module'
58-
self.executable_opts = ['show', module_name]
59-
envvar_prefix = module_name.upper().replace('-', '_')
68+
self.executable_opts = ['show', self.cray_module]
69+
envvar_prefix = self.cray_module.upper().replace('-', '_')
6070
self.sanity_patterns = sn.all([
6171
sn.assert_found(f'{envvar_prefix}_PREFIX', self.stderr),
6272
sn.assert_found(f'{envvar_prefix}_VERSION', self.stderr)
6373
])
74+
self.tags = {'production', 'craype'}
75+
self.maintainers = ['EK', 'TM']
76+
77+
78+
@rfm.simple_test
79+
class CrayVariablesCheckDaint(CrayVariablesCheck):
80+
cray_module = parameter([
81+
'cray-fftw', 'cray-hdf5', 'cray-hdf5-parallel', 'cray-libsci',
82+
'cray-mpich', 'cray-netcdf', 'cray-netcdf-hdf5parallel', 'cray-petsc',
83+
'cray-petsc-complex-64', 'cray-python', 'cray-R', 'cray-tpsl',
84+
'cray-tpsl-64', 'cudatoolkit', 'gcc', 'papi', 'pmi'
85+
])
86+
87+
def __init__(self):
88+
super().__init__()
89+
self.valid_systems = ['daint:login', 'dom:login']
6490

6591
# FIXME: These modules should be fixed in later releases,
6692
# while gcc was fixed in 20.11
6793

6894
cdt = osext.cray_cdt_version()
6995
if ((cdt and cdt <= '20.11' and
70-
module_name in ['cray-petsc-complex',
71-
'cray-petsc-complex-64',
72-
'cudatoolkit']) or
96+
self.cray_module in ['cray-petsc-complex',
97+
'cray-petsc-complex-64',
98+
'cudatoolkit']) or
7399
(cdt and cdt < '20.11' and module_name == 'gcc')):
74100
self.valid_systems = []
75101

76-
self.maintainers = ['EK', 'VH']
77-
self.tags = {'production', 'craype'}
102+
103+
@rfm.simple_test
104+
class CrayVariablesCheckEiger(CrayVariablesCheck):
105+
cray_module = parameter([
106+
'cray-fftw', 'cray-hdf5', 'cray-hdf5-parallel', 'cray-libsci',
107+
'cray-mpich', 'cray-openshmemx', 'cray-parallel-netcdf', 'cray-pmi',
108+
'cray-python', 'cray-R', 'gcc', 'papi'
109+
])
110+
111+
def __init__(self):
112+
super().__init__()
113+
self.valid_systems = ['eiger:login']
114+
115+
# FIXME: These modules should be fixed in later releases
116+
117+
if self.cray_module in {'cray-fftw', 'cray-python', 'cray-mpich'}:
118+
self.valid_systems = []

0 commit comments

Comments
 (0)