For example, I have a 5 by 5 matrix
A = [1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2, 3, 4, 5; 1, 2 ,3 ,4, 5]
and I want to scatter A to four processors like [2,3; 4, 5]
.
More precisely, I want to broadcast [1,2,3;1,2,3;1,2,3]
to processor 2, [4,5;4,5;4,5]
to processor 3, [1,2,3;1,2,3]
to processor 4, and [4,5;4,5]
to processor 5.
I tried MPI.Scatter and MPI.Scatterv! but it seems that they could only split the matrix along the last dimension (column).
Is there any way to do this using MPI.jl?