-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathspechpc.py
148 lines (125 loc) · 3.66 KB
/
spechpc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import logging
import reframe as rfm
import reframe.core.builtins as blt
import harness
import harness.config as config
F_MHZ = config.F_MHZ
logger = logging.getLogger(__name__)
class SetupPerfEvents(rfm.RegressionMixin):
"""
Helper mixin that selects the available perf events depending on the
partition the job is being run on.
"""
@blt.run_after("setup")
def set_perf_events(self):
partition_name = self.current_partition.name
if partition_name in (config.SAPPHIRE, config.ICELAKE):
self.perf_events = [
harness.PerfEvents.power.energy_ram,
harness.PerfEvents.power.energy_pkg,
]
elif partition_name == config.CASCADE_LAKE:
self.perf_events = [
harness.PerfEvents.power.energy_cores,
harness.PerfEvents.power.energy_ram,
harness.PerfEvents.power.energy_pkg,
]
else:
self.perf_events = [
harness.PerfEvents.power.energy_cores,
harness.PerfEvents.power.energy_pkg,
]
class BenchmarkBase(
harness.SPEChpcBase,
harness.PerfInstrument,
harness.BMCInstrument,
harness.FrequencySweepAll,
SetupPerfEvents,
): ...
@rfm.simple_test
class Lbm_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Lbm_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Soma_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Soma_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
# using these fixtures to ensure the build process is serial between tests
dag_build = fixture(
harness.build_Lbm_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Tealeaf_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Tealeaf_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
dag_build = fixture(
harness.build_Soma_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Clvleaf_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Clvleaf_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
dag_build = fixture(
harness.build_Tealeaf_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Pot3d_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Pot3d_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
dag_build = fixture(
harness.build_Clvleaf_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Hpgmgfv_Exa_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Hpgmgfv_Exa_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
dag_build = fixture(
harness.build_Pot3d_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
@rfm.simple_test
class Weather_t(BenchmarkBase):
num_nodes = 1
spechpc_binary = fixture(
harness.build_Weather_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)
dag_build = fixture(
harness.build_Hpgmgfv_Exa_t,
scope="environment",
variables={"spechpc_num_nodes": num_nodes},
)