Return to Homework Assignments



Programming Assignment #1


Due: Friday, October 29, 1999

The purpose of this assignment is to exercise parallel programming with MPI. You are to find the Greatest Common Divisor of n numbers, where the number of processors available is n+1. The processor where the user's program resides is the client processor, while the other n processors are servers.

You should make use of the following algorithm:

  1. The client processor sends each server a different number. The servers form a logical cycle according to some defined order.
  2. Each server sends to its successor in the given order its own number x.
  3. When a server receives a number y, he compares it to its own number x:
  4. x:= ((x-1) MOD y) +1 if x > y
  5. Repeat steps (2) through (4)

The above loop is repeated until a server receives n-times in sequence the same number.


THUR Oct 21 1999