-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfigure3_run.sh
executable file
·109 lines (95 loc) · 2.67 KB
/
figure3_run.sh
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
#!/bin/bash
source thread.conf
MAX_SKIPPED_LP_list="1000000"
LP_list="4096" #number of lps
TEST_list="pcs" #test
RUN_list="1 2 3 4 5"
ENFORCE_LOCALITY_list="0 1"
TA_CHANGE_list="300"
TA_DURATION_list="120"
TA_list="0.24"
LOOKAHEAD_list="0"
WINDOW_list="0.1 0.2 0.4 0.8 1.6 3.2"
CURRENT_BINDING_SIZE="1 2 4 8"
EVICTED_BINDING_SIZE="1 2 4 8"
CKP_PER_list="20"
MAX_RETRY="10"
TEST_DURATION="30"
BEGIN="BEGIN TEST:.............$(date +%d)/$(date +%m)/$(date +%Y) - $(date +%H):$(date +%M)"
CURRT="CURRENT TEST STARTED AT $(date +%d)/$(date +%m)/$(date +%Y) - $(date +%H):$(date +%M)"
FOLDER="results/pcs_static_win"
mkdir -p ${FOLDER}
#for max_lp in $MAX_SKIPPED_LP_list
#do
#for ck in $CKP_PER_list
#do
#for pub in $PUB_list
#do
#for epb in $EPB_list
#do
for cbs in $CURRENT_BINDING_SIZE
do
for ebs in $EVICTED_BINDING_SIZE
do
for w in $WINDOW_list
do
for tav in $TA_list
do
for tad in $TA_DURATION_list
do
for tac in $TA_CHANGE_list
do
for test in $TEST_list
do
for df in $ENFORCE_LOCALITY_list
do
make $test ENFORCE_LOCALITY=$df ENABLE_DYNAMIC_SIZING_FOR_LOC_ENF=0 START_WINDOW=$w TA_CHANGE=$tac TA_DURATION=$tad TA=$tav CURRENT_BINDING_SIZE=$cbs EVICTED_BINDING_SIZE=$ebs
if [ $df = "0" ]; then
if [ "$w" = "0.1" ]; then
echo OK
else
echo skip null test
continue
fi
if [ "$ebs" = "1" ]; then echo OK
else echo skip null test; continue
fi
if [ "$cbs" = "1" ]; then echo OK
else echo skip null test; continue
fi
fi
for run in $RUN_list
do
for lp in $LP_list
do
for th in $MAX_THREADS
do
EX1="./${test} $th $lp ${TEST_DURATION}"
FILE1="${FOLDER}/${test}_el_${df}-w_${w}-cbs_${cbs}-ebs_${ebs}-ta_${tav}-tad_${tad}-tac_${tac}_th_${th}-lp_${lp}-run_${run}.dat"
touch ${FILE1}
#echo $FILE1
#$EX1 > $FILE1
N=0
while [[ $(grep -c "Simulation ended" $FILE1) -eq 0 ]]
do
echo $BEGIN
echo "CURRENT TEST STARTED AT $(date +%d)/$(date +%m)/$(date +%Y) - $(date +%H):$(date +%M)"
echo $FILE1
{ timeout $((TEST_DURATION*2)) $EX1; } &> $FILE1
if test $N -ge $MAX_RETRY ; then echo break; break; fi
N=$(( N+1 ))
done
done
done
done
done
done
done
done
done
done
done
done
#done
#done
#done