CSCI 3366 (Introduction to Parallel and Distributed Processing), Fall 2005:
Homework 1

Assigned:
September 7, 2005.

Due:
September 16, 2005, at 11:59pm.

Credit:
20 points.

Overview

The book briefly mentions that the time to send a message varies with the size of the message. For this assignment, your mission is to write an MPI program that demonstrates this relationship, as described below.

Details

The program

Your program should accept the following command-line arguments:

When your program is started with $ P$ processes, it should do the following: Process 0 creates a message consisting of $ M$ ints (content of the message is not important) and sends it to process 1, which in turn sends it to process 2, and so forth, until finally process $ P-1$ sends it back to process 0. The program repeats this $ N$ times, and then process 0 prints the number of processes, $ M$, $ N$, and the elapsed time for the message to make its $ N$ trips around the ring of processes.

Hints and tips

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. An easy way to do this is to redirect the output of the mpirun command into a text file, e.g.,
mpirun -np 10 myprogram 100 2 >> outfile
and then edit the output file. (The >> appends the output to outfile.)

What to turn in and how

Submit your program source and the text file with timing measurements by sending mail to bmassing@cs.trinity.edu, with each file as an attachment. Please use a subject line that mentions the course number and the assignment (e.g., ``csci 3366 homework 1''). You can develop your program on any system that provides the needed functionality, but I will test it on one of the department's Fedora Core 4 Linux machines, so you should probably make sure it works in that environment before turning it in.



Berna Massingill
2005-09-06