55@rfm .required_version ('>=2.14' )
66@rfm .simple_test
77class StreamTest (rfm .RegressionTest ):
8+ """This test checks the stream test:
9+ Function Best Rate MB/s Avg time Min time Max time
10+ Triad: 13991.7 0.017174 0.017153 0.017192
11+ """
12+
813 def __init__ (self ):
914 super ().__init__ ()
1015 self .descr = 'STREAM Benchmark'
1116 self .exclusive_access = True
12- # All available systems are supported
1317 self .valid_systems = ['daint:gpu' , 'daint:mc' , 'dom:gpu' , 'dom:mc' ,
1418 'kesch:cn' , 'kesch:pn' , 'leone:normal' ]
1519 self .valid_prog_environs = ['PrgEnv-cray' , 'PrgEnv-gnu' ,
@@ -28,8 +32,6 @@ def __init__(self):
2832 }
2933 self .sourcepath = 'stream.c'
3034 self .build_system = 'SingleSource'
31- self .sanity_patterns = sn .assert_found (
32- r'Solution Validates: avg error less than' , self .stdout )
3335 self .num_tasks = 1
3436 self .num_tasks_per_node = 1
3537 self .stream_cpus_per_task = {
@@ -42,66 +44,73 @@ def __init__(self):
4244 'leone:normal' : 16 ,
4345 'monch:compute' : 20 ,
4446 }
45-
4647 self .variables = {
4748 'OMP_PLACES' : 'threads' ,
4849 'OMP_PROC_BIND' : 'spread'
4950 }
51+ self .sanity_patterns = sn .assert_found (
52+ r'Solution Validates: avg error less than' , self .stdout )
53+ self .perf_patterns = {
54+ 'triad' : sn .extractsingle (r'Triad:\s+(?P<triad>\S+)\s+\S+' ,
55+ self .stdout , 'triad' , float )
56+ }
5057 self .stream_bw_reference = {
5158 'PrgEnv-cray' : {
52- 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None )},
53- 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None )},
54- 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None )},
55- 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None )},
56- 'kesch:cn' : {'triad' : (103129.0 , - 0.05 , None )},
57- 'kesch:pn' : {'triad' : (55967.0 , - 0.1 , None )},
59+ 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None , 'MB/s' )},
60+ 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None , 'MB/s' )},
61+ 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None , 'MB/s' )},
62+ 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None , 'MB/s' )},
63+ 'kesch:cn' : {'triad' : (103129.0 , - 0.05 , None , 'MB/s' )},
64+ 'kesch:pn' : {'triad' : (55967.0 , - 0.1 , None , 'MB/s' )},
65+ '*' : {'triad' : (0.0 , None , None , 'MB/s' )},
5866 },
5967 'PrgEnv-gnu' : {
60- 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None )},
61- 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None )},
62- 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None )},
63- 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None )},
64- 'kesch:cn' : {'triad' : (78046.0 , - 0.05 , None )},
65- 'kesch:pn' : {'triad' : (43803.0 , - 0.1 , None )},
66- 'leone:normal' : {'triad' : (44767.0 , - 0.05 , None )},
67- 'monch:compute' : {'triad' : (31011.0 , - 0.05 , None )},
68+ 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None , 'MB/s' )},
69+ 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None , 'MB/s' )},
70+ 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None , 'MB/s' )},
71+ 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None , 'MB/s' )},
72+ 'kesch:cn' : {'triad' : (78046.0 , - 0.05 , None , 'MB/s' )},
73+ 'kesch:pn' : {'triad' : (43803.0 , - 0.1 , None , 'MB/s' )},
74+ 'leone:normal' : {'triad' : (44767.0 , - 0.05 , None , 'MB/s' )},
75+ 'monch:compute' : {'triad' : (31011.0 , - 0.05 , None , 'MB/s' )},
76+ '*' : {'triad' : (0.0 , None , None , 'MB/s' )},
6877 },
6978 'PrgEnv-intel' : {
70- 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None )},
71- 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None )},
72- 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None )},
73- 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None )},
79+ 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None , 'MB/s' )},
80+ 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None , 'MB/s' )},
81+ 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None , 'MB/s' )},
82+ 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None , 'MB/s' )},
83+ '*' : {'triad' : (0.0 , None , None , 'MB/s' )},
7484 },
7585 'PrgEnv-pgi' : {
76- 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None )},
77- 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None )},
78- 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None )},
79- 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None )},
80- 'kesch:cn' : {'triad' : (78637.0 , - 0.1 , None )},
81- 'kesch:pn' : {'triad' : (86022.0 , - 0.1 , None )},
86+ 'daint:gpu' : {'triad' : (50223.0 , - 0.15 , None , 'MB/s' )},
87+ 'daint:mc' : {'triad' : (56643.0 , - 0.25 , None , 'MB/s' )},
88+ 'dom:gpu' : {'triad' : (50440.0 , - 0.15 , None , 'MB/s' )},
89+ 'dom:mc' : {'triad' : (56711.0 , - 0.25 , None , 'MB/s' )},
90+ 'kesch:cn' : {'triad' : (78637.0 , - 0.1 , None , 'MB/s' )},
91+ 'kesch:pn' : {'triad' : (86022.0 , - 0.1 , None , 'MB/s' )},
92+ '*' : {'triad' : (0.0 , None , None , 'MB/s' )},
8293 }
8394 }
84- self .perf_patterns = {
85- 'triad' : sn .extractsingle (r'Triad:\s+(?P<triad>\S+)\s+\S+' ,
86- self .stdout , 'triad' , float )
87- }
88-
8995 self .tags = {'production' , 'monch_acceptance' }
9096 self .maintainers = ['RS' , 'VK' ]
9197
9298 def setup (self , partition , environ , ** job_opts ):
93- self .num_cpus_per_task = self .stream_cpus_per_task [partition .fullname ]
99+ self .num_cpus_per_task = self .stream_cpus_per_task .get (
100+ partition .fullname , 1 )
101+ self .variables ['OMP_NUM_THREADS' ] = str (self .num_cpus_per_task )
94102 if self .current_system .name == 'kesch' :
95103 envname = environ .name .replace ('-nompi' , '' )
96104 else :
97105 envname = environ .name
98106
99- self .reference = self .stream_bw_reference [envname ]
100- # On SLURM there is no need to set OMP_NUM_THREADS if one defines
101- # num_cpus_per_task, but adding for completeness and portability
102- self .variables ['OMP_NUM_THREADS' ] = str (self .num_cpus_per_task )
107+ self .build_system .cflags = self .prgenv_flags .get (envname , ['-O3' ])
103108 if envname == 'PrgEnv-pgi' :
104109 self .variables ['OMP_PROC_BIND' ] = 'true'
105110
106- self .build_system .cflags = self .prgenv_flags [envname ]
111+ try :
112+ self .reference = self .stream_bw_reference [envname ]
113+ except KeyError :
114+ self .reference = {'*' : {'triad' : (0.0 , None , None , 'MB/s' )}}
115+
107116 super ().setup (partition , environ , ** job_opts )
0 commit comments