1 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Institute for Theoretical Computer Science, Algorithmics II
Engineering Multilevel Graph PartitioningAlgorithmsPeter Sanders, Christian Schulz
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Overview
2 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
IntroductionMultilevel AlgorithmsLocal Improvement using FlowsMore Localized SearchGlobal SearchExperimental EvaluationFuture Work
Simulation - FEM
3 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Simulation space isdiscretized into a meshSolution of partitial differentialequations are approximatedby linear equationsNumber of vertices canbecome quite large→ timeand memoryParallel processing required
The Common Parallel Approach
4 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Mesh partitioned via dual graph1. Each volume (data, calculation) is
represented by a vertex2. Interdependencies are represented by
edges
All PE’s get same amount of workCommunication is expensive
Graph Partitioning Problem:Partition a graph into (almost) equally sized blocks, such that thenumber of edges connecting vertices from different blocks isminimal.
ε-Balanced Graph Partitioning
5 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Partition graph G = (V , E , c : V → R>0, ω : E → R>0)into k disjoint blocks s.t.
total node weight of each block ≤ 1 + ε
ktotal node weight
total weight of cut edges as small as possible
Applications:finite element simulations, VLSI design, route planning, . . .
Multi-Level Graph Partitioning
6 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Successful in existing systems:DiBaP, Chaco, Jostle, Metis, Scotch,. . . , KaPPa, KaSPar
Flows as Local ImprovementConstruction
7 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
tsG
Bb1
b2
corridor B, such that each (s, t)-min cut is ε-balanced cut in Ge.g. 2 times BFS (left, right)stop the BFS, if size would exceed (1 + ε) n
2 −ω(b2)⇒ ω(b2new) ≤ ω(b2) + (1 + ε) n
2 −ω(b2)
Local Improvement for k -partitionsUsing Flows?
8 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
on each pair of blocks
input graph
...
initial
...
outputpartition
local improvement
partitioning
match
contract uncontract
Local Improvement for k -partitionsUsing Flows?
9 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
on each pair of blocks
Scheduling Pairs of BlocksSketch
10 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Idea: refine only blocks in which change still happensblock can be active or inactiverefine pairs of blocks with at least one active blockblocks become active next round if something improved
More Localized Local Search
11 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Idea: KaPPa and KaSPar⇒ more local searches are betterTypical: k -way local search initialized with complete boundaryeach node moved at most onceLocalization:1. complete boundary⇒ maintained todo list T2. initialize search with single node v ∈rnd T3. iterate until T = ∅
Global SearchIterated Multilevel
12 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
match
Global SearchIterated Multilevel
13 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
contract
input graph
match
... ...local improvement
partitioning
initialuncontractcontract
...
uncontract
local improvement...
match
no new initial partitioning neededrandom tiebreaking neededlocal improvement has to assure ≤ cuts
Global SearchV-Cycles
14 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Global SearchW-Cycles
15 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Global SearchF-Cycles
16 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
ExperimentsToday’s Testset
17 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Medium sized instancesgraph n mrgg17 217 1 457 506rgg18 218 3 094 566Delaunay17 217 786 352Delaunay18 218 1 572 792bcsstk29 13 992 605 4964elt 15 606 91 756fesphere 16 386 98 304cti 16 840 96 464memplus 17 758 108 384cs4 33 499 87 716pwt 36 519 289 588bcsstk32 44 609 1 970 092body 45 087 327 468t60k 60 005 178 880wing 62 032 243 088brack2 62 631 733 118finan512 74 752 522 240bel 463 514 1 183 764nld 893 041 2 279 080af shell9 504 855 17 084 020
ExperimentsRemove Components
18 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Repetition Avg. Best. tKaFFPa Strong 2683 2617 8.93-KWay 2682 2614 9.23-MoreLocalizedSearch 2729 2656 5.55-FCycle 2748 2668 3.27-Flow 2934 2823 1.66
Effectiveness Avg. Best.KaFFPa Strong 2636 2616-KWay 2636 2618-MoreLocalizedSearch 2668 2650-FCycle 2669 2653-Flow 2799 2775
Outlook
19 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Walshaw Benchmark: 317 improvements (of about 600 possible)118 same cut as previous bestTR: http://arxiv.org/abs/1012.0006Many more experiments
Future Work
20 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
1. better initial partitioning for large k2. integration into meta-heuristics (even parallel)3. exploit shared memory parallelism4. output vertex separators5. graph clustering
10th DIMACS ImplementationChallengeAnnouncement
21 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Graph Partitioning and ClusteringOrganizers:1. David Bader Georgia Institute of Technology2. Peter Sanders and Dorothea Wagner, KIT
1st phase: call for instances and applications deadline ”soon”2nd phase: paper submission3rd phase: challenge workshop4th phase: proceedings
22 December 1, 2010Peter Sanders, Christian Schulz – Institute for Theoretical Computer Science, Algorithmics IIEngineering Multilevel Graph Partitioning Algorithms
KIT – die Kooperation von Forschungszentrum Karlsruhe GmbH und Universitat Karlsruhe (TH)
Thank you!
Contact: [email protected]