-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCollectData2.py
27 lines (23 loc) · 1014 Bytes
/
CollectData2.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
import sveCacheSim as sim
import CacheModels
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pickle
from tqdm import tqdm
from pathlib import Path
model_name = {CacheModels.FixedHitRateSmartCache:'FR',
CacheModels.Markov4StateSmartCache: 'M4',
CacheModels.Markov8StateSmartCache: 'M8',
CacheModels.AllModelSmartCache: 'ALL'}
data = {}
for trace in ['pennant_small','pennant_medium','pennant_large','lulesh_small','lulesh_medium','lulesh_large']:
data[trace] = {}
for model in [CacheModels.FixedHitRateSmartCache,
CacheModels.Markov4StateSmartCache,
CacheModels.Markov8StateSmartCache,
CacheModels.AllModelSmartCache]:
data = {}
Path('touched/{}_{}.running'.format(trace, model_name[model])).touch()
data[trace][model_name[model]][i],_ = sim.simulation(model, trace_id=trace, show_summary=False)
sim.save_object(data, 'DataV2/pennant_and_lulesh_2.pkl')