I am trying to use MPI_Scatter to transmit a set of rows of matrix[5000][2000] across 16 processes (Trying to achieve a matrix multiplication). but 5000 is not divisible by 16. So if every process receives equal amount of rows, last few rows will be lost. ( 312 * 16 + 8 = 5000 )
Can anyone tell me how to scatter this [5000] rows properly among the processes using MPI_Scatter?
Thank you