-
Notifications
You must be signed in to change notification settings - Fork 2
/
batch-ic2.sh
executable file
·198 lines (145 loc) · 4.72 KB
/
batch-ic2.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
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
#!/bin/bash -x
set -e
WORDCOUNT_RANGE=$(seq 20 38)
TERASORT_RANGE=$(seq 30 36)
PAGERANK_RANGE=$(seq 15 24)
RUN_RANGE=$(seq 1 1)
RUN_SPARK=("$HOME/thrill/run/slurm/invoke.sh" "setup-slurm/run-spark.sh")
RUN_FLINK=("$HOME/thrill/run/slurm/invoke.sh" "setup-slurm/run-flink.sh")
wordcount_prepare() {
[ -z $RANGE ] && RANGE=$WORDCOUNT_RANGE
for scale in $RANGE; do
SCALE=$scale ./workloads/wordcount/prepare/prepare.sh
done
}
pagerank_prepare() {
[ -z $RANGE ] && RANGE=$PAGERANK_RANGE
for scale in $RANGE; do
SCALE=$scale ./workloads/pagerank/prepare/prepare.sh
done
}
terasort_prepare() {
[ -z $RANGE ] && RANGE=$TERASORT_RANGE
for scale in $RANGE; do
SCALE=$scale ./workloads/terasort/prepare/prepare.sh
done
}
################################################################################
function log2 {
local x=0
for ((y=$1 - 1; $y > 0; y >>= 1)); do
let x=$x+1
done
echo $x
}
function log2hosts {
echo $(log2 $SLURM_NNODES)
}
################################################################################
wordcount_scale() {
s=$(log2hosts)
WEAKSCALE=$((35 + s))
export BENCHMARK=wordcount
SCALE=$WEAKSCALE ./workloads/wordcount/prepare/prepare.sh
set +e
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/wordcount/spark_scala/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/wordcount/spark_java/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
./workloads/wordcount/flink_scala/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
./workloads/wordcount/flink_java/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run \
./workloads/wordcount/thrill/bin/run.sh
done
set -e
rm -rvf $WORK/HiBench/Wordcount/$SCALE
}
################################################################################
pagerank_scale() {
s=$(log2hosts)
WEAKSCALE=$((22 + s))
export BENCHMARK=pagerank
SCALE=$WEAKSCALE ./workloads/pagerank/prepare/prepare.sh
set +e
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/pagerank/spark_scala/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/pagerank/spark_java/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
./workloads/pagerank/flink_scala/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
./workloads/pagerank/flink_java/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run \
./workloads/pagerank/thrill/bin/run.sh
done
set -e
rm -rvf $WORK/HiBench/Pagerank/$SCALE
}
################################################################################
terasort_scale() {
s=$(log2hosts)
WEAKSCALE=$((34 + s))
export BENCHMARK=terasort
SCALE=$WEAKSCALE ./workloads/terasort/prepare/prepare.sh
set +e
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/terasort/spark_java/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/terasort/spark_scala/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_FLINK[@]} \
./workloads/terasort/flink_scala/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run \
./workloads/terasort/thrill/bin/run.sh
done
set -e
rm -rvf $WORK/HiBench/Terasort/$SCALE
}
################################################################################
kmeans_scale() {
s=$(log2hosts)
WEAKSCALE=$((24 + s))
export BENCHMARK=kmeans
SCALE=$WEAKSCALE ./workloads/kmeans/prepare/prepare.sh
set +e
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/kmeans/spark_java/bin/run.sh
SCALE=$WEAKSCALE RUN=$run ${RUN_SPARK[@]} \
./workloads/kmeans/spark_scala/bin/run.sh
done
for run in $RUN_RANGE; do
SCALE=$WEAKSCALE RUN=$run \
./workloads/kmeans/thrill/bin/run.sh
done
set -e
rm -rvf $WORK/HiBench/Kmeans/$SCALE
}
################################################################################
all_scale() {
wordcount_scale
pagerank_scale
terasort_scale
kmeans_scale
}
################################################################################
for p in $@; do
$p
done
################################################################################