Timing collective barrier
- 1. Write a program to measure the time it takes to perform an MPI_Barrier on MPI_COMM_WORLD. Use a loop to average out variations and overhead in MPI_Wtime. Print the size of MPI_COMM_WORLD and time for each test. Make sure that both sender and reciever are ready when you begin the test.
- 2. How does the performance of MPI_Barrier vary with the size of MPI_COMM_WORLD?
Complete the arguments of the MPI_Barrier in the following pseudo code. Choose either one of the following Fortran or C example