Improvements in Dynamic Partitioningmeseec.ce.rit.edu/756-projects/fall2016/2-3.pdf · In dynamic...
Transcript of Improvements in Dynamic Partitioningmeseec.ce.rit.edu/756-projects/fall2016/2-3.pdf · In dynamic...
Introduction
▶ Partitioning - Decomposition & Assignment Break up computation into maximum number of small concurrent computations that can be combined into fewer/larger tasks in assignment step.
▶ Types: ▶ Static partitioning ▶ Dynamic partitioning
Static Partitioning
▶ In static process partitioning, all the processes are specified before the program is executed and the system will execute a fixed number of processes.
▶ Problem is predictable.
http://docs.spring.io/spring-batch/trunk/reference/html/scalability.html
Dynamic Partitioning
▶ In dynamic partitioning, processes can be created and started for execution during the execution of the main program using process creation constructs or system calls; processes can also be destroyed. – Process creation and destruction might be done conditionally.
▶ Problem is unpredictable.
http://www.slideshare.net/ApacheApex/smart-partitioning-with-apache-apex-webinar
Approaches in Dynamic partitioning
▶ Traditional approaches - a) Graph partitioning b) Geometric partitioning
▶ Non-traditional approaches -
a) Hypergraph partitioning b) Combinations of partitioning methods
Traditional approaches
▶ Graph partitioning a. Recursive Spectral Bisection b. Multilevel graph partitioner c. Diffusive graph partitioners
▶ Geometric partitioning a. Recursive Coordinate Bisection (RCB) b. Recursive Inertial Bisection (RIB) c. Unbalanced Recursive Bisection (URB) d. Space-filling curve (SFC) partitioning
Graph partitioning 1) Application’s work is represented by a graph G(V, E). 2) Goal : To partition vertices so that each processor has roughly equal
total vertex weight while minimizing the total weight of edges. 3) Applications : VLSI circuit layout , image processing , solving sparse
linear systems, computing fill-reducing orderings for sparse matrices, and distributing workloads for parallel computation.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.97.5591&rep=rep1&type=pdf
Graph partitioning algorithm example: Recursive Spectral Bisection (RSB)
▶ Proposed by Pothen et as the basis for computing small vertex separators for sparse matrices.
▶ Bisects a graph by first finding the eigenvector corresponding to the smallest non-trivial eigenvalue of the Laplacian matrix of the graph.
▶ Drawback : High computing cost caused by the need for solving a series of eigenvalue problems.
▶ RSB algorithm on the CM-5 system.
Graph partitioning algorithm example: Multilevel Graph Partitioner
A multi-level graph partitioning algorithm works by applying one or more stages.
http://images.slideplayer.com/17/5359879/slides/slide_7.jpg
Geometric partitioning
▶ Subdomains - As per weights and physical coordinates of objects. ▶ Assign equal object weights and physically close objects are grouped
together in a subdomain.
Devine, Karen D., Erik G. Boman, and George Karypis. "Partitioning and load balancing for emerging parallel applications and architectures." Parallel Processing for Scientific Computing 20 (2006): 99.
Geometric partitioning algorithms Recursive Coordinate Bisection (RCB)
▶ Geometric coordinates are first partitioned into two balanced parts. Partitioning continues recursively in each part until the desired number of balanced parts has been created.
▶ Coordinates can be weighted, in which case the total weight in each part is balanced, rather than the number of coordinates in each part.
http://www.cs.nyu.edu/courses/fall10/G22.2945-001/slides/lect12.pdf
▶ Computational domain is divided into two regions by a cutting plane orthogonal to the longest direction of the domain
▶ Thus half workload in each of the sub-regions. ▶ Recursive application of the same splitting algorithm on sub regions ▶ The algorithm is terminated when the number of sub-regions is equal to
the number of processors
Geometric partitioning algorithms Recursive Inertial Bisection (RIB)
Non-traditional approach Traditional models - not sufficient for applications with -
▶ High-connectivity ▶ Heterogeneity in topology ▶ Non-symmetric or rectangular matrices
Devine, Karen D., Erik G. Boman, and George Karypis. "Partitioning and load balancing for emerging parallel applications and architectures." Parallel Processing for Scientific Computing 20 (2006): 99.
Circuit simulation Finite - element simulation
Hypergraph partitioning Vertices: Objects to be partitioned Edges: (Hyperedges) 2 or more related vertices
Represents dependencies between any set of vertices Accurately represents communication volume
Papa, D. A., & Markov, I. L. (2007). Hypergraph partitioning and clustering. In Approximation algorithms and metaheuristics.
Hypergraph Repartitioning
▶ Start with the application HyperGraph. ▶ Add one partition vertex for each partition. ▶ Migrate edges connecting applications
vertices to their partition vertices ▶ Weigh the hyperedges . ▶ Scale application edge weights by Alpha
( Number of application communication between repartition. ▶ Perform Hypergraph partitioning with partition vertices fixed.
http://slideplayer.com/slide/5899720/
Hypergraph Partitioning: Advantages and Disadvantages
▶ Partitioning goal - Equal vertices assigned to processors + minimize communications along hyperedge
▶ Advantages: ▶ For a 1-D hypergraph model, communication volume exactly
proportional to the number of cut hyperedges in the bisection case ▶ Reduced communication by 30-40% (vs graph model)
▶ Disadvantages: ▶ Optimal hypergraph partitioning is NP-hard problem. ▶ More expensive than graph partitioning
Partitioning Tools
▶ PaToH ▶ hMetis ▶ Zoltan
http://www.cs.sandia.gov/~kddevin/papers/zoltan_tutorial_dagstuhl09.pdf
Non-traditional approach Combinations of partitioning methods
Parallel contact detection algorithm Simulation phases - ▶ Phase 1: Global search identifies pairs of surface elements that are close
to each other Partitioning method: Multilevel graph partitioner
▶ Phase 2: Local search computes exact locations of these surfaces. Partitioning method: Recursive coordinate bisection (RCB) or space-filling curve (SFC)
Data mapped between phases requires communication
Multi-constraint or Multi-phase partitioning
Each element assigned 2 weights - ▶ force calculations (Phase 1) ▶ contact computation (Phase 2).
Single decomposition to balance both these weights is computed. Eliminates communication between 2 phases.
Examples
Contact detection for crash and impact simulations ▶ Simulation of vehicle crashes ▶ Deformations ▶ Projectile-target penetrations
References
▶ Devine, Karen D., Erik G. Boman, and George Karypis. "Partitioning and load balancing for emerging parallel applications and architectures." Parallel Processing for Scientific Computing 20 (2006): 99.
▶ Papa, D. A., & Markov, I. L. (2007). Hypergraph partitioning and clustering. In Approximation algorithms and metaheuristics.
▶ Johan, Zdenek, Kapil K. Mathur, S. Lennnart Johnsson, and Thomas J.R. Hughes. 1994. Parallel implementation of recursive spectral bisection on the Connection Machine CM-5 system. Harvard Computer Science Group Technical Report TR-07-94
▶ Lecture 12: Partitioning and Load Balancing ∗ G63.2011.002/G22.2945.001 · November 16, 2010.