slides4 111(2)

# slides4 111(2) - Partitioning and Divide-and-Conquer...

This preview shows pages 1–15. Sign up to view the full content.

Partitioning and Divide-and-Conquer Strategies ITCS 4/5145 Cluster Computing, UNC-Charlotte, B. Wilkinson, 2007.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.1 Partitioning Partitioning simply divides the problem into parts and then compute the parts and combine results.
4.1 Divide and Conquer Characterized by dividing problem into sub-problems of same form as larger problem. Further divisions into still smaller sub-problems, usually done by recursion. Recursive divide and conquer amenable to parallelization because separate processes can be used for divided parts. Also usually data is naturally localized.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.2 Partitioning/Divide and Conquer Examples Many possibilities. • Operations on sequences of number such as simply adding them together • Several sorting algorithms can often be partitioned or constructed in a recursive fashion • Numerical integration N -body problem
4.3 Partitioning a sequence of numbers into parts and adding the parts

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.4 Tree construction
4.5 Dividing a list into parts

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.6 Partial summation
Many Sorting algorithms can be parallelized by partitioning and by divide and conquer . Example Bucket sort

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.9 Bucket sort One “bucket” assigned to hold numbers that fall within each region. Numbers in each bucket sorted using a sequential sorting algorithm. Sequential sorting time complexity: O( n log( n / m ). Works well if the original numbers uniformly distributed across a known interval, say 0 to a - 1.
4.10 Parallel version of bucket sort Simple approach Assign one processor for each bucket.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4.11 Further Parallelization Partition sequence into m regions. Each processor assigned one region. (Hence number of processors, p , equals m .) Each processor maintains one “big” bucket for its region. Each processor maintains m “small” buckets, one for each region. Each processor separates numbers in its region into its own small buckets. All small buckets emptied into p big buckets Each big bucket sorted by its processor
4.12 Another parallel version of bucket sort

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
An MPI function that can be used to advantage here. Sends one data element from each process to
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 42

slides4 111(2) - Partitioning and Divide-and-Conquer...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online