CS475 Fall 2011 - HW 4

Parallel MPI Programs (Compute the Value of Pi and Sieve to Compute Prime Numbers)


Objectives

The objective of this lab is to write your first MPI programs, to debug and test them, and to experimentally determine the gains you get in running them in parallel on up to 16 processors (two nodes on carver). For the Pi program, you will have two versions of your code: one using a cyclic distribution and one using a block distribution. The timings for both versions should be compared and discussed in your report. For the sieve program you may want to use the most efficent method from HW2 (sieve5 blocked for locality). You may use Program1 the (unblocked) version that uses half the memory and marks off only odd multiples of each prime.

Exercise 4.11 in the text describes how the value of Pi can be computed by evaluating a definite integral. Your main assignment is to solve Problem 4.11. That is, turn in a correct working program that computes Pi using the rectangle rule. You should also address 4.11 (b) relating to the performance of your parallel program on a varying number of processors and report that in your lab report.

Use MPI to parallelize the sieve program. Use the most efficent method from HW2 that you successfully completed (sieve5 - blocked for locality). As always, you should report speedup relative to the fastet sequential program that you have.

Your code should conform to the following:

How to Submit:

How to tar files:

Good luck and have fun!


Last Modified: 10/23/2011