|
1 | 1 | import os |
2 | 2 |
|
| 3 | +import reframe as rfm |
3 | 4 | import reframe.utility.sanity as sn |
4 | | -from reframe.core.pipeline import RunOnlyRegressionTest |
5 | 5 |
|
6 | 6 |
|
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) |
12 | 12 |
|
13 | 13 | self.valid_prog_environs = ['PrgEnv-intel'] |
14 | 14 |
|
15 | 15 | self.modules = ['NAMD'] |
16 | 16 |
|
17 | 17 | # Reset sources dir relative to the SCS apps prefix |
18 | 18 | self.sourcesdir = os.path.join(self.current_system.resourcesdir, |
19 | | - 'NAMD') |
| 19 | + 'NAMD', 'prod') |
20 | 20 | self.executable = 'namd2' |
21 | 21 |
|
22 | 22 | self.use_multithreading = True |
@@ -57,81 +57,46 @@ def __init__(self, variant, **kwargs): |
57 | 57 | } |
58 | 58 |
|
59 | 59 |
|
| 60 | +@rfm.parameterized_test(['maint'], ['prod']) |
60 | 61 | 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) |
63 | 64 | self.valid_systems = ['daint:gpu', 'dom:gpu'] |
64 | 65 | self.executable_opts = '+idlepoll +ppn 23 stmv.namd'.split() |
65 | 66 | self.num_cpus_per_task = 24 |
66 | 67 | self.num_gpus_per_node = 1 |
| 68 | + if variant == 'prod': |
| 69 | + self.tags |= {'production'} |
| 70 | + else: |
| 71 | + self.tags |= {'maintenance'} |
67 | 72 |
|
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'} |
87 | 73 | self.reference = { |
88 | 74 | 'dom:gpu': { |
89 | | - 'days_ns': (0.16, None, 0.05), |
| 75 | + 'days_ns': (0.18, None, 0.05), |
90 | 76 | }, |
91 | 77 | 'daint:gpu': { |
92 | | - 'days_ns': (0.07, None, 0.05), |
| 78 | + 'days_ns': (0.11, None, 0.05), |
93 | 79 | }, |
94 | 80 | } |
95 | 81 |
|
96 | 82 |
|
| 83 | +@rfm.parameterized_test(['maint'], ['prod']) |
97 | 84 | 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) |
100 | 87 | self.valid_systems = ['daint:mc', 'dom:mc'] |
101 | 88 | self.executable_opts = '+idlepoll +ppn 71 stmv.namd'.split() |
102 | 89 | self.num_cpus_per_task = 72 |
| 90 | + if variant == 'prod': |
| 91 | + self.tags |= {'production'} |
| 92 | + else: |
| 93 | + self.tags |= {'maintenance'} |
103 | 94 |
|
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'} |
123 | 95 | self.reference = { |
124 | 96 | 'dom:mc': { |
125 | | - 'days_ns': (0.49, None, 0.05), |
| 97 | + 'days_ns': (0.57, None, 0.05), |
126 | 98 | }, |
127 | 99 | 'daint:mc': { |
128 | | - 'days_ns': (0.27, None, 0.05), |
| 100 | + 'days_ns': (0.38, None, 0.05), |
129 | 101 | }, |
130 | 102 | } |
131 | | - |
132 | | - |
133 | | -def _get_checks(**kwargs): |
134 | | - return [NamdCPUProdCheck(**kwargs), |
135 | | - NamdCPUMaintCheck(**kwargs), |
136 | | - NamdGPUProdCheck(**kwargs), |
137 | | - NamdGPUMaintCheck(**kwargs)] |
0 commit comments