Distributed memory

connected component labeling

Definition

  • Given an undirected graph G = (V, E) with n = |V|, m= |E|

  • purpose: Find connected component and each vertex's label

  • Array of tuple<p, q, u>, notion as A(i), p and q will change in each iteration

  • Bucket, notion as B(i)(p), means a tuple which first item is p

  • Candidates, notion as C(i)(p), means a tuple which second item is p

  • Minium candidate, motion min(p), means a tuple in candidates with minium first item

Sequential algorithm

  • Init:
    for each vertex u add tuple <u, u, u>
    for each edge {u, v} add tuple <u, v, u>
    and <v, u, v>

  • Each iteration
    for every p, find min(p), update all tuple <p, q> in b(i)(p) with <q, min(p)>

  • Terminate statement
    The first and second item in tuple is same

Parallel algorithm

  • Data Distribution                                       each process has their own A(i)/p

  • Parallel sort

  • Bucket update
    Find min(p), with parallel, the bucket might cross process, the code use mpi_exscan to reduce the complex from O(n) to O(logn)

Scalability

  • With vertex = 100000                               np = 1,  8485(ms)
    np = 4, 5144(ms)
    np = 9, 3732(ms)
    np = 16, 4120(ms)
    np = 64, 10119(ms)

  • With vertex = 1000000
    np = 1, 855927(ms)
    np = 4, 533112(ms)
    np = 9, 380247(ms)
    np = 16, 396492(ms)

TODO

  • Evaluate cuda                                        

  • Understand parconnect library usage
Made with Slides.com