
neighbor pair (v
i
, v
j
) of v. (b) After this, A
e
collects the
local CN counts from all fragments, and computes their sum
for all vertex pairs (v
i
, v
j
). It returns the aggregate values
as the final result. One can verify that A
e
correctly returns
count CN(v
1
, v
3
) = 2 in the partition of Figure 1(a). Indeed,
CN(v
1
, v
3
) is set to be 1 after step (a) in each fragment, and
is then increased to 2 after the aggregation in step (b).
However, A
e
erroneously returns CN(v
1
, v
3
)=1 when it
runs on the vertex-cut partition of Figure 1(b). That is the
count in fragment F
v
2
due to the common neighbor v
4
. It
misses the common neighbor v
2
for v
1
and v
3
since the edge
(v
3
, v
2
) is missing for master vertex v
2
in fragment F
v
1
.
(2) Vertex-cut. Under vertex-cut, an algorithm A
v
works in
three steps. (a) It first computes the local count CN for each
master vertex v. (b) It then collects all incoming edges of
v from other fragments, and increases the CN counts using
these received edges. Denote by Γ
−
∆
(v) the set of incoming
neighbors of v adjacent to received edges. Then A
v
increases
CN(v
i
, v
j
) for each v
i
∈ Γ
−
(v) and v
j
∈ Γ
−
∆
(v), where
v
j
is a vertex on a received edge. Note that A
v
has all
incoming edges Γ
−
(v) of v after collecting edges from other
fragments. (c) Finally, it collects and aggregates local CN
counts from all fragments. One can verify that A
v
correctly
computes CN given the vertex-cut partition in Figure 1(b).
For instance, A
v
first increases the CN(v
1
, v
3
) in fragment
F
v
1
to 1, and then increases it to 2 after receiving (v
3
, v
2
).
In contrast, algorithm A
v
does not work correctly when
given the edge-cut partition of Figure 1(a). To see this,
observe that A
v
would return CN(v
1
, v
3
) = 4, which is
wrong. This is because there exist duplicated edges in the
edge-cut partition (e.g., (v
1
, v
4
) and (v
3
, v
2
) are in both F
e
1
and F
e
2
); after collecting such edges from other fragments,
A
v
counts CN(v
1
, v
3
) twice for each duplicated edge.
The problem with algorithm A
e
is that it assumes a
master vertex to have all its edges in its local fragment,
which is not true under vertex-cut. Algorithm A
v
gets
wrong answers on edge-cut partitions due to the duplicated
edges, which do not exist under vertex-cut partitions.
(3) Hybrid partition. For the same reason, neither algorithm
A
e
nor A
v
works under the hybrid partition (F
h
1
, F
h
2
) of
Figure 1(c). More specifically, master vertex v
4
in fragment
F
h
2
does not have all of its incident edges in F
h
2
, and edge
(v
3
, v
2
) replicates in F
h
1
and F
h
2
. As a result, A
e
finds
CN(v
1
, v
3
)=1, and A
v
gets CN(v
1
, v
3
)=3. None is correct. 2
This example gives rise to several questions. Is it possible
to make an algorithm A transparent to different partitions
of a graph G, i.e., it works correctly no matter how G is
partitioned? If so, we do not have to rewrite our algorithms
when, e.g., switching from edge-cut partitions to vertex-
cut; and better still, we can capitalize on the state-of-the-art
hybrid partitions to speed up graph computations. Another
question concerns under what conditions algorithms are
transparent to different partitions? Moreover, is it within the
reach in practice to develop transparent algorithms?
Contributions & organization. This paper aims to answer
the questions above, all in the affirmative. We consider
parallel graph-centric [23], [7] and vertex-centric [25], [36]
algorithms, which will be reviewed in Section 2.
(1) Partition transparency (Section 3). We introduce a notion
of partition transparency for parallel graph algorithms. A
partition-transparent algorithm A works correctly under both
edge-cut and vertex-cut without requiring any change to A.
Better yet, they work correctly under hybrid partitions, and
hence are able to reduce the cost of graph computations by
leveraging, e.g., application-driven partitions [20].
(2) Transparency conditions (Section 4). We identify conditions
for algorithm A to be guaranteed partition-transparent, i.e., A
works correctly under edge-cut, vertex-cut and hybrid par-
titions without requiring any change to A. We provide such
conditions for both graph-centric programs of GRAPE [23]
and vertex-centric GAS programs of PowerGraph [25].
(3) Transparent algorithms (Section 5). We show that partition-
transparent algorithms are within the reach of a variety of
problems, including common neighbor (CN), single source
shortest path (SSSP), weakly connected component (WCC),
PageRank (PR), strongly connected components (SCC), and
maximum cliques (MaxClique). We show that these algo-
rithms work correctly no matter what partitions are given.
(4) Experimental study (Section 6). Using real-life and syn-
thetic graphs, we verify the effectiveness and efficiency of
partition-transparent algorithms. We find the following. (a)
Transparent algorithms work correctly regardless of what
partitions are adopted, without changes, in both graph-
centric PIE mode and vertex-centric GAS model. (b) Trans-
parent algorithms A under hybrid partitions of [20] are
on average 2.3 times faster than non-transparent B under
vertex-cut or edge-cut, while B may not work correctly
under hybrid partitions. (c) Even when all algorithms run
under vertex-cut and edge-cut, transparent A performs
comparably to B developed for vertex-cut and edge-cut.
The performance gap is less than 5.8%. (d) Under hybrid
partitions, transparent algorithms scale well with both the
size of graphs and the number of processors used, e.g.,
transparent WCC and PR take on average 66.5s on graphs
of 500 million nodes and 6 billion edges with 90 processors.
Related work. This paper extends its conference version [20]
as follows. (1) While [20] targets hybrid partitioners, this
paper focuses on partition-transparent algorithms. We have
substantially reorganized and rewritten a large part of the
paper, from motivation and examples to technical discus-
sions (Sections 1–7). (2) We have provided a detailed anal-
ysis of partition transparency conditions for graph-centric
algorithms, from examples to proofs; we have also devel-
oped new transparency conditions for vertex-centric GAS
programs (Section 4). (3) We have developed new partition-
transparent algorithms as proof of concept (Section 5: SSSP,
WCC, SCC and MaxClique). (4) The experimental study
is almost entirely new, and evaluates partition-transparent
algorithms with more cases and datasets (Section 6).
We discuss the other related work as follows.
A host of graph partitioners have been developed for
edge-cut and vertex-cut (see [13], [10] for surveys). Edge-cut
(resp. vertex-cut) aims to (a) partition vertices (resp. edges)
into disjoint subsets of even sizes for load balancing, and
(b) reduce replicated edges (resp. vertices). Popular edge-
cut partitioners include exact algorithms [8], [32] such as
METIS [28], [29] and its parallel version ParMETIS [27], as
2
评论