CSCI 3366 (Introduction to Parallel and Distributed Processing), Spring 2002:
Homework 1

Assigned:
January 24, 2002.

Due:
February 5, 2002, at 5pm.

Credit:
20 points.


Contents

Overview

We could use a message-passing program to compute the sum of the numbers from 0 to $ N-1$ as follows:

If we measure, in process 0, the time that elapses from the beginning of the calculation (before sending 0 to process 1) until the end of the calculation (after receiving the sum from process $ N-1$), we will also have a rough estimate of how long it takes to send a message around a ring of $ N$ processes.

(Yes, this is a highly inefficient method of performing the calculation. It will, however, serve as a not-too-difficult first venture into message-passing programming and allow you to measure something interesting, namely the time required to send a sequence of messages).

Details

Writing the program

Write a program as described above, using MPI for message-passing. You can write the program in any language that allows calls to the MPI libraries -- Fortran, C, or C++. When run on $ N$ processors, your program should print:

Only process 0 should print anything.

You may find it helpful to look at some of the sample programs. You may also find it helpful to review the Tips for Running MPI Programs.

Running the program

Once you have confirmed that your program is operating correctly, use it to see how the time taken to send messages varies with any factor you think might affect it. Some things to try:

Collect at least half a dozen measurements. For each measurement, record: Record these timing measurements in a text file.

What to turn in

Submit your source code for your program, plus the text file containing your timing measurements, as described in the Guidelines for Programming Assignments, using a subject header of ``cs3366 hw 1''.



Berna Massingill
2002-01-24