Skip to content

Commit 31c7b76

Browse files
committed
update workload exp with lock-free design seq no problem
1 parent 685d1a0 commit 31c7b76

20 files changed

+120
-5
lines changed

pSCAN-refactor/Graph.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ void Graph::CheckCoreFirstBSP(int u) {
126126
auto ed = degree[u] - 1;
127127
for (auto edge_idx = out_edge_start[u]; edge_idx < out_edge_start[u + 1]; edge_idx++) {
128128
auto v = out_edges[edge_idx];
129+
// be careful, the next line can only be commented when memory load/store of min_cn is atomic, no torned
129130
// if (u <= v) {
130131
if (min_cn[edge_idx] == DIRECT_REACHABLE) {
131132
++sd;

pSCAN-refactor/experimental/GraphParallelExp.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ void GraphParallelExp::CheckCoreFirstBSP(int u) {
127127
auto ed = degree[u] - 1;
128128
for (auto edge_idx = out_edge_start[u]; edge_idx < out_edge_start[u + 1]; edge_idx++) {
129129
auto v = out_edges[edge_idx];
130+
// be careful, the next line can only be commented when memory load/store of min_cn is atomic
130131
// if (u <= v) {
131132
if (min_cn[edge_idx] == DIRECT_REACHABLE) {
132133
++sd;

python_experiments/ReadMe.md

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ category | detail
3333
workload: prune/eval, serial-runtime experiment | see [case-study1](case_studies/figures-case-study1), parameter setting: `min_pts:5`
3434
workload: avg cmp/eval portion experiment | see [case-study4](case_studies/case-study4-workload), varying `min_pts` and varying `eps`
3535
work-efficient: prune/eval, serial-runtime experiment | see [case-study5](case_studies/figures-case-study5-workload-efficient), parameter setting: `min_pts:5`
36+
work-efficient-opt: with lock-free opt | see [case-study7](case_studies/figures-case-study7-workload-efficient-1), parameter setting: `min_pts:5`
3637

3738
### Synthetic Graphs
3839

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
## small_snap_dblp
2+
3+
workload | runtime
4+
--- | ---
5+
![small_snap_dblp-workload](../../figures/workload-efficient/small_snap_dblp-min_pts:5-workload.png) | ![small_snap_dblp-runtime](../../figures/workload-efficient/small_snap_dblp-min_pts:5-runtime.png)
6+
7+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
8+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
9+
prune0 definitely not reachable | 0.000 | 0.012 | 0.069 | 0.162 | 0.266 | 0.390 | 0.509 | 0.648 | 0.784
10+
prune1 definitely reachable | 0.717 | 0.396 | 0.194 | 0.103 | 0.051 | 0.017 | 0.004 | 0.002 | 0.000
11+
max eval number | 0.283 | 0.592 | 0.737 | 0.735 | 0.683 | 0.593 | 0.487 | 0.350 | 0.216
12+
pscan eval number | 0.037 | 0.369 | 0.618 | 0.610 | 0.496 | 0.352 | 0.230 | 0.123 | 0.051
13+
pscan+ eval number | 0.022 | 0.271 | 0.522 | 0.574 | 0.512 | 0.382 | 0.251 | 0.126 | 0.049
14+
serial pscan runtime | 0.306 | 0.505 | 0.527 | 0.514 | 0.434 | 0.331 | 0.259 | 0.180 | 0.119
15+
serial pscan+ runtime | 0.283 | 0.408 | 0.425 | 0.478 | 0.407 | 0.316 | 0.238 | 0.170 | 0.118
16+
17+
## snap_pokec
18+
19+
workload | runtime
20+
--- | ---
21+
![snap_pokec-workload](../../figures/workload-efficient/snap_pokec-min_pts:5-workload.png) | ![snap_pokec-runtime](../../figures/workload-efficient/snap_pokec-min_pts:5-runtime.png)
22+
23+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
24+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
25+
prune0 definitely not reachable | 0.004 | 0.021 | 0.061 | 0.131 | 0.233 | 0.370 | 0.525 | 0.689 | 0.850
26+
prune1 definitely reachable | 0.172 | 0.048 | 0.018 | 0.008 | 0.004 | 0.002 | 0.001 | 0.001 | 0.000
27+
max eval number | 0.824 | 0.931 | 0.921 | 0.861 | 0.763 | 0.628 | 0.473 | 0.310 | 0.150
28+
pscan eval number | 0.380 | 0.855 | 0.852 | 0.778 | 0.678 | 0.544 | 0.391 | 0.232 | 0.085
29+
pscan+ eval number | 0.288 | 0.813 | 0.849 | 0.769 | 0.666 | 0.533 | 0.383 | 0.228 | 0.082
30+
serial pscan runtime | 6.989 | 9.878 | 8.915 | 6.763 | 5.459 | 4.166 | 3.090 | 2.250 | 1.193
31+
serial pscan+ runtime | 4.130 | 7.190 | 6.538 | 5.479 | 4.331 | 3.402 | 2.704 | 1.835 | 1.112
32+
33+
## snap_livejournal
34+
35+
workload | runtime
36+
--- | ---
37+
![snap_livejournal-workload](../../figures/workload-efficient/snap_livejournal-min_pts:5-workload.png) | ![snap_livejournal-runtime](../../figures/workload-efficient/snap_livejournal-min_pts:5-runtime.png)
38+
39+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
40+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
41+
prune0 definitely not reachable | 0.006 | 0.036 | 0.097 | 0.186 | 0.295 | 0.426 | 0.564 | 0.706 | 0.849
42+
prune1 definitely reachable | 0.206 | 0.069 | 0.029 | 0.014 | 0.007 | 0.003 | 0.002 | 0.001 | 0.000
43+
max eval number | 0.787 | 0.895 | 0.874 | 0.800 | 0.698 | 0.571 | 0.435 | 0.293 | 0.151
44+
pscan eval number | 0.261 | 0.643 | 0.724 | 0.676 | 0.576 | 0.450 | 0.320 | 0.192 | 0.076
45+
pscan+ eval number | 0.181 | 0.532 | 0.667 | 0.660 | 0.567 | 0.440 | 0.309 | 0.183 | 0.071
46+
serial pscan runtime | 15.982 | 25.711 | 21.763 | 20.215 | 14.263 | 10.534 | 7.401 | 4.757 | 2.673
47+
serial pscan+ runtime | 8.506 | 16.089 | 15.146 | 13.209 | 10.256 | 7.488 | 5.686 | 3.653 | 2.349
48+
49+
## snap_orkut
50+
51+
workload | runtime
52+
--- | ---
53+
![snap_orkut-workload](../../figures/workload-efficient/snap_orkut-min_pts:5-workload.png) | ![snap_orkut-runtime](../../figures/workload-efficient/snap_orkut-min_pts:5-runtime.png)
54+
55+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
56+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
57+
prune0 definitely not reachable | 0.010 | 0.034 | 0.072 | 0.135 | 0.227 | 0.350 | 0.497 | 0.661 | 0.831
58+
prune1 definitely reachable | 0.009 | 0.001 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
59+
max eval number | 0.980 | 0.965 | 0.928 | 0.865 | 0.773 | 0.650 | 0.503 | 0.339 | 0.169
60+
pscan eval number | 0.495 | 0.727 | 0.826 | 0.822 | 0.746 | 0.626 | 0.478 | 0.313 | 0.142
61+
pscan+ eval number | 0.393 | 0.647 | 0.791 | 0.817 | 0.744 | 0.623 | 0.475 | 0.311 | 0.141
62+
serial pscan runtime | 149.107 | 179.498 | 164.427 | 136.258 | 104.682 | 74.619 | 48.308 | 28.063 | 12.605
63+
serial pscan+ runtime | 78.271 | 118.644 | 114.779 | 98.592 | 75.726 | 53.074 | 34.172 | 18.950 | 8.745
64+
65+
## webgraph_uk
66+
67+
workload | runtime
68+
--- | ---
69+
![webgraph_uk-workload](../../figures/workload-efficient/webgraph_uk-min_pts:5-workload.png) | ![webgraph_uk-runtime](../../figures/workload-efficient/webgraph_uk-min_pts:5-runtime.png)
70+
71+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
72+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
73+
prune0 definitely not reachable | 0.064 | 0.272 | 0.449 | 0.558 | 0.631 | 0.690 | 0.738 | 0.785 | 0.833
74+
prune1 definitely reachable | 0.144 | 0.064 | 0.033 | 0.020 | 0.012 | 0.005 | 0.003 | 0.002 | 0.000
75+
max eval number | 0.792 | 0.665 | 0.517 | 0.422 | 0.358 | 0.305 | 0.259 | 0.213 | 0.166
76+
pscan eval number | 0.217 | 0.261 | 0.244 | 0.212 | 0.177 | 0.145 | 0.118 | 0.090 | 0.063
77+
pscan+ eval number | 0.197 | 0.233 | 0.218 | 0.190 | 0.161 | 0.133 | 0.109 | 0.081 | 0.055
78+
serial pscan runtime | 36.675 | 25.829 | 18.340 | 14.287 | 11.631 | 9.756 | 8.257 | 6.805 | 5.674
79+
serial pscan+ runtime | 19.005 | 15.004 | 11.943 | 10.146 | 9.307 | 7.928 | 7.123 | 6.587 | 5.816
80+
81+
## webgraph_webbase
82+
83+
workload | runtime
84+
--- | ---
85+
![webgraph_webbase-workload](../../figures/workload-efficient/webgraph_webbase-min_pts:5-workload.png) | ![webgraph_webbase-runtime](../../figures/workload-efficient/webgraph_webbase-min_pts:5-runtime.png)
86+
87+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
88+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
89+
prune0 definitely not reachable | 0.080 | 0.265 | 0.388 | 0.482 | 0.555 | 0.625 | 0.684 | 0.751 | 0.813
90+
prune1 definitely reachable | 0.294 | 0.155 | 0.088 | 0.054 | 0.033 | 0.014 | 0.008 | 0.005 | 0.001
91+
max eval number | 0.626 | 0.581 | 0.524 | 0.463 | 0.412 | 0.361 | 0.308 | 0.244 | 0.186
92+
pscan eval number | 0.220 | 0.281 | 0.287 | 0.256 | 0.215 | 0.170 | 0.135 | 0.097 | 0.065
93+
pscan+ eval number | 0.205 | 0.255 | 0.264 | 0.238 | 0.206 | 0.166 | 0.132 | 0.093 | 0.059
94+
serial pscan runtime | 128.419 | 82.260 | 63.901 | 53.046 | 44.723 | 37.384 | 31.637 | 25.309 | 20.048
95+
serial pscan+ runtime | 71.797 | 53.503 | 45.087 | 40.442 | 35.339 | 30.933 | 27.487 | 23.294 | 19.387
96+
97+
## 10million_avgdeg15_maxdeg50_Cdefault
98+
99+
workload | runtime
100+
--- | ---
101+
![10million_avgdeg15_maxdeg50_Cdefault-workload](../../figures/workload-efficient/10million_avgdeg15_maxdeg50_Cdefault-min_pts:5-workload.png) | ![10million_avgdeg15_maxdeg50_Cdefault-runtime](../../figures/workload-efficient/10million_avgdeg15_maxdeg50_Cdefault-min_pts:5-runtime.png)
102+
103+
tag | eps-0.1 | eps-0.2 | eps-0.3 | eps-0.4 | eps-0.5 | eps-0.6 | eps-0.7 | eps-0.8 | eps-0.9
104+
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
105+
prune0 definitely not reachable | 0.000 | 0.000 | 0.000 | 0.002 | 0.102 | 0.270 | 0.457 | 0.637 | 0.817
106+
prune1 definitely reachable | 0.562 | 0.032 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000
107+
max eval number | 0.438 | 0.968 | 1.000 | 0.998 | 0.898 | 0.730 | 0.543 | 0.363 | 0.183
108+
pscan eval number | 0.057 | 0.471 | 0.519 | 0.553 | 0.596 | 0.569 | 0.417 | 0.225 | 0.055
109+
pscan+ eval number | 0.032 | 0.388 | 0.481 | 0.516 | 0.564 | 0.545 | 0.385 | 0.206 | 0.048
110+
serial pscan runtime | 19.917 | 29.848 | 31.716 | 33.129 | 32.616 | 28.250 | 20.718 | 12.590 | 5.752
111+
serial pscan+ runtime | 9.940 | 17.988 | 21.716 | 23.136 | 22.888 | 19.462 | 14.021 | 8.983 | 4.021
112+
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

python_experiments/run_workload_experiment.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
parameter_min_pts_lst = [5]
1313

1414
# data_set_lst = ['small_snap_dblp']
15-
# parameter_eps_lst = [float(i + 1) / 10 for i in xrange(9)]
15+
parameter_eps_lst = [float(i + 1) / 10 for i in xrange(9)]
1616
# parameter_min_pts_lst = [2, 5, 10, 15]
1717

1818
data_set_lst = map(lambda name: os.pardir + os.sep + 'dataset' + os.sep + name, data_set_lst)
@@ -30,7 +30,7 @@
3030
data_set_name = data_set_path.split(os.sep)[-1]
3131
statistics_dir = os.sep.join(
3232
map(str,
33-
['.', 'workload-work-efficient', data_set_name, 'eps-' + str(eps), 'min_pts-' + str(min_pts)]))
33+
['.', 'workload-work-efficient-1', data_set_name, 'eps-' + str(eps), 'min_pts-' + str(min_pts)]))
3434
os.system('mkdir -p ' + statistics_dir)
3535
statistics_file_path = statistics_dir + os.sep + '-'.join(
3636
map(str, ['output', data_set_name, eps, min_pts])) + '.txt'

python_experiments/workload_figure.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,16 @@ def get_link():
217217

218218

219219
if __name__ == '__main__':
220-
server_folder = '/mnt/mount-gpu/d2/yche/projects/python_experiments/workload-work-efficient'
220+
server_folder = '/mnt/mount-gpu/d2/yche/projects/python_experiments/workload-work-efficient-1'
221221
local_folder = './figures/' + 'workload-efficient'
222-
markdown_folder = 'case_studies/figures-case-study5-workload-efficient'
222+
markdown_folder = 'case_studies/figures-case-study7-workload-efficient-1'
223223
os.system('mkdir -p ' + local_folder)
224224
os.system('mkdir -p ' + markdown_folder)
225225

226226
data_set_lst = ['small_snap_dblp',
227227
'snap_pokec', 'snap_livejournal', 'snap_orkut',
228228
'webgraph_uk', 'webgraph_webbase',
229-
'webgraph_twitter', 'snap_friendster',
229+
# 'webgraph_twitter', 'snap_friendster',
230230
'10million_avgdeg15_maxdeg50_Cdefault'
231231
]
232232

0 commit comments

Comments
 (0)