11import os
2-
2+ import reframe as rfm
33import reframe .utility .sanity as sn
4- from reframe .core .pipeline import RunOnlyRegressionTest
54
65
7- class Cp2kCheck (RunOnlyRegressionTest ):
8- def __init__ (self , check_name , check_descr , ** kwargs ):
9- super ().__init__ (check_name , os .path .dirname (__file__ ), ** kwargs )
6+ class Cp2kCheck (rfm . RunOnlyRegressionTest ):
7+ def __init__ (self , check_name , check_descr ):
8+ super ().__init__ (check_name , os .path .dirname (__file__ ))
109 self .descr = check_descr
1110 self .valid_prog_environs = ['PrgEnv-gnu' ]
1211
@@ -42,9 +41,11 @@ def __init__(self, check_name, check_descr, **kwargs):
4241 }
4342
4443
44+ @rfm .parameterized_test (['prod' ], ['maint' ])
4545class Cp2kCpuCheck (Cp2kCheck ):
46- def __init__ (self , ** kwargs ):
47- super ().__init__ ('cp2k_cpu_check' , 'CP2K check CPU' , ** kwargs )
46+ def __init__ (self , variant ):
47+ super ().__init__ ('cp2k_cpu_%s_check' % variant ,
48+ 'CP2K check CPU' )
4849 self .valid_systems = ['daint:mc' , 'dom:mc' ]
4950 self .num_gpus_per_node = 0
5051 if self .current_system .name == 'dom' :
@@ -53,21 +54,34 @@ def __init__(self, **kwargs):
5354 self .num_tasks = 576
5455
5556 self .num_tasks_per_node = 36
56- self .reference = {
57- 'dom:mc' : {
58- 'perf' : (174.5 , None , 0.05 )
59- },
60- 'daint:mc' : {
61- 'perf' : (113.0 , None , 0.25 )
62- },
63- }
64- self .tags |= {'maintenance' , 'production' }
57+
58+ if variant == 'maint' :
59+ self .tags |= {'maintenance' }
60+ self .reference = {
61+ 'dom:mc' : {
62+ 'perf' : (182.6 , None , 0.05 )
63+ },
64+ 'daint:mc' : {
65+ 'perf' : (106.8 , None , 0.10 )
66+ },
67+ }
68+ else :
69+ self .tags |= {'production' }
70+ self .reference = {
71+ 'dom:mc' : {
72+ 'perf' : (174.5 , None , 0.05 )
73+ },
74+ 'daint:mc' : {
75+ 'perf' : (113.0 , None , 0.25 )
76+ },
77+ }
6578
6679
80+ @rfm .parameterized_test (['prod' ], ['maint' ])
6781class Cp2kGpuCheck (Cp2kCheck ):
68- def __init__ (self , variant , ** kwargs ):
82+ def __init__ (self , variant ):
6983 super ().__init__ ('cp2k_gpu_%s_check' % variant ,
70- 'CP2K check GPU' , ** kwargs )
84+ 'CP2K check GPU' )
7185 self .valid_systems = ['daint:gpu' , 'dom:gpu' ]
7286 self .variables = {'CRAY_CUDA_MPS' : '1' }
7387 self .modules = ['CP2K' ]
@@ -79,36 +93,23 @@ def __init__(self, variant, **kwargs):
7993
8094 self .num_tasks_per_node = 12
8195
82-
83- class Cp2kGpuMaintCheck (Cp2kGpuCheck ):
84- def __init__ (self , ** kwargs ):
85- super ().__init__ ('maint' , ** kwargs )
86- self .tags |= {'maintenance' }
87- self .reference = {
88- 'dom:gpu' : {
89- 'perf' : (258.0 , None , 0.15 )
90- },
91- 'daint:gpu' : {
92- 'perf' : (139.0 , None , 0.10 )
93- },
94- }
95-
96-
97- class Cp2kGpuProdCheck (Cp2kGpuCheck ):
98- def __init__ (self , ** kwargs ):
99- super ().__init__ ('prod' , ** kwargs )
100- self .tags |= {'production' }
101- self .reference = {
102- 'dom:gpu' : {
103- 'perf' : (240.0 , None , 0.05 )
104- },
105- 'daint:gpu' : {
106- 'perf' : (195.0 , None , 0.10 )
107- },
108- }
109-
110-
111- def _get_checks (** kwargs ):
112- return [Cp2kCpuCheck (** kwargs ),
113- Cp2kGpuMaintCheck (** kwargs ),
114- Cp2kGpuProdCheck (** kwargs )]
96+ if variant == 'maint' :
97+ self .tags |= {'maintenance' }
98+ self .reference = {
99+ 'dom:gpu' : {
100+ 'perf' : (251.8 , None , 0.15 )
101+ },
102+ 'daint:gpu' : {
103+ 'perf' : (182.3 , None , 0.10 )
104+ },
105+ }
106+ else :
107+ self .tags |= {'production' }
108+ self .reference = {
109+ 'dom:gpu' : {
110+ 'perf' : (240.0 , None , 0.05 )
111+ },
112+ 'daint:gpu' : {
113+ 'perf' : (195.0 , None , 0.10 )
114+ },
115+ }
0 commit comments