9

Click here to load reader

Graph Partition 3

Embed Size (px)

DESCRIPTION

For graph partition algorithm used in kmetis and parmetis

Citation preview

Page 1: Graph Partition 3

Graph Partitioning

Mentor Rohit TalwarDr. Suresh Purini 201001003

Page 2: Graph Partition 3

Metis

● One of the fastest open source graph partitioners

● Different implementations avaliable -– Sequential

– Open MP

– MPI

● Highly optimized – multi level algorithm

Page 3: Graph Partition 3

Algorithm - KMetis

● Coarsening – simplifying the graph– Matching: Sorted Heavy Edge Matching applied to

match vertices to a resultant coarse vertice

– Contraction: Edges are collapsed

● Partitioning: Using KL method● Uncoarsening

– Projection: Recreating the bigger graph

– Refinement: Move border vertices to improve cutset

Page 4: Graph Partition 3

Parallelizing Kmetis using OpenMP

● Coarsening – 2 pass policy– 1st pass: Local unmatched vertices matched

– 2nd pass: Non local matchings pending on each thread's request buffer is accepted or rejected

● Partitioning – recursive k way bisection● Uncoarsening

– Projection: each thread wants to label vertices of bigger graph

– Refinement: Priority queue for each thread● Boundary vertices are divided amongst these threads● Verices are removed from the top of the queue and checked for gain in

cutset value – and are moved only when the weight criteria is adhered to

Page 5: Graph Partition 3

Sequential KL implementation

● An iteration consists of– Calculating D Values

● For each vertice check its adjacent vertices and calculate external edge and internal edge sum

– Sort D Values– Find next swaps

● Use sorted D values to obtain the next swap(a,b) ● Update D values – 1. Find edges connected to a and b by going

through their adjacency list● Update the D values for these vertices

– Maximize G value

Page 6: Graph Partition 3

Parallelizing using OpenMP

Show Code

Page 7: Graph Partition 3

Results

● Increased run time– OpenMP does not allow use of “break” statement

in its for loop constructs

– Hence most loops run completely leading to useless computations

– Presence of Synchronization points/critical sections

– Limited cores

Page 8: Graph Partition 3

Experimental Results

Graph Metis Sequential

N=58,348 ; M=20,16,578 0.320 s 67 mins

N=40,174 ; M=1,40,831 0.116 s 23 mins

N=32,212 ; M=3,00,801 0.220 s 44 mins

N=10,498 ; M=53,868 0.032 s 58 s

Page 9: Graph Partition 3

Thanks

Q&A