partitioning spatially located load with rectangles
play

Partitioning Spatially Located Load with Rectangles: Algorithms and - PowerPoint PPT Presentation

Partitioning Spatially Located Load with Rectangles: Algorithms and Simulations Erik Saule , Erdeniz Ozgun Bas, Umit V. Catalyurek Department of Biomedical Informatics, The Ohio State University { esaule,erdeniz,umit } @bmi.osu.edu Frejus 2010


  1. Partitioning Spatially Located Load with Rectangles: Algorithms and Simulations Erik Saule , Erdeniz Ozgun Bas, Umit V. Catalyurek Department of Biomedical Informatics, The Ohio State University { esaule,erdeniz,umit } @bmi.osu.edu Frejus 2010 Ohio State University, Biomedical Informatics 2D partitioning Erik Saule :: 1 / 32 HPC Lab http://bmi.osu.edu/hpc

  2. A load distribution problem Load matrix In parallel computing, the load can be spatially located. The computation should be distributed accordingly. Applications Particles in Cell (stencil). Sparse Matrices. Direct Volume Rendering. Metrics Load balance . Communication. Stability. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Introduction:: 2 / 32 HPC Lab http://bmi.osu.edu/hpc

  3. Outline Introduction 1 Preliminaries 2 Notation In One Dimension Simulation Setting Rectilinear Partitioning 3 Nicol’s Algorithm Jagged Partitioning 4 PxQ jagged partitioning m -way Jagged Partitioning Hierarchical Bisection 5 Recursive Bisection Dynamic Programming Final thoughts 6 Summing up Conclusion and Perspective Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Introduction:: 3 / 32 HPC Lab http://bmi.osu.edu/hpc

  4. The Rectangular Partitioning Problem Definition Let A be a n 1 × n 2 matrix of non-negative values. The problem is to partition the [1 , 1] × [ n 1 , n 2 ] rectangle into a set S of m rectangles. The load of rectangle r = [ x , y ] × [ x ′ , y ′ ] is L ( r ) = � x ≤ i ≤ x ′ , y ≤ j ≤ y ′ A [ i ][ j ]. The problem is to minimize L max = max r ∈ S L ( r ). Prefix Sum Algorithms are rarely interested in the value of a particular element but rather interested in the load of a rectangle. The matrix is given as a 2D i ′ ≤ i , j ′ ≤ j A [ i ′ ][ j ′ ]. By convention prefix sum array Pr such as Pr [ i ][ j ] = � Pr [0][ j ] = Pr [ i ][0] = 0. We can now compute the load of rectangle r = [ x , y ] × [ x ′ , y ′ ] as L ( r ) = Pr [ x ′ ][ y ′ ] + Pr [ x − 1][ y − 1] − Pr [ x ′ ][ y − 1] − Pr [ x − 1][ y ′ ]. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Preliminaries::Notation 4 / 32 HPC Lab http://bmi.osu.edu/hpc

  5. In One Dimension Heuristic : Direct Cut [MP97] P i ′ A [ i ′ ] i ′ ≤ i A [ i ′ ] ≥ Greedily set the first interval at the first i such as � . m P i ′ A [ i ′ ] Complexity: O ( m log n m ). Guarantees : L max ( DC ) ≤ + max i A [ i ]. m Optimal : Nicol’s algorithm [Nic94] (improved by [PA04]) Use Probe ( B ) which tries to build a solution of value less than B . It loads greedily the processors up with the largest interval of load less than B . It exploits the property that there exists a solution so that the first interval [1 , i ] is either the smallest such that Probe ( L ([1 , i ])) is true or the largest such that Probe ( L ([1 , i ])) is false. Complexity: O (( m log n m ) 2 ). Note: it works on more than load matrices, as long as the load of intervals are non-decreasing (by inclusion). Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Preliminaries::In One Dimension 5 / 32 HPC Lab http://bmi.osu.edu/hpc

  6. Simulation Setting Classes (Some inspired by [MS96]) Processors Simulation are perform with different number of processors: most squared numbers up to 10,000. Metric L max Load imbalance is the presented metric : − 1. P i , j A [ i ][ j ] m Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Preliminaries::Simulation Setting 6 / 32 HPC Lab http://bmi.osu.edu/hpc

  7. Outline of the Talk Introduction 1 Preliminaries 2 Notation In One Dimension Simulation Setting Rectilinear Partitioning 3 Nicol’s Algorithm Jagged Partitioning 4 PxQ jagged partitioning m -way Jagged Partitioning Hierarchical Bisection 5 Recursive Bisection Dynamic Programming Final thoughts 6 Summing up Conclusion and Perspective Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning:: 7 / 32 HPC Lab http://bmi.osu.edu/hpc

  8. Rectilinear Partitioning Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning:: 8 / 32 HPC Lab http://bmi.osu.edu/hpc

  9. Known results on rectilinear partitioning NP Complete [GM96] and there is no (2 − ǫ )-approximation algorithm (unless P = NP ). [Nic94]: a θ ( m )-approximation algorithm based on iterative P ) 2 + P ( Q log n 2 refinement. O ( n 1 n 2 ) iterations in O ( Q ( P log n 1 Q ) 2 ). [AHM01](refinement of [Nic94]): a θ ( m 1 / 4 )-approximation algorithm for squared matrices. [KMS97]: a 120-approximation algorithm of complexity O ( n 1 n 2 ). [GIK02]: 4-approximation algorithm (from rectangle stabbing) of i , j A [ i ][ j ]) n 10 1 n 10 complexity O (log( � 2 ) (heavy linear programming). [MS05]: (4 + ǫ )-approximation algorithm that runs in O (( n 1 + n 2 + PQ ) P log( n 1 n 2 )). Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning:: 9 / 32 HPC Lab http://bmi.osu.edu/hpc

  10. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  11. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. � � � � � � � Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  12. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. � � � � � � � Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  13. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. Partition it in P parts. � � � � � � � Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  14. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. Partition it in P parts. Get a Px1 rectilinear partitioning. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  15. Nicol’s Rectilinear Algorithm [Nic94] � � � PxQ rectilinear partitioning max � � � Sum the columns to make a 1d � � � instance. � � � Partition it in P parts. Get a Px1 rectilinear partitioning. � � � Sum the rows in each part. � � � Build a 1d instance by taking the maximum for each interval. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  16. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning � � � Sum the columns to make a 1d � � � instance. � � � Partition it in P parts. � � � Get a Px1 rectilinear partitioning. � � � Sum the rows in each part. � � � Build a 1d instance by taking the maximum for each interval. Partition it in Q. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  17. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning � � � Sum the columns to make a 1d instance. � � � Partition it in P parts. � � � Get a Px1 rectilinear partitioning. � � � Sum the rows in each part. � � � Build a 1d instance by taking the � � � maximum for each interval. Partition it in Q. Get a PxQ rectilinear partitioning. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  18. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. Partition it in P parts. Get a Px1 rectilinear partitioning. Sum the rows in each part. Build a 1d instance by taking the maximum for each interval. Partition it in Q. Get a PxQ rectilinear partitioning. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

  19. Nicol’s Rectilinear Algorithm [Nic94] PxQ rectilinear partitioning Sum the columns to make a 1d instance. � � � � � � � Partition it in P parts. � � � � � � � Get a Px1 rectilinear partitioning. Sum the rows in each part. Build a 1d instance by taking the maximum for each interval. � � � � � � � Partition it in Q. Get a PxQ rectilinear partitioning. Ignore the row partition. Ohio State University, Biomedical Informatics 2D partitioning Erik Saule Rectilinear Partitioning::Nicol’s Algorithm 10 / 32 HPC Lab http://bmi.osu.edu/hpc

Recommend


More recommend