What is the best way to split a Fortran 90 matrix into its rows rather than columns? That is, suppose I have a (4.50) matrix, and I want MPI_SCATTER to have two processes, where each part is alocal (2.50), where rank 0 has rows 1 and 2, and rank 1 has 3 and 4. Now, in C, it's simple because arrays are string, but in Fortran 90 they are columns.
I am trying to avoid using TRANSPOSE to switch before scattering (i.e. doubling memory usage), and I suppose there should be a way in MPI to do this. Will it be MPI_TYPE_VECTOR? MPI_TYPE_CREATE_SUBARRAY?
Similarly, what if I have a 3d array b (4,50,3) and I need two scattered block arrays (2,50,3) distributed as above?
user241652
source share