Download
chapter 5 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 5 PowerPoint Presentation

Chapter 5

133 Views Download Presentation
Download Presentation

Chapter 5

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Chapter 5 The Sieve of Eratosthenes

  2. Introduction Sequential Algorithm

  3. The Sieve of Eratosthenes finds primesbetween 2 and 60

  4. - Interleaved Data Decomposition 2, 2+p, 2+2p, … 3, 3+p, 3+2p, … ……… Data Decomposition Options

  5. - Block Data Decomposition (Grouped Scheme) The first element controlled by process i is r = n mod p The last element controlled by process i is The process controlling a particular array element j is

  6. (Distributed Scheme) The first element controlled by process i is The last element controlled by process i is The process controlling a particular array element j is

  7. Block Decomposition Macros

  8. Local Index versus Global Index

  9. Function MPI_Bcast

  10. In the case of our parallel sieve algorithm

  11. Analysis of parallel sieve algorithm

  12. (Parallel Algorithm)

  13. Benchmarking The time needed to mark a particular cell as being the multiple of a prime is (The sequential algorithm has time complexity O(n ln ln n))

  14. Improvements- Delete even integers

  15. - Eliminate Broadcast - Reorganize loops - exchange the inner and outer loops to improve cache hits