-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdebug.sh
executable file
·153 lines (141 loc) · 3.71 KB
/
debug.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
#!/bin/bash
#############################
###### DATA PARAMETERS ######
#############################
START_N=$((1*1024*1024))
END_N=$((1*1024*1024))
DIMS=8
#Top-K Range in power of 2 (i.e. KKS = 16 , KKS = 128 .. k=16,32,64,128)
KKS=128
KKE=128
#LD 0:load from file, 1: generate in memory, 2: Load real data (set REAL_DATA_PATH)
LD=1
#distr c:correlated i:independent a:anticorrelated
distr=i
#randdataset3: higher precission , randdataset: lower precission
script=randdataset
######################
### DO NOT CHANGE ###
DSTR=0
if [ $distr == "c" ]
then
DSTR=0
elif [ $distr == "i" ]
then
DSTR=1
elif [ $distr == "a" ]
then
DSTR=2
else
echo "DSTR not valid option!!!!"
exit
fi
######################
#REAL DATA PARAMETERS
REAL_DATA_PATH=data/real/weather/wtuples_261552285_8
#REAL_DATA_PATH=data/real/higgs/h_11000000_5
#REAL_DATA_N=$START_N
REAL_DATA_N=$(echo $REAL_DATA_PATH| cut -d'_' -f 2)
#REAL_DATA_N=256000000
REAL_DATA_D=$(echo $REAL_DATA_PATH| cut -d'_' -f 3)
#echo "REAL_DATA: "$REAL_DATA_N","$REAL_DATA_D
#exit 1
if [ $LD -eq 2 ]
then
DIMS=$REAL_DATA_D
fi
###################################
###### EXPERIMENT PARAMETERS ######
###################################
#CPU:0,GPU:1
device=0
#QM 0:Reverse query attribute, 1:Forward query attributes
QM=0
#QD Dimension interval for testing
QD=1
#IMP 0:Scalar, 1:SIMD, 2:Threads, 3:Multiple Queries (Random), 4: Multiple Queries (Same dimension)
IMP=1
#ITER Testing iterations
ITER=10
#Multiple Thread Count
MQTHREADS=16
#Gather object evaluation statistics
STATS_EFF=false
#Choose workload for multi-query evaluation
WORKLOAD=$((1024*128))
if [ ! -z $1 ]
then
MQTHREADS=$1
fi
######CHOOSE CPU ALGORITHM######
#TA Benchmark
TA_B=0
#TPAc Benchmark
TPAc_B=0
#TPAr Benchmark
TPAr_B=0
#VTA Benhmark
VTA_B=0
#PTA Benchmark
PTA_B=0
#SLA Benchmark
SLA_B=0
#####################################################################################
####################################
###### COMPILATION PARAMETERS ######
####################################
if [ $device -eq 0 ]
then
make cpu_cc DIMS=$DIMS QM=$QM QD=$QD IMP=$IMP ITER=$ITER LD=$LD DISTR=$DSTR TA_B=$TA_B TPAc_B=$TPAc_B TPAr_B=$TPAr_B VTA_B=$VTA_B PTA_B=$PTA_B SLA_B=$SLA_B KKS=$KKS KKE=$KKE MQTHREADS=$MQTHREADS STATS_EFF=$STATS_EFF WORKLOAD=$WORKLOAD
else
make gpu_cc DIMS=$DIMS QM=$QM QD=$QD IMP=$IMP ITER=$ITER LD=$LD DISTR=$DSTR KKS=$KKS KKE=$KKE STATS_EFF=$STATS_EFF WORKLOAD=$WORKLOAD
fi
#################################################################################
#############################################
###### EXPERIMENT EXECUTION PARAMETERS ######
#############################################
if [ $LD -eq 2 ]
then
echo "<--------------USING REAL DATA PATH----------------->"
if [ $device -eq 0 ]
then
echo "./cpu_run -f=$REAL_DATA_PATH -n=$REAL_DATA_N -d=$DIMS"
./cpu_run -f=$REAL_DATA_PATH -n=$REAL_DATA_N -d=$DIMS
else
./gpu_run -f=$REAL_DATA_PATH -n=$REAL_DATA_N -d=$DIMS
fi
echo "<--------------------------------------------------->"
if [ $? -eq 1 ]
then
echo "error occured!!!"
exit
fi
else
for (( n=$START_N; n<=$END_N; n*=2 ))
do
fname='d_'$n'_'$DIMS'_'$distr
#echo "Processing ... "$fname
if [ ! -f data/$fname ] && [ $LD -eq 0 ]
then
echo "Creating file <"$fname">"
cd data/; python skydata.py $n $DIMS $distr $script; cd ..
#cd data/; time python rand.py $n $d $distr; cd ..
fi
if [ $device -eq 0 ]
then
echo "./cpu_run -f=data/$fname -n=$n -d=$DIMS"
./cpu_run -f=data/$fname -n=$n -d=$DIMS
else
#nvprof ./gpu_run -f=data/$fname -n=$n -d=$DIMS
./gpu_run -f=data/$fname -n=$n -d=$DIMS
fi
if [ $? -eq 1 ]
then
echo "error occured!!!"
exit
fi
sleep 1
#rm -rf data/$fname
#echo "<--------------------------------------------------->"
done
fi