1 / 14

CS 584 Lecture 3

CS 584 Lecture 3. How is the assignment going?. Designing Parallel Algorithms. Designing a parallel algorithm is not easy. There is no recipe or magical ingredient Except creativity We can benefit from a methodical approach. Framework for algorithm design

anniemartin
Download Presentation

CS 584 Lecture 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 584 Lecture 3 • How is the assignment going?

  2. Designing Parallel Algorithms • Designing a parallel algorithm is not easy. • There is no recipe or magical ingredient • Except creativity • We can benefit from a methodical approach. • Framework for algorithm design • Most problems have several parallel solutions which may be totally different from the best sequential algorithm.

  3. PCAM Algorithm Design • 4 Stages to designing a parallel algorithm • Partitioning • Communication • Agglomeration • Mapping • P & C focus on concurrency and scalability. • A & M focus on locality and performance.

  4. PCAM Algorithm Design • Partitioning • Computation and data are decomposed. • Communication • Coordinate task execution • Agglomeration • Combining of tasks for performance • Mapping • Assignment of tasks to processors

  5. Partitioning • Ignore the number of processors and the target architecture. • Expose opportunities for parallelism. • Divide up both the computation and data • Can take two approaches • domain decomposition • functional decomposition

  6. Domain Decomposition • Start algorithm design by analyzing the data • Divide the data into small pieces • Approximately equal in size • Then partition the computation by associating it with the data. • Communication issues may arise as one task needs the data from another task.

  7. 1 4 ò + 2 1 x 0 Domain Decomposition • Evaluate the definite integral. 0 1

  8. Split up the domain 0 1

  9. Split up the domain 0 1

  10. Split up the domain Now each task simply evaluates the integral in their range. All that is left is to sum up each task's answer for the total. 0 0.25 0.5 0.75 1

  11. Domain Decomposition • Consider dividing up a 3-D grid • What issues arise? • Other issues? • What if your problem has more than one data structure? • Different problem phases? • Replication?

  12. Functional Decomposition • Focus on the computation • Divide the computation into disjoint tasks • Avoid data dependency among tasks • After dividing the computation, examine the data requirements of each task.

  13. Functional Decomposition • Not as natural as domain decomposition • Consider search problems • Often functional decomposition is very useful at a higher level. • Climate modeling • Ocean simulation • Hydrology • Atmosphere, etc.

  14. Partitioning Checklist • Define a LOT of tasks? • Avoid redundant computation and storage? • Are tasks approximately equal? • Does the number of tasks scale with the problem size? • Have you identified several alternative partitioning schemes?

More Related