Question SOLVED: Implement the butterfly barrier

Question SOLVED: Implement the butterfly barrier

This exercise is from Question 6-5 of the textbook at page 194.

Implement the butterfly barrier described in Section 6.1.4, assume the number of processes is a power of 2, e.g., 2, 4, 8, 16, etc.

Investigate the time taken by your butterfly barrier by using the code such as:

t1 = MPI_Wtime();

butterfly_barrier(); // call to your butterfly barrier

t2 = MPI_Wtime();

printf(“Elapsed time = %d seconds\n”, t2-t1);
Powered by