Par$$oning & Clustering Big Graphs George Karypis - - PowerPoint PPT Presentation

par oning clustering big graphs
SMART_READER_LITE
LIVE PREVIEW

Par$$oning & Clustering Big Graphs George Karypis - - PowerPoint PPT Presentation

U NIVERSITY OF M INNESOTA , D EPARTMENT OF C OMPUTER S CIENCE & E NGINEERING Par$$oning & Clustering Big Graphs George Karypis Department of Computer Science &


slide-1
SLIDE 1

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Par$$oning ¡& ¡Clustering ¡Big ¡Graphs ¡

George ¡Karypis ¡ Department ¡of ¡Computer ¡Science ¡& ¡Engineering ¡ Twin ¡CiFes ¡ University ¡of ¡Minnesota ¡

Thursday, ¡May ¡23, ¡13 ¡ 1 ¡

slide-2
SLIDE 2

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Overview ¡

Overview ¡of ¡graph ¡parFFoning ¡ The ¡mulFlevel ¡paradigm ¡ METIS ¡family ¡of ¡parFFoning ¡tools ¡ MulF-­‑threaded ¡algorithms ¡for ¡parFFoning ¡& ¡clustering ¡ Closing ¡remarks ¡

Thursday, ¡May ¡23, ¡13 ¡ 2 ¡

slide-3
SLIDE 3

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

5/23/13 ¡ 3 ¡

Standard ¡graph ¡par$$oning ¡problem ¡

Given a graph G=(V, E) we want to partition it into k parts such that:

each part has roughly the same number of vertices

and

the edges that straddle partitions (edge-cut) is minimized

Applications

Parallel & distributed

computing

Scientific computing VLSI physical design Data-mining Storage and placement ...

It ¡is ¡NP-­‑hard. ¡ ¡HeurisFc ¡algorithms ¡are ¡used! ¡

slide-4
SLIDE 4

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Overview ¡of ¡the ¡mul$level ¡graph ¡par$$oning ¡paradigm ¡

Thursday, ¡May ¡23, ¡13 ¡ 4 ¡

slide-5
SLIDE 5

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Coarsening ¡Phase ¡

Successive ¡coarse ¡graphs ¡are ¡constructed ¡by ¡compuFng ¡a ¡matching ¡

  • f ¡the ¡edges, ¡and ¡collapsing ¡together ¡the ¡verFces ¡incident ¡on ¡these ¡
  • edges. ¡

5/23/13 ¡ 5 ¡

1 1

2

2 3 4 1 4 2 3 1 2 1 3 1 1 3 1 1 [2] Total Edge-Weight: 37 Total Edge-Weight: 21 1 1

2

2 3 4 1 4 2 3 1 2 1 3 1 1 3 1 1 1 4 2 5 3 5 1 [2] [2] [2] [2]

Heavy-Edge Matching

slide-6
SLIDE 6

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Refinement ¡Phase ¡

The ¡refinement ¡is ¡performed ¡by ¡using ¡move-­‑based ¡approaches, ¡ based ¡on ¡the ¡algorithm ¡by ¡Fiduccia-­‑MaXheyses ¡(FM). ¡

5/23/13 ¡ 6 ¡

Partition i Partition j

2 2 1 1 3 3 ID[v] = 4, ED[v] = 8, Gain[v] = ED[v] - ID[v] = 4 v

Partition i Partition j

2 2 1 1 3 3 v Edgecut = 8 Edgecut = 4

slide-7
SLIDE 7

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Why ¡does ¡the ¡mul$level ¡par$$oning ¡paradigm ¡work? ¡

The ¡coarsening ¡phase ¡by ¡hiding ¡a ¡large ¡fracFon ¡of ¡the ¡edges, ¡

makes ¡the ¡parFFoning ¡problem ¡easier. ¡

Performing ¡refinement ¡at ¡successive ¡finer ¡graphs, ¡enhances ¡the ¡

effecFveness ¡of ¡refinement ¡algorithms. ¡

MulF-­‑scale ¡refinement ¡

5/23/13 ¡ 7 ¡

1 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1 3 3 1 1 3 3

After Coarsening

slide-8
SLIDE 8

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

When ¡does ¡the ¡mul$level ¡paradigm ¡have ¡difficul$es? ¡

The ¡value ¡of ¡the ¡objecFve ¡funcFon ¡in ¡the ¡original ¡graph ¡cannot ¡be ¡

(Fghtly) ¡upper ¡bounded ¡while ¡operaFng ¡on ¡a ¡coarser ¡graph. ¡

We ¡cannot ¡ensure ¡improvements ¡at ¡a ¡coarse ¡graph ¡lead ¡to ¡

improvements ¡in ¡the ¡original ¡graph. ¡

Coarsening ¡fails ¡to ¡make ¡the ¡opFmizaFon ¡problem ¡easier ¡in ¡

coarser ¡graphs. ¡

It ¡is ¡not ¡“in ¡tune” ¡with ¡the ¡objecFve. ¡

¡

Coarsening ¡fails ¡to ¡reduce ¡the ¡size ¡of ¡the ¡problem ¡(|V|+|E|). ¡

Can ¡increase ¡the ¡runFme/memory ¡requirements. ¡

The ¡objecFve ¡funcFon ¡is ¡based ¡on ¡global ¡properFes ¡of ¡the ¡graph. ¡

Can ¡substanFally ¡increase ¡the ¡refinement ¡Fme. ¡

Thursday, ¡May ¡23, ¡13 ¡ 8 ¡

slide-9
SLIDE 9

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

METIS, ¡ParMETIS, ¡& ¡hMETIS ¡

Sogware ¡packages ¡for ¡parFFoning ¡

unstructured ¡graphs ¡and ¡ hypergraphs ¡and ¡compuFng ¡fill ¡ reducing ¡orderings. ¡

METIS ¡was ¡released ¡in ¡1995 ¡

(current ¡version ¡5.x). ¡

  • ParMETIS ¡was ¡released ¡in ¡1997 ¡

(current ¡version ¡4.x). ¡

  • hMETIS ¡was ¡released ¡in ¡1998 ¡

(current ¡version ¡2.x) ¡

They ¡are ¡freely ¡distributed ¡and ¡

widely ¡used. ¡

5/23/13 ¡ 9 ¡

slide-10
SLIDE 10

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Beyond ¡the ¡tradi$onal ¡par$$oning ¡problem ¡(1) ¡

Vertex ¡separators ¡

ParFFon ¡the ¡graph ¡by ¡removing ¡a ¡minimum ¡set ¡of ¡verFces. ¡ Broad ¡applicaFons ¡to: ¡

matrix ¡reordering ¡for ¡direct ¡solvers ¡ concurrency ¡extracFon ¡by ¡decoupling ¡computaFons ¡at ¡each ¡parFFon ¡

  • verlapping ¡clustering ¡soluFons ¡

Thursday, ¡May ¡23, ¡13 ¡ 10 ¡

slide-11
SLIDE 11

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Beyond ¡the ¡tradi$onal ¡par$$oning ¡problem ¡(2) ¡

Constraints ¡

MulFple ¡balancing ¡constraints ¡

balance ¡load ¡& ¡memory ¡requirements, ¡ ¡ balance ¡the ¡different ¡types ¡of ¡modules ¡that ¡are ¡assigned ¡to ¡each ¡chip ¡in ¡a ¡

mulF-­‑chip ¡FPGA ¡design, ¡ ¡

balance ¡incoming ¡& ¡outgoing ¡messages, ¡ ¡ balance ¡iteraFve ¡& ¡direct ¡solvers, ¡etc. ¡

ConnecFvity ¡constraints ¡

ensure ¡that ¡the ¡graph ¡induced ¡by ¡the ¡verFces ¡of ¡each ¡parFFon ¡is ¡

  • connected. ¡

Placement ¡constraints ¡

ensure ¡that ¡certain ¡verFces ¡are ¡placed ¡in ¡different ¡and/or ¡the ¡same ¡

  • parFFons. ¡

No ¡constraints ¡

ObjecFve ¡driven ¡parFFoning. ¡

Thursday, ¡May ¡23, ¡13 ¡ 11 ¡

slide-12
SLIDE 12

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Beyond ¡the ¡tradi$onal ¡par$$oning ¡problem ¡(3) ¡

ObjecFves ¡

CommunicaFon ¡volume ¡ Subdomain ¡connecFvity ¡ RedistribuFon ¡overhead ¡ MulFple ¡edge-­‑defined ¡cost ¡funcFons ¡ Path-­‑based ¡objecFves ¡

Fming ¡consideraFons ¡in ¡VLSI ¡circuits ¡

Clustering ¡objecFves ¡ ¡

normalized ¡cut, ¡raFo ¡cut, ¡min-­‑max, ¡modularity, ¡… ¡[CLUTO] ¡

Various ¡combinaFons ¡of ¡the ¡above ¡

Thursday, ¡May ¡23, ¡13 ¡ 12 ¡

slide-13
SLIDE 13

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Some ¡performance ¡numbers ¡

Thursday, ¡May ¡23, ¡13 ¡ 13 ¡

Intel(R) ¡Xeon(R) ¡CPU ¡E5-­‑2670 ¡@ ¡2.60GHz, ¡128GB ¡

slide-14
SLIDE 14

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡ UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

IMPROVING ¡SINGLE ¡NODE ¡ PERFORMANCE ¡

Thursday, ¡May ¡23, ¡13 ¡ 14 ¡

slide-15
SLIDE 15

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Mul$-­‑threaded ¡graph ¡par$$oning/clustering ¡

OpportuniFes: ¡

MulF-­‑core ¡processors ¡have ¡become ¡ubiquitous. ¡ Their ¡cache-­‑coherent ¡shared-­‑memory ¡architecture ¡makes ¡it ¡easier ¡to ¡

develop ¡parallel ¡programs ¡

Challenges: ¡

Non-­‑uniform ¡access ¡to ¡shared ¡memory. ¡ Many ¡applicaFons ¡are ¡bound ¡by ¡memory ¡bandwidth. ¡ Limited ¡memory ¡per ¡core. ¡

Thursday, ¡May ¡23, ¡13 ¡ 15 ¡

slide-16
SLIDE 16

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Kme$s ¡– ¡Serial ¡algorithm ¡

Graph ¡is ¡stored ¡in ¡CSR ¡format. ¡ Coarsening: ¡

Matches ¡connected ¡pairs ¡of ¡verFces ¡for ¡contracFon. ¡ VerFces ¡are ¡matched ¡in ¡ascending ¡order ¡of ¡degree. ¡ Edges ¡prioriFzed ¡for ¡collapsing ¡by ¡edge ¡weight. ¡

IniFal ¡parFFoning: ¡

The ¡best ¡of ¡several ¡parFFonings ¡generated ¡via ¡recursive ¡bisecFon ¡is ¡

  • chosen. ¡

Uncoarsening: ¡

ProjecFon ¡of ¡the ¡parFFoning. ¡ Greedy ¡k-­‑way ¡refinement ¡using ¡only ¡boundary ¡verFces. ¡

Thursday, ¡May ¡23, ¡13 ¡ 16 ¡

slide-17
SLIDE 17

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Parallel ¡matching ¡approaches ¡

Thursday, ¡May ¡23, ¡13 ¡ 17 ¡

Fine-­‑grain ¡matching ¡

Lock ¡the ¡vertex ¡and ¡

prospecFve ¡verFces ¡to ¡match ¡

  • with. ¡

MulF-­‑pass ¡matching ¡

First ¡pass ¡to ¡generate ¡match ¡

  • requests. ¡

Second ¡pass ¡to ¡grant ¡or ¡deny ¡

match ¡requests. ¡

Unprotected ¡matching ¡

Allow ¡threads ¡to ¡modify ¡the ¡

matching ¡without ¡any ¡locking. ¡

Fix ¡broken ¡matches ¡ager ¡

matches ¡are ¡selected. ¡

slide-18
SLIDE 18

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Parallel ¡refinement ¡approaches ¡

Fine-­‑grain ¡approach ¡

Locks ¡to ¡and ¡from ¡parFFons ¡along ¡

with ¡neighbor ¡verFces. ¡

Coarse-­‑grain ¡approach ¡

Each ¡thread ¡moves ¡up ¡to ¡c ¡verFces. ¡ PotenFal ¡parFFon ¡weights ¡are ¡

  • communicated. ¡

Moves ¡are ¡discarded ¡unFl ¡a ¡

balanced ¡parFFoning ¡would ¡result. ¡

Vertex ¡book-­‑keeping ¡informaFon ¡

and ¡parFFon ¡weights ¡are ¡updated. ¡

Repeat ¡unFl ¡all ¡of ¡the ¡priority ¡

queues ¡are ¡empty. ¡

Thursday, ¡May ¡23, ¡13 ¡ 18 ¡

slide-19
SLIDE 19

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Thread ¡life$mes ¡and ¡data ¡ownership ¡

Thursday, ¡May ¡23, ¡13 ¡ 19 ¡

slide-20
SLIDE 20

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Overall ¡performance ¡– ¡Mean ¡speedup ¡over ¡kme$s ¡

Thursday, ¡May ¡23, ¡13 ¡ 20 ¡

slide-21
SLIDE 21

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Memory ¡usage ¡

Thursday, ¡May ¡23, ¡13 ¡ 21 ¡

slide-22
SLIDE 22

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Graph ¡clustering ¡

Goal: ¡

Develop ¡a ¡mulF-­‑threaded ¡mulF-­‑level ¡modularity ¡maximizaFon ¡graph ¡

clustering ¡algorithm. ¡

Key ¡differences/contribuFons ¡

No ¡need ¡to ¡worry ¡about ¡balance ¡constraints. ¡ Focus ¡on ¡coarsening ¡heurisFcs ¡that ¡are ¡suited ¡for ¡“big ¡data” ¡types ¡of ¡

  • graphs. ¡

First-­‑choice ¡& ¡two-­‑hop ¡matching. ¡

The ¡objecFve ¡is ¡not ¡locally ¡defined. ¡

Focus ¡on ¡“cauFously” ¡opFmisFc ¡heurisFcs ¡with ¡frequent ¡global ¡updates. ¡

AutomaFcally ¡determine ¡the ¡right ¡number ¡of ¡clusters ¡during ¡iniFal ¡

  • clustering. ¡

Thursday, ¡May ¡23, ¡13 ¡ 22 ¡

slide-23
SLIDE 23

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Some ¡results ¡

Thursday, ¡May ¡23, ¡13 ¡ 23 ¡

slide-24
SLIDE 24

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Scaling ¡results ¡

Thursday, ¡May ¡23, ¡13 ¡ 24 ¡

slide-25
SLIDE 25

UNIVERSITY ¡OF ¡MINNESOTA, ¡DEPARTMENT ¡OF ¡COMPUTER ¡SCIENCE ¡& ¡ENGINEERING ¡

Final ¡words ¡

Lessons ¡from ¡mt-­‑meFs/mt-­‑cluster ¡

The ¡shared ¡memory ¡opportunity ¡

Explicit ¡shared ¡memory ¡programing ¡leads ¡to ¡reduced ¡overheads. ¡ Reduced ¡memory ¡foot-­‑print. ¡

Data ¡locality ¡is ¡sFll ¡important. ¡ ¡ SynchronizaFon ¡should ¡be ¡avoided. ¡ ¡ Lessons ¡learned ¡from ¡MP ¡algorithms ¡are ¡sFll ¡valid! ¡

Thank ¡you. ¡

hXp://www.cs.umn.edu/~meFs ¡

¡ ¡ ¡

Thursday, ¡May ¡23, ¡13 ¡ 25 ¡