Write a program to measure the time it takes to send 1, 2, 4, ..., 1M C doubles from one processor to another using MPI_Send and MPI_Recv. Use the same techniques as in the memcpy assignment to average out variations and overhead in MPI_Wtime. In this version, use an MPI_COMM_WORLD that has more than 2 processes (the more the better). Have each process send and receive with the process size/2 away, where there are size processes in MPI_COMM_WORLD.

Print the size, time, and rate in MB/sec for each test.

Make sure that both sender and reciever are ready when you begin the test. The sample solution uses MPI_Sendrecv, as well as MPI_Barrier to ensure that the various pairs start nearly together, but other choices are possible.