-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_run.sh
102 lines (88 loc) · 2.64 KB
/
main_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
datasets=(
"./datasets/coauth-MAG-History-full.hyp"
)
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release
cmake --build ./build
for datasets in "${datasets[@]}"
do
./build/HypergraphKCore "${datasets}" org
# You can sort the dataset to achieve better performance, this may effect the performance of filter strategy
./build/HypergraphKCore "${datasets}" sortEV desc asc
echo "------------"
done
# for Figure 4,5,6,8
echo "----------------memory, init time, exec time----------------"
algorithms=(0 1 2 3 4 5)
it=5
for datasets in "${datasets[@]}"
do
for algo in "${algorithms[@]}"
do
sorted_dataset="${datasets}_sorted_by_edge_desc_node_asc.txt"
/usr/bin/time -v ./build/HypergraphKCore ${sorted_dataset} ${algo} ${it}
echo "------------"
done
done
# for Figure 7
echo "----------------get node change in each iteration----------------"
algorithms=(0 1 2)
it=5
for datasets in "${datasets[@]}"
do
for algo in "${algorithms[@]}"
do
sorted_dataset="${datasets}_sorted_by_edge_desc_node_asc.txt"
./build/HypergraphKCore ${sorted_dataset} ${algo} ${it} "--info"
echo "------------"
done
done
# for Figure 10
echo "----------------Very Edge for Scalability----------------"
veryed=("_E_0.2.txt" "_E_0.4.txt" "_E_0.6.txt" "_E_0.8.txt")
for dataset in "${datasets[@]}"
do
sorted_dataset="${dataset}_sorted_by_edge_desc_node_asc.txt"
./build/HypergraphKCore ${sorted_dataset} "varyE"
echo "------------"
done
for dataset in "${datasets[@]}"
do
sorted_dataset="${dataset}_sorted_by_edge_desc_node_asc.txt"
for very in "${veryed[@]}"
do
veryed_dataset="${sorted_dataset}${very}"
./build/HypergraphKCore ${veryed_dataset} "org"
./build/HypergraphKCore ${veryed_dataset} "sortEV" "desc" "asc"
mv ${veryed_dataset}_sorted_by_edge_desc_node_asc.txt ${veryed_dataset}
echo "------------"
done
done
#
for dataset in "${datasets[@]}"
do
sorted_dataset="${dataset}_sorted_by_edge_desc_node_asc.txt"
for very in "${veryed[@]}"
do
veryed_dataset="${sorted_dataset}${very}"
./build/HypergraphKCore ${veryed_dataset} 0
echo "------------"
done
done
# for Figure 11
echo "----------------Parallel----------------"
threads=(1 2 4 8 16 32 64)
it=1
for i in $(seq 1 $it)
do
echo "Iteration $i"
for dataset in "${datasets[@]}"
do
for thread in "${threads[@]}"
do
sorted_dataset="${dataset}_sorted_by_edge_desc_node_asc.txt"
./build/HypergraphKCore ${sorted_dataset} 10 ${thread}
echo "------------"
done
done
done
echo "Done!"