Transfer of matrices using MPI

Content

When matrices are to be transfered, we need a standardized sequence of elements. Without such a standardization we are unable to send a row-major matrix and to receive it as column-major matrix and vice versa. In the following we accept row-major as standard sequence for our matrices during a transfer.

Exercise

Assume you have a matrix A with a row-major layout where A.incCol() == 1 and which is to be transfered in in row-major order (per the standard defined above). Is it then possible to construct the corresponding MPI data type with one invocation of MPI_Type_vector? Think about this for a moment and write down your response without creating a test program.