Skip to content

Commit 3e66bbb

Browse files
authored
Merge pull request #574 from rsarm/checks/namd-perf
[test] Update NAMD test
2 parents e3f918c + d6629e6 commit 3e66bbb

File tree

1 file changed

+25
-60
lines changed

1 file changed

+25
-60
lines changed
Lines changed: 25 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import os
22

3+
import reframe as rfm
34
import reframe.utility.sanity as sn
4-
from reframe.core.pipeline import RunOnlyRegressionTest
55

66

7-
class NamdBaseCheck(RunOnlyRegressionTest):
8-
def __init__(self, variant, **kwargs):
9-
super().__init__('namd_%s_check' % variant,
10-
os.path.dirname(__file__), **kwargs)
11-
self.descr = 'NAMD 2.11 check (%s)' % variant
7+
class NamdBaseCheck(rfm.RunOnlyRegressionTest):
8+
def __init__(self, version, variant):
9+
super().__init__()
10+
self.name = 'namd_%s_%s_check' % (version, variant)
11+
self.descr = 'NAMD check (%s, %s)' % (version, variant)
1212

1313
self.valid_prog_environs = ['PrgEnv-intel']
1414

1515
self.modules = ['NAMD']
1616

1717
# Reset sources dir relative to the SCS apps prefix
1818
self.sourcesdir = os.path.join(self.current_system.resourcesdir,
19-
'NAMD')
19+
'NAMD', 'prod')
2020
self.executable = 'namd2'
2121

2222
self.use_multithreading = True
@@ -57,81 +57,46 @@ def __init__(self, variant, **kwargs):
5757
}
5858

5959

60+
@rfm.parameterized_test(['maint'], ['prod'])
6061
class NamdGPUCheck(NamdBaseCheck):
61-
def __init__(self, version, **kwargs):
62-
super().__init__('gpu_%s' % version, **kwargs)
62+
def __init__(self, variant):
63+
super().__init__('gpu', variant)
6364
self.valid_systems = ['daint:gpu', 'dom:gpu']
6465
self.executable_opts = '+idlepoll +ppn 23 stmv.namd'.split()
6566
self.num_cpus_per_task = 24
6667
self.num_gpus_per_node = 1
68+
if variant == 'prod':
69+
self.tags |= {'production'}
70+
else:
71+
self.tags |= {'maintenance'}
6772

68-
69-
class NamdGPUProdCheck(NamdGPUCheck):
70-
def __init__(self, **kwargs):
71-
super().__init__('prod', **kwargs)
72-
self.tags |= {'production'}
73-
self.reference = {
74-
'dom:gpu': {
75-
'days_ns': (0.16, None, 0.05),
76-
},
77-
'daint:gpu': {
78-
'days_ns': (0.07, None, 0.05),
79-
},
80-
}
81-
82-
83-
class NamdGPUMaintCheck(NamdGPUCheck):
84-
def __init__(self, **kwargs):
85-
super().__init__('maint', **kwargs)
86-
self.tags |= {'maintenance'}
8773
self.reference = {
8874
'dom:gpu': {
89-
'days_ns': (0.16, None, 0.05),
75+
'days_ns': (0.18, None, 0.05),
9076
},
9177
'daint:gpu': {
92-
'days_ns': (0.07, None, 0.05),
78+
'days_ns': (0.11, None, 0.05),
9379
},
9480
}
9581

9682

83+
@rfm.parameterized_test(['maint'], ['prod'])
9784
class NamdCPUCheck(NamdBaseCheck):
98-
def __init__(self, version, **kwargs):
99-
super().__init__('cpu_%s' % version, **kwargs)
85+
def __init__(self, variant):
86+
super().__init__('cpu', variant)
10087
self.valid_systems = ['daint:mc', 'dom:mc']
10188
self.executable_opts = '+idlepoll +ppn 71 stmv.namd'.split()
10289
self.num_cpus_per_task = 72
90+
if variant == 'prod':
91+
self.tags |= {'production'}
92+
else:
93+
self.tags |= {'maintenance'}
10394

104-
105-
class NamdCPUProdCheck(NamdCPUCheck):
106-
def __init__(self, **kwargs):
107-
super().__init__('prod', **kwargs)
108-
self.tags |= {'production'}
109-
self.reference = {
110-
'dom:mc': {
111-
'days_ns': (0.49, None, 0.05),
112-
},
113-
'daint:mc': {
114-
'days_ns': (0.27, None, 0.05),
115-
},
116-
}
117-
118-
119-
class NamdCPUMaintCheck(NamdCPUCheck):
120-
def __init__(self, **kwargs):
121-
super().__init__('maint', **kwargs)
122-
self.tags |= {'maintenance'}
12395
self.reference = {
12496
'dom:mc': {
125-
'days_ns': (0.49, None, 0.05),
97+
'days_ns': (0.57, None, 0.05),
12698
},
12799
'daint:mc': {
128-
'days_ns': (0.27, None, 0.05),
100+
'days_ns': (0.38, None, 0.05),
129101
},
130102
}
131-
132-
133-
def _get_checks(**kwargs):
134-
return [NamdCPUProdCheck(**kwargs),
135-
NamdCPUMaintCheck(**kwargs),
136-
NamdGPUProdCheck(**kwargs),
137-
NamdGPUMaintCheck(**kwargs)]

0 commit comments

Comments
 (0)