EECE 432 / CS 442 Spring 1999 Homework Set 4 Due Wednesday, March 10, 1999 Communication on a message-passing machine is typically modeled as a linear function of the message size. For instance, to send an "m"-byte message from a source to destination processor takes T(m) = L + (B * m) seconds where "L" is the "latency" of the network, and "B" is the reciprocal of the "bandwidth". A common way of measuring communication time is by using the "ping-pong" method: 1) P0 starts the clock (see MPI_Wtime) 2) send a message from processor P0 to P1 3) P1 receives the message and immediately returns it to P0 4) P0 receives the message and stops the clock The approximate one-way time for the message is then half of the elapsed time measured by processor P0. Typically, the ping-pong communication is repeatedly, say, 100 times, and the final time is divided by the same number of iterations, to average out any anomalies. (See Chapter 3 of Hwang and Xu for more details on the "ping-pong" test.) Write an MPI program that finds the latency and bandwidth parameters for both the SP-2 and the Alta. First, calculate latency (L) by using a short (1-byte) message. Then graph the bandwidth (1/B) for message sizes of 1, 4, 16, 64, 256, 1024, 2048, 8192 bytes. Does the achieved bandwidth change as a function of message size? ************************************************** For User Support on the AHPCC machines, ---> call Brian Baltz at 277-8420 ---> or email **************************************************