I would like to use MPI_Type_vector
to scatter the sub-domains of a matrix to each process. For example, the matrix is 5x5, and it is decomposed by 2x2 sub-domains. So the dimensions of sub-domains are:
_____________________
| | |
| 0 | 1 |
| (2,2) | (3,2) |
| | |
|_________|_________| 5
| | |
| 2 | 3 |
| (2,3) | (3,3) |
| | |
|_________|_________|
5
I defined a MPI_Type_vector
on each process with its own dimension. I expected the sizes of defined vectors on process 0 and 1 are different. But the handle of them are them same. And It looks like MPI uses only one of those defined vectors.
Thanks!
Li
PS: I have implemented this function by manually packing and unpacking the data, but I would like to use some thing more convenient.