Question: Write this in c + + Final Assignment: Benchmarking Performance of the Sieve of Eratosthenes Instead of a final exam, you will be given a
Write this in c
Final Assignment: Benchmarking Performance of the Sieve of Eratosthenes
Instead of a final exam, you will be given a final project, where you compare the performance of the
sieve of Eratosthenes with varying amounts of threadsprocesses and different sizes of workloads.
This assignment will consist of the following parts:
The multithreaded sieve of the Eratosthenes program
MPI benchmarks
Answer these questions you can be as short or as detailed as you like:
a Where do you think the "sweet spot" is for thread count? Alternatively, at what point
does the addition of more threads result in diminishing returns?
b Where do you think the "sweet spot" is for workload size? Alternatively, at what
maximum value max value to search for prime numbers does it become beneficial to
run the sieve in parallel?
Answer this additional question with a few sentences: Between this and the OpenMPbased
sieve from the midterm, what can you say are the advantages and disadvantages of both
OpenMP and MPI? You may consider the following:
a Which was easiest to program?
b Which one requires or benefits from specific hardware?
You will be benchmarking the sieve made using MPI. Start with the following table, consisting of
entries. You may expand the table to include different thread counts or maximum values.
A few notes:
If you have been following along using the video tutorials, you'll know that we cannot test a one
process case since there must be at least one process for process to talk to Hence, the table has
entries instead of
If you were able to code a sieve that has process doing work alongside other processes,
then you can add in a oneprocess row.
You are welcome to present your findings as a graph rather than a table.
Try to run as many trials as possible at least trials, but more helps for each combination of
threadprocess count and maximum number for primes and find the average execution time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
