88
99
1010class QuantumESPRESSOCheck (rfm .RunOnlyRegressionTest ):
11+ scale = parameter (['small' , 'large' ])
12+ variant = parameter (['maint' , 'prod' ])
13+
1114 def __init__ (self ):
1215 if self .current_system .name == 'pilatus' :
1316 self .valid_prog_environs = ['cpeGNU' ]
@@ -37,15 +40,14 @@ def __init__(self):
3740 }
3841
3942
40- @rfm .parameterized_test (* ([s , v ]
41- for s in ['small' , 'large' ]
42- for v in ['maint' , 'prod' ]))
43+ @rfm .simple_test
4344class QuantumESPRESSOCpuCheck (QuantumESPRESSOCheck ):
44- def __init__ (self , scale , variant ):
45+ def __init__ (self ):
4546 super ().__init__ ()
46- self .descr = f'QuantumESPRESSO CPU check (version: { scale } , { variant } )'
47+ self .descr = (f'QuantumESPRESSO CPU check (version: { self .scale } , '
48+ f'{ self .variant } )' )
4749 self .valid_systems = ['daint:mc' , 'eiger:mc' , 'pilatus:mc' ]
48- if scale == 'small' :
50+ if self . scale == 'small' :
4951 self .valid_systems += ['dom:mc' ]
5052 energy_reference = - 11427.09017218
5153 if self .current_system .name in ['daint' , 'dom' ]:
@@ -86,8 +88,6 @@ def __init__(self, scale, variant):
8688 energy_diff = sn .abs (energy - energy_reference )
8789 self .sanity_patterns = sn .all ([
8890 self .sanity_patterns ,
89- # FIXME temporarily increase energy difference
90- # (different QE default on Dom and Daint)
9191 sn .assert_lt (energy_diff , 1e-6 )
9292 ])
9393
@@ -120,8 +120,10 @@ def __init__(self, scale, variant):
120120 }
121121 }
122122
123- self .reference = references [variant ][scale ]
124- self .tags |= {'maintenance' if variant == 'maint' else 'production' }
123+ self .reference = references [self .variant ][self .scale ]
124+ self .tags |= {
125+ 'maintenance' if self .variant == 'maint' else 'production'
126+ }
125127
126128 @rfm .run_before ('run' )
127129 def set_task_distribution (self ):
@@ -132,16 +134,15 @@ def set_cpu_binding(self):
132134 self .job .launcher .options = ['--cpu-bind=cores' ]
133135
134136
135- @rfm .parameterized_test (* ([s , v ]
136- for s in ['small' , 'large' ]
137- for v in ['maint' , 'prod' ]))
137+ @rfm .simple_test
138138class QuantumESPRESSOGpuCheck (QuantumESPRESSOCheck ):
139- def __init__ (self , scale , variant ):
139+ def __init__ (self ):
140140 super ().__init__ ()
141- self .descr = f'QuantumESPRESSO GPU check (version: { scale } , { variant } )'
141+ self .descr = (f'QuantumESPRESSO GPU check (version: { self .scale } , '
142+ f'{ self .variant } )' )
142143 self .valid_systems = ['daint:gpu' ]
143144 self .num_gpus_per_node = 1
144- if scale == 'small' :
145+ if self . scale == 'small' :
145146 self .valid_systems += ['dom:gpu' ]
146147 self .num_tasks = 6
147148 energy_reference = - 11427.09017168
@@ -157,8 +158,6 @@ def __init__(self, scale, variant):
157158 energy_diff = sn .abs (energy - energy_reference )
158159 self .sanity_patterns = sn .all ([
159160 self .sanity_patterns ,
160- # FIXME temporarily increase energy difference
161- # (different CUDA default on Dom and Daint)
162161 sn .assert_lt (energy_diff , 1e-7 )
163162 ])
164163
@@ -183,5 +182,7 @@ def __init__(self, scale, variant):
183182 }
184183 }
185184
186- self .reference = references [variant ][scale ]
187- self .tags |= {'maintenance' if variant == 'maint' else 'production' }
185+ self .reference = references [self .variant ][self .scale ]
186+ self .tags |= {
187+ 'maintenance' if self .variant == 'maint' else 'production'
188+ }
0 commit comments