Exercise - Ring


Up: Sending and Receiving messages Next: Topologies Previous: Exercise - PI

Objective: Experiment with send/receive

Write a program to send a message around a ring of processors. That is, processor 0 sends to processor 1, who sends to processor 2, etc. The last processor returns the message to processor 0.

127 You can use the routine MPI_Wtime to time code in MPI. The statement

returns the time as a double (DOUBLE PRECISION in Fortran).



Up: Sending and Receiving messages Next: Topologies Previous: Exercise - PI