Project CCAI 412
Project CCAI 412
Project CCAI 412
1 Description
A versatile scholar, Eratosthenes of Cyrene (today Libya) lived approximately 275195 BC.
He was the first to estimate accurately the diameter of the earth. For several decades, he
served as the director of the famous library in Alexandria. He was highly regarded in the
ancient world, but unfortunately only fragments of his writing have survived. Eratosthenes
died at an advanced age from voluntary starvation, induced by despair at his blindness.
Eratosthenes also conceived the “Sieve of Eratosthenes”, a method for identifying prime
numbers. Therefore, in a first step the set of natural numbers P = 2, …, N from 2 to an
upper limit N (in arbitrary ordering) is formed. Then, after searching for the minimum element
p of set P the first prime number all multiples of p are deleted from P. Successively
repeating this step until p > N there are only prime numbers left.
1. step: 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 p=2
delete multiples: 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15
2. step: 3 , 5 , 7 , 9 , 11 , 13 , 15 p=3
delete multiples: 3 , 5 , 7 , 9 , 11 , 13 , 15
termination (only prime numbers left), i.e. PRIME = 2, 3, 5, 7, 11, 13
2 Implementation
3 Benchmark
Sketch your results (i.e. execution times) of your OpenMP/MPI program for different N and
different amount of processes in two diagrams showing speed-up or parallel efficiency. You
can use any plotting tool (Excel, Python, etc.) of your choice. In order to ‘benchmark’ your
results, also make a theoretical approach to compute speed-up and efficiency according to
Amdahl. Therefore, estimate the serial part of your program and compute the corresponding
speed-up and efficiency values. Compare those with the ones measured and discuss your
observation!
4 Report
Write a final report (45 pages) including a brief description of your chosen parallelization
strategy and the necessary MPI communication in your code (i.e. sketch the communication
idea). The report should further highlight your achieved results for both parallelization
approaches (i.e. OpenMP and MPI) including your diagrams and benchmark results from (3).
Evaluate your results, i.e. discuss if in your opinion your results are good or bad and where
you might have ‘lost’ performance within your parallelization. The quality of the write-up is
part of the grade!
5 Project Due
For successfully finishing the project students have to upload their final report together with
all programs (i.e. source code) not later than 12 Nov 2022 on LMS.