1 / 28

Chapter 5

Chapter 5. The Sieve of Eratosthenes. Introduction. Sequential Algorithm. The Sieve of Eratosthenes finds primes between 2 and 60. - Interleaved Data Decomposition 2, 2+p, 2+2p, … 3, 3+p, 3+2p, … ………. Data Decomposition Options. - Block Data Decomposition. (Grouped Scheme).

clove
Download Presentation

Chapter 5

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. 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

More Related