-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
94 lines (71 loc) · 3.26 KB
/
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
#!/bin/bash
################## READ ARGS ###########################
FORMAT="./run.sh <type of executable to run> <N> <R> <k> <M or L> <probes>"
#Numbers of arguments has to be 3
#if [ "$#" -gt 6 ]; then
# echo $'\n'"Illegal number of parameters. They must at most 5" $'\n'
# echo "Format: $FORMAT" $'\n'
# exit -1
#fi
Exec_type=$1
if [ "$Exec_type" == "cluster_s_c" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_small_id -c ./data/cluster.config -o output_s_cl -complete -m Classic
elif [ "$Exec_type" == "cluster_b_c" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_b_id -c ./data/cluster.config -o output_b_cl -complete -m Classic
elif [ "$Exec_type" == "cluster_s_lsh" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_small_id -c ./data/cluster.config -o output_s_cl -complete -m LSH
elif [ "$Exec_type" == "cluster_b_lsh" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_b_id -c ./data/cluster.config -o output_b_cl -complete -m LSH
elif [ "$Exec_type" == "cluster_s_cube" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_small_id -c ./data/cluster.config -o output_s_cl -complete -m Hypercube
elif [ "$Exec_type" == "cluster_s_cube" ]; then
make target3
echo $'\n'"Running $1"$'\n'
./cluster -i ./data/input_b_id -c ./data/cluster.config -o output_b_cl -complete -m Hypercube
elif [ "$Exec_type" == "lsh_s_s" ]; then
make target1
echo $'\n'"Running $1 with $2, $3, $4, $5"$'\n'
./lsh -i ./data/input_small_id -q ./data/query_small_id -o output_s_s_cl -N $2 -L $5 -R $3 -k $4
elif [ "$Exec_type" == "lsh_s_b" ]; then
make target1
echo $'\n'"Running $1 with $2, $3, $4, $5"$'\n'
./lsh -i ./data/input_small_id -q ./data/query_b_id -o output_s_b_lsh -N $2 -L $5 -R $3 -k $4
elif [ "$Exec_type" == "lsh_b_s" ]; then
make target1
echo $'\n'"Running $1 with $2, $3, $4, $5"$'\n'
./lsh -i ./data/input_b_id -q ./data/query_small_id -o output_b_s_lsh -N $2 -L $5 -R $3 -k $4
elif [ "$Exec_type" == "lsh_b_b" ]; then
make target1
echo $'\n'"Running $1 with $2, $3, $4, $5"$'\n'
./lsh -i ./data/input_b_id -q ./data/query_b_id -o output_b_b_lsh -N $2 -L $5 -R $3 -k $4
elif [ "$Exec_type" == "cube_s_s" ]; then
make target2
echo $'\n'"Running $1 with $2, $3, $4, $5, $6"$'\n'
./cube -i ./data/input_small_id -q ./data/query_small_id -o output_s_s_cube -N $2 -R $3 -M $5 -probes $6 -k $4
elif [ "$Exec_type" == "cube_s_b" ]; then
make target2
echo $'\n'"Running $1 with $2, $3, $4, $5, $6"$'\n'
./cube -i ./data/input_small_id -q ./data/query_b_id -o output_s_b_cube -N $2 -R $3 -M $5 -probes $6 -k $4
elif [ "$Exec_type" == "cube_b_s" ]; then
make target2
echo $'\n'"Running $1 with $2, $3, $4, $5, $6"$'\n'
./cube -i ./data/input_b_id -q ./data/query_small_id -o output_b_s_cube -N $2 -R $3 -M $5 -probes $6 -k $4
elif [ "$Exec_type" == "cube_b_b" ]; then
make target2
echo $'\n'"Running $1 with $2, $3, $4, $5, $6"$'\n'
./cube -i ./data/input_b_id -q ./data/query_b_id -o output_b_b_cube -N $2 -R $3 -M $5 -probes $6 -k $4
else
echo $'\n'"Illegal type of executable. They must at most 5" $'\n'
echo "Format: $FORMAT" $'\n'
exit -1
fi