-
Notifications
You must be signed in to change notification settings - Fork 0
/
genrunsp.py
405 lines (350 loc) · 22.1 KB
/
genrunsp.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
import yaml
import os
import random
from argparse import ArgumentParser
import itertools
import random
BASH_HEADER = "#!/bin/bash\n"
# the command line slurm will execute
SBATCH_COMMAND_LINE = "\
sbatch --cpus-per-task=1 --nodes=1 --ntasks=1 \
--chdir={ramulator_dir} \
--output={output_file_name} \
--error={error_file_name} \
--partition=cpu_part \
--job-name='{job_name}' \
{ramulator_dir}/run_scripts/{config_name}{config_extension}-{workload}.sh"
# the script executed by the command line slurm executes
BASE_COMMAND_LINE = "\
LD_LIBRARY_PATH=/mnt/panzer/aolgun/EXT_LIBS \
{ramulator_dir}/ramulator "
# nRH sweep all mechanisms
configs = [
## DEFAULT CoMeT CONFIGURATIONS ACROSS nRH VALUES (k=3) ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT500-4-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT250-4-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-128.yaml",
## SENSITIVITY ANALYSIS nHASH and nCOUNTERS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-1-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-1-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-1-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-1-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-1-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-2-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-2-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-2-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-2-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-2-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-8-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-8-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-8-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-8-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-8-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-16-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-16-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-16-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-16-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-16-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-1-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-1-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-1-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-1-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-1-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-2-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-2-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-2-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-2-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-2-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-8-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-8-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-8-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-8-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-8-2048-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-16-128-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-16-256-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-16-512-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-16-1024-128.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-16-2048-128.yaml",
## SENSITIVITY ANALYSIS nRAT_ENTRIES ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-32.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-64.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-256.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT125-4-512-512.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-512-32.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-512-64.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-512-256.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT1000-4-512-512.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT500-4-512-32.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT500-4-512-64.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT500-4-512-256.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT500-4-512-512.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT250-4-512-32.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT250-4-512-64.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT250-4-512-256.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT/CoMeT250-4-512-512.yaml",
## COMPARISON POINTS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Baseline.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Graphene1000.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Graphene500.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Graphene250.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Graphene125.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Hydra1000.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Hydra500.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Hydra250.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/Hydra125.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/PARA1000.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/PARA500.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/PARA250.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/PARA125.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/REGA1000.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/REGA500.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/REGA250.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/Others/REGA125.yaml",
## K=1 EXPERIMENTS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT1000-1.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT500-1.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT250-1.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT125-1.yaml",
## K=2 EXPERIMENTS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT1000-2.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT125-2.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT250-2.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT500-2.yaml"
## DEFAULT -- K=3 EXPERIMENTS ##
"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT1000-3.yaml",
"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT125-3.yaml",
"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT250-3.yaml",
"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT500-3.yaml",
## K=4 EXPERIMENTS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT1000-4.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT125-4.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT250-4.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT500-4.yaml",
## K=5 EXPERIMENTS ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT125-5.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT250-5.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT500-5.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/CoMeT-k/CoMeT1000-5.yaml",
## EARLY REFRESH ##
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/EarlyRefresh/CoMeT1000-3-m25.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/EarlyRefresh/CoMeT500-3-m25.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/EarlyRefresh/CoMeT250-3-m25.yaml",
#"/mnt/panzer/fatmab/cms-ramulator/configs/ArtifactEvaluation/EarlyRefresh/CoMeT125-3-m25.yaml",
]
multicore = False # SET ME FALSE FOR SINGLE CORE!!!!
traces = [
"401.bzip2",
"403.gcc",
"429.mcf",
"433.milc",
"434.zeusmp",
"435.gromacs",
"436.cactusADM",
"437.leslie3d",
"444.namd",
"445.gobmk",
"447.dealII",
"450.soplex",
"456.hmmer",
"458.sjeng",
"459.GemsFDTD",
"462.libquantum",
"464.h264ref",
"470.lbm",
"471.omnetpp",
"473.astar",
"481.wrf",
"482.sphinx3",
"483.xalancbmk",
"500.perlbench",
"502.gcc",
"505.mcf",
"507.cactuBSSN",
"508.namd",
"510.parest",
"511.povray",
"519.lbm",
"520.omnetpp",
"523.xalancbmk",
"525.x264",
"526.blender",
"531.deepsjeng",
"538.imagick",
"541.leela",
"544.nab",
"549.fotonik3d",
"557.xz",
"bfs_dblp",
"bfs_cm2003",
"bfs_ny",
"grep_map0",
"h264_decode",
"h264_encode",
"jp2_decode",
"jp2_encode",
"tpcc64",
"tpch17",
"tpch2",
"tpch6",
"wc_8443", # wordcount-8443
"wc_map0", # wordcount-map0
"ycsb_abgsave",
"ycsb_aserver",
"ycsb_bserver",
"ycsb_cserver",
"ycsb_dserver",
"ycsb_eserver"
]
LOW_RBMPKI = ['531.deepsjeng', '502.gcc', '541.leela', '435.gromacs', '481.wrf', '458.sjeng', '445.gobmk', '444.namd', '508.namd', '401.bzip2', '456.hmmer', '403.gcc', '464.h264ref', '526.blender', '447.dealII', '544.nab', '523.xalancbmk', '500.perlbench', '538.imagick', '525.x264', '507.cactuBSSN', '511.povray']
MED_RBMPKI = ['462.libquantum', '473.astar', '510.parest', '482.sphinx3', '505.mcf', '557.xz', '471.omnetpp', '483.xalancbmk', '436.cactusADM']
HIGH_RBMPKI = ['520.omnetpp', '450.soplex', '470.lbm', '519.lbm', '434.zeusmp', '433.milc', '459.GemsFDTD', '549.fotonik3d', '429.mcf', '437.leslie3d']
if (multicore):
traces = [
"401.bzip2-401.bzip2-401.bzip2-401.bzip2-401.bzip2-401.bzip2-401.bzip2-401.bzip2",
"403.gcc-403.gcc-403.gcc-403.gcc-403.gcc-403.gcc-403.gcc-403.gcc",
"429.mcf-429.mcf-429.mcf-429.mcf-429.mcf-429.mcf-429.mcf-429.mcf",
"433.milc-433.milc-433.milc-433.milc-433.milc-433.milc-433.milc-433.milc",
"434.zeusmp-434.zeusmp-434.zeusmp-434.zeusmp-434.zeusmp-434.zeusmp-434.zeusmp-434.zeusmp",
"435.gromacs-435.gromacs-435.gromacs-435.gromacs-435.gromacs-435.gromacs-435.gromacs-435.gromacs",
"436.cactusADM-436.cactusADM-436.cactusADM-436.cactusADM-436.cactusADM-436.cactusADM-436.cactusADM-436.cactusADM",
"437.leslie3d-437.leslie3d-437.leslie3d-437.leslie3d-437.leslie3d-437.leslie3d-437.leslie3d-437.leslie3d",
"444.namd-444.namd-444.namd-444.namd-444.namd-444.namd-444.namd-444.namd",
"445.gobmk-445.gobmk-445.gobmk-445.gobmk-445.gobmk-445.gobmk-445.gobmk-445.gobmk",
"447.dealII-447.dealII-447.dealII-447.dealII-447.dealII-447.dealII-447.dealII-447.dealII",
"450.soplex-450.soplex-450.soplex-450.soplex-450.soplex-450.soplex-450.soplex-450.soplex",
"456.hmmer-456.hmmer-456.hmmer-456.hmmer-456.hmmer-456.hmmer-456.hmmer-456.hmmer",
"458.sjeng-458.sjeng-458.sjeng-458.sjeng-458.sjeng-458.sjeng-458.sjeng-458.sjeng",
"459.GemsFDTD-459.GemsFDTD-459.GemsFDTD-459.GemsFDTD-459.GemsFDTD-459.GemsFDTD-459.GemsFDTD-459.GemsFDTD",
"462.libquantum-462.libquantum-462.libquantum-462.libquantum-462.libquantum-462.libquantum-462.libquantum-462.libquantum",
"464.h264ref-464.h264ref-464.h264ref-464.h264ref-464.h264ref-464.h264ref-464.h264ref-464.h264ref",
"470.lbm-470.lbm-470.lbm-470.lbm-470.lbm-470.lbm-470.lbm-470.lbm",
"471.omnetpp-471.omnetpp-471.omnetpp-471.omnetpp-471.omnetpp-471.omnetpp-471.omnetpp-471.omnetpp",
"473.astar-473.astar-473.astar-473.astar-473.astar-473.astar-473.astar-473.astar",
"481.wrf-481.wrf-481.wrf-481.wrf-481.wrf-481.wrf-481.wrf-481.wrf",
"482.sphinx3-482.sphinx3-482.sphinx3-482.sphinx3-482.sphinx3-482.sphinx3-482.sphinx3-482.sphinx3",
"483.xalancbmk-483.xalancbmk-483.xalancbmk-483.xalancbmk-483.xalancbmk-483.xalancbmk-483.xalancbmk-483.xalancbmk",
"500.perlbench-500.perlbench-500.perlbench-500.perlbench-500.perlbench-500.perlbench-500.perlbench-500.perlbench",
"502.gcc-502.gcc-502.gcc-502.gcc-502.gcc-502.gcc-502.gcc-502.gcc",
"505.mcf-505.mcf-505.mcf-505.mcf-505.mcf-505.mcf-505.mcf-505.mcf",
"507.cactuBSSN-507.cactuBSSN-507.cactuBSSN-507.cactuBSSN-507.cactuBSSN-507.cactuBSSN-507.cactuBSSN-507.cactuBSSN",
"508.namd-508.namd-508.namd-508.namd-508.namd-508.namd-508.namd-508.namd",
"510.parest-510.parest-510.parest-510.parest-510.parest-510.parest-510.parest-510.parest",
"511.povray-511.povray-511.povray-511.povray-511.povray-511.povray-511.povray-511.povray",
"519.lbm-519.lbm-519.lbm-519.lbm-519.lbm-519.lbm-519.lbm-519.lbm",
"520.omnetpp-520.omnetpp-520.omnetpp-520.omnetpp-520.omnetpp-520.omnetpp-520.omnetpp-520.omnetpp",
"523.xalancbmk-523.xalancbmk-523.xalancbmk-523.xalancbmk-523.xalancbmk-523.xalancbmk-523.xalancbmk-523.xalancbmk",
"525.x264-525.x264-525.x264-525.x264-525.x264-525.x264-525.x264-525.x264",
"526.blender-526.blender-526.blender-526.blender-526.blender-526.blender-526.blender-526.blender",
"531.deepsjeng-531.deepsjeng-531.deepsjeng-531.deepsjeng-531.deepsjeng-531.deepsjeng-531.deepsjeng-531.deepsjeng",
"538.imagick-538.imagick-538.imagick-538.imagick-538.imagick-538.imagick-538.imagick-538.imagick",
"541.leela-541.leela-541.leela-541.leela-541.leela-541.leela-541.leela-541.leela",
"544.nab-544.nab-544.nab-544.nab-544.nab-544.nab-544.nab-544.nab",
"549.fotonik3d-549.fotonik3d-549.fotonik3d-549.fotonik3d-549.fotonik3d-549.fotonik3d-549.fotonik3d-549.fotonik3d",
"557.xz-557.xz-557.xz-557.xz-557.xz-557.xz-557.xz-557.xz",
"bfs_dblp-bfs_dblp-bfs_dblp-bfs_dblp-bfs_dblp-bfs_dblp-bfs_dblp-bfs_dblp",
"bfs_cm2003-bfs_cm2003-bfs_cm2003-bfs_cm2003-bfs_cm2003-bfs_cm2003-bfs_cm2003-bfs_cm2003",
"bfs_ny-bfs_ny-bfs_ny-bfs_ny-bfs_ny-bfs_ny-bfs_ny-bfs_ny",
"grep_map0-grep_map0-grep_map0-grep_map0-grep_map0-grep_map0-grep_map0-grep_map0",
"h264_decode-h264_decode-h264_decode-h264_decode-h264_decode-h264_decode-h264_decode-h264_decode",
"h264_encode-h264_encode-h264_encode-h264_encode-h264_encode-h264_encode-h264_encode-h264_encode",
"jp2_decode-jp2_decode-jp2_decode-jp2_decode-jp2_decode-jp2_decode-jp2_decode-jp2_decode",
"jp2_encode-jp2_encode-jp2_encode-jp2_encode-jp2_encode-jp2_encode-jp2_encode-jp2_encode",
"tpcc64-tpcc64-tpcc64-tpcc64-tpcc64-tpcc64-tpcc64-tpcc64",
"tpch17-tpch17-tpch17-tpch17-tpch17-tpch17-tpch17-tpch17",
"tpch2-tpch2-tpch2-tpch2-tpch2-tpch2-tpch2-tpch2",
"tpch6-tpch6-tpch6-tpch6-tpch6-tpch6-tpch6-tpch6",
"wc_8443-wc_8443-wc_8443-wc_8443-wc_8443-wc_8443-wc_8443-wc_8443",
"wc_map0-wc_map0-wc_map0-wc_map0-wc_map0-wc_map0-wc_map0-wc_map0",
"ycsb_abgsave-ycsb_abgsave-ycsb_abgsave-ycsb_abgsave-ycsb_abgsave-ycsb_abgsave-ycsb_abgsave-ycsb_abgsave",
"ycsb_aserver-ycsb_aserver-ycsb_aserver-ycsb_aserver-ycsb_aserver-ycsb_aserver-ycsb_aserver-ycsb_aserver",
"ycsb_bserver-ycsb_bserver-ycsb_bserver-ycsb_bserver-ycsb_bserver-ycsb_bserver-ycsb_bserver-ycsb_bserver",
"ycsb_cserver-ycsb_cserver-ycsb_cserver-ycsb_cserver-ycsb_cserver-ycsb_cserver-ycsb_cserver-ycsb_cserver",
"ycsb_dserver-ycsb_dserver-ycsb_dserver-ycsb_dserver-ycsb_dserver-ycsb_dserver-ycsb_dserver-ycsb_dserver",
"ycsb_eserver-ycsb_eserver-ycsb_eserver-ycsb_eserver-ycsb_eserver-ycsb_eserver-ycsb_eserver-ycsb_eserver"
]
# @returns SBATCH command used to invoke the ramulator script
def generateExecutionSetup(ramulator_dir, output_dir, trace_dir, config, workload_name_list):
CMD = BASE_COMMAND_LINE.format(
ramulator_dir = ramulator_dir,
)
ramulator_config=None
with open(config) as f:
ramulator_config = yaml.load(f, Loader=yaml.FullLoader)
bare_config = config.split('/')[-1]
workload_name_list_dir = [(trace_dir + "/" + x) for x in workload_name_list]
ramulator_config["processor"]["trace"] = workload_name_list_dir
if (not multicore):
ramulator_config["processor"]["cache"]["L3"]["capacity"] = "8MB"
else:
ramulator_config["processor"]["cache"]["L3"]["capacity"] = str(int(len(workload_name_list_dir) * 2)) + "MB"
# ramulator_config["memory"]["translation"]["type"] = "None"
SBATCH_CMD = SBATCH_COMMAND_LINE.format(
ramulator_dir = ramulator_dir,
output_file_name = '{output_file_name}',
error_file_name = '{error_file_name}',
config_extension = '',
job_name = '{job_name}',
config_name = bare_config,
workload = '{workload}'
)
prog_list = ""
length = len(workload_name_list)
for j in range(length-1):
prog_list += workload_name_list[j] + '-'
prog_list += workload_name_list[length-1]
stats_prefix = output_dir + '/' + bare_config + '/' + prog_list + '/'
ramulator_config["stats"]["prefix"] = stats_prefix
activate_dump_file_name = output_dir + '/' + bare_config + '/' + prog_list + '/activate_commands.txt'
period_dump_file_name = output_dir + '/' + bare_config + '/' + prog_list + '/activate_periods.txt'
ramulator_config["memory"]["controller"]["activation_count_dump_file"] = activate_dump_file_name
if "refresh_based_defense" in ramulator_config["post_warmup_settings"]["memory"]["controller"]:
ramulator_config["post_warmup_settings"]["memory"]["controller"]["refresh_based_defense"]["activation_period_file_name"] = period_dump_file_name
#ramulator_config["post_warmup_settings"]["memory"]["controller"]["refresh_based_defense"]["debug"] = True
# Finalize CMD
CMD += "\"" + yaml.dump(ramulator_config) + "\""
SBATCH_CMD = SBATCH_CMD.format(
output_file_name = output_dir + '/' + bare_config + '/' + prog_list + '/output.txt',
error_file_name = output_dir + '/' + bare_config + '/' + prog_list + '/error.txt',
job_name = prog_list,
workload = prog_list
)
os.system('mkdir -p ' + output_dir + '/' + bare_config + '/' + prog_list)
f = open(ramulator_dir + '/run_scripts/' + bare_config + '-' + prog_list + '.sh', 'w')
f.write(BASH_HEADER)
f.write(CMD)
f.close()
return SBATCH_CMD
ramulator_dir = '/mnt/panzer/fatmab/cms-ramulator'
output_dir = '/mnt/panzer/fatmab/cms-ramulator/ae-results'
trace_dir = '/mnt/panzer/fatmab/cms-ramulator/cputraces'
# remove scripts
os.system('rm -r ' + ramulator_dir + '/run_scripts')
os.system('mkdir -p ' + output_dir)
os.system('mkdir -p ' + ramulator_dir + '/run_scripts')
all_sbatch_commands = []
all_sbatch_commands.append(BASH_HEADER)
for config in configs:
os.system('mkdir -p ' + output_dir + '/' + config.split('/')[-1])
for trace in traces:
newlist = trace.split('-')
# check if output_dir/config/trace/DDR4stats.stats is empty
# if not, then skip
if not os.path.exists(output_dir + '/' + config.split('/')[-1] + '/' + trace + '/DDR4stats.stats'):
all_sbatch_commands.append(generateExecutionSetup(ramulator_dir, output_dir, trace_dir, config, newlist))
elif os.path.getsize(output_dir + '/' + config.split('/')[-1] + '/' + trace + '/DDR4stats.stats') == 0:
all_sbatch_commands.append(generateExecutionSetup(ramulator_dir, output_dir, trace_dir, config, newlist))
else:
continue
with open('run.sh', 'w') as f:
f.write('\n'.join(all_sbatch_commands))
os.system('chmod uog+x run.sh')