Measuring Cost of Communications

In this lab, we want you to measure the cost of communication. The provided code is a simple MPI ping-pong program, where exactly two processes are passing data between themselves. Processes 0 sends an array of even integers, and process 1 sends an array of odd integers.

Your tasks for the lab are:

  1. Measure the communication costs for different message sizes.
  2. See if the data fits the affine model (fig. 3.21 of the text).
  3. Find values of lambda (message latency) and beta (bandwidth of the communication system).
  4. Extend the code to ping*-pong (i.e. have p processors communicate around a ring).
  5. Measure cost of communication for this communication model. What should be the ideal case?
  6. Try to see if the data fits the affine model (see fig. 3.21 of the text).
  7. Measure the value of lambda and beta.