Parallel Computing: Lecture 15
Learning objectives
After this class, you should be able to:
- Write MPI code using the following features: (i)
MPI_Alltoall
, (ii)MPI_Cart_coords
, (iii)MPI_Cart_create
, (iv)MPI_Cart_rank
, (v)MPI_Comm_split
, and (vi)MPI_Dims_create
.
Reading assignment
- Chapter 8.
- Chapter 11, page 274.
Exercises and review questions
- Questions on current lecture's material
- Show the steps of an
Alltoall
operation on a hypercube with eight processors.- (Programming) Write code where each processor has a variable called
rank
that stores its rank. Then,MPI_COMM_WORLD
is split so that all even numbered processors are on one communicator, and all odd numbered processors are on another communicator. The even numbered processors perform a reduction onrank
to output the sum of their ranks, and the odd numbered processors perform similar operations amongst themselves.- Questions on next lecture's material
- (Post your solution on the discussion board) Give an example of two
3x3
matrices, and show their product.