slides4 111(2)

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

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

View Full Document Right Arrow Icon
Partitioning and Divide-and-Conquer Strategies ITCS 4/5145 Cluster Computing, UNC-Charlotte, B. Wilkinson, 2007.
Background image of page 1

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

View Full DocumentRight Arrow Icon
4.1 Partitioning Partitioning simply divides the problem into parts and then compute the parts and combine results.
Background image of page 2
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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
4.3 Partitioning a sequence of numbers into parts and adding the parts
Background image of page 5

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

View Full DocumentRight Arrow Icon
4.4 Tree construction
Background image of page 6
4.5 Dividing a list into parts
Background image of page 7

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

View Full DocumentRight Arrow Icon
4.6 Partial summation
Background image of page 8
Many Sorting algorithms can be parallelized by partitioning and by divide and conquer . Example Bucket sort
Background image of page 9

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

View Full DocumentRight Arrow Icon
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.
Background image of page 10
4.10 Parallel version of bucket sort Simple approach Assign one processor for each bucket.
Background image of page 11

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

View Full DocumentRight Arrow Icon
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
Background image of page 12
4.12 Another parallel version of bucket sort
Background image of page 13

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

View Full DocumentRight Arrow Icon
An MPI function that can be used to advantage here. Sends one data element from each process to
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2010 for the course ECON 20091_ECO taught by Professor Mohammadsafarzadeh during the Fall '09 term at USC.

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 Right Arrow Icon
Ask a homework question - tutors are online