-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathloop2.sh
296 lines (236 loc) · 10.9 KB
/
loop2.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
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
# #!/bin/bash
# # Define paths and scripts
# c_file="/data/mettas/Join-Game/src/backend/executor/nodeNestloop.c"
# exec_file="/data/mettas/Join-Game/src/include/nodes/execnodes.h"
# #algorithm paths
# ripple_c="/data/mettas/Join-Game/Scripts/nodeNestloop(RippleJoin) - Copy.c"
# ripple_exec="/data/mettas/Join-Game/Scripts/execnodes(RippleJoin) - Copy.h"
# orl_c="/data/mettas/Join-Game/Scripts/nodeNestloop(OnlineRipple) - Copy.c"
# orl_exec="/data/mettas/Join-Game/Scripts/execnodes(OnlineRipple) - Copy.h"
# osl_c="/data/mettas/Join-Game/Scripts/nodeNestloop(ImprovedOSL) - Copy.c"
# osl_exec="/data/mettas/Join-Game/Scripts/execnodes(ImprovedOSL) - Copy.h"
# cl_c="/data/mettas/Join-Game/Scripts/nodeNestloop(CL) - Copy.c"
# cl_exec="/data/mettas/Join-Game/Scripts/execnodes(CL) - Copy.h"
# icl_c="/data/mettas/Join-Game/Scripts/nodeNestloop(ImprovedICL) - Copy.c"
# icl_exec="/data/mettas/Join-Game/Scripts/execnodes(ImprovedICL) - Copy.h"
# nestloop_c="/data/mettas/Join-Game/Scripts/nodeNestloop_original - Copy.c"
# nestloop_exec="/data/mettas/Join-Game/Scripts/execnodes_original - Copy.h"
# # Loop through each algorithm
# cars_script_osl="python similarity_Cars.py full_similarity sum_similarity osl"
# wdc_script_osl="python similarity_WDC.py full_similarity sum_similarity osl"
# cars_script_cl="python similarity_Cars.py full_similarity sum_similarity cl"
# wdc_script_cl="python similarity_WDC.py full_similarity sum_similarity cl"
# cars_script_icl="python similarity_Cars.py full_similarity sum_similarity icl"
# wdc_script_icl="python similarity_WDC.py full_similarity sum_similarity icl"
# cars_script_ripple="python similarity_Cars.py full_similarity sum_similarity ripple"
# wdc_script_ripple="python similarity_WDC.py full_similarity sum_similarity ripple"
# cars_script_orl="python similarity_Cars.py full_similarity sum_similarity orl"
# wdc_script_orl="python similarity_WDC.py full_similarity sum_similarity orl"
# movies_script_osl="python similarity_movies.py full_similarity sum_similarity osl"
# movies_script_cl="python similarity_movies.py full_similarity sum_similarity cl"
# movies_script_icl="python similarity_movies.py full_similarity sum_similarity icl"
# movies_script_ripple="python similarity_movies.py full_similarity sum_similarity ripple"
# movies_script_orl="python similarity_movies.py full_similarity sum_similarity orl"
# similarity_script_osl="python similarity_averager.py osl"
# similarity_script_cl="python similarity_averager.py cl"
# similarity_script_ripple="python similarity_averager.py ripple"
# similarity_script_icl="python similarity_averager.py icl"
# similarity_script_orl="python similarity_averager.py orl"
# #OSL, CL and ICL for Cars
# M=472
# cp "$osl_c" "$c_file"
# cp "$osl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $cars_script_osl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$cl_c" "$c_file"
# cp "$cl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $cars_script_cl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$icl_c" "$c_file"
# cp "$icl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $cars_script_icl
# else
# echo "Compilation failed for M=$M"
# fi
# #OSL, CL and ICL for WDC
# M=2069
# cp "$osl_c" "$c_file"
# cp "$osl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $wdc_script_osl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$cl_c" "$c_file"
# cp "$cl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $wdc_script_cl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$icl_c" "$c_file"
# cp "$icl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $wdc_script_icl
# else
# echo "Compilation failed for M=$M"
# fi
# #Ripple and ORL for Cars
# M=27171
# cp "$ripple_c" "$c_file"
# cp "$ripple_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $cars_script_ripple
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$orl_c" "$c_file"
# cp "$orl_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $cars_script_orl
# else
# echo "Compilation failed for M=$M"
# fi
# # #Ripple and ORL for WDC
# M=100728
# cp "$ripple_c" "$c_file"
# cp "$ripple_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $wdc_script_ripple
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$orl_c" "$c_file"
# cp "$orl_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $wdc_script_orl
# else
# echo "Compilation failed for M=$M"
# fi
# # #OSL, ICL, CL for Movies dataset
# M=1508
# cp "$osl_c" "$c_file"
# cp "$osl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $movies_script_osl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$cl_c" "$c_file"
# cp "$cl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $movies_script_cl
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$icl_c" "$c_file"
# cp "$icl_exec" "$exec_file"
# sed -i "s/^#define MUST_EXPLORE_TUPLE_COUNT_N .*/#define MUST_EXPLORE_TUPLE_COUNT_N $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $movies_script_icl
# else
# echo "Compilation failed for M=$M"
# fi
# #Ripple and ORL for Movies dataset
# M=34063
# cp "$ripple_c" "$c_file"
# cp "$ripple_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $movies_script_ripple
# else
# echo "Compilation failed for M=$M"
# fi
# cp "$orl_c" "$c_file"
# cp "$orl_exec" "$exec_file"
# sed -i "s/^#define MEMORY_MAX .*/#define MEMORY_MAX $M/" "$c_file"
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile stop
# make; make install
# /data/mettas/executables/bin/pg_ctl -D /data/mettas/Join-Game/DemoDir -o "-p 1997" -l logfile start
# if [ $? -eq 0 ]; then
# echo "Compilation successful, running Python script with M=$M"
# $movies_script_orl
# else
# echo "Compilation failed for M=$M"
# fi
# $similarity_script_osl
# $similarity_script_ripple
# $similarity_script_cl
# $similarity_script_icl
# $similarity_script_orl
python3 queryRunner.py