CS475 Fall 2009 - HW 1

Parallel MPI Program to Compute the Value of Pi


Objectives

The objective of this lab is to write your first MPI program, to debug and test it, and to experimentally determine the gains you get in running it in parallel on up to 16 processors (two nodes on bassi). Additionally, you will have two versions of your code: one using a block distribution and one using a cyclic distribution. The timings for both versions should be compared and discussed in your report.

Problem Statement

This lab is to be performed on bassi.nersc.gov. The Lab Schedule has instructions that explain how to start working with the NERSC environment in general and bassi in particular.

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.

Your code should conform to the following:

Block Distribution: Modify pi_cycle.c to use a block distribution of computations to processors. The code for this program should be named pi_block.c and is due by 2:00pm on Thursday. Block distribution will be discussed in class on Tuesday.

What/When/How to Submit:

Good luck and have fun!


Last Modified: 9/10/2009