Could any help how to use MPI_Scatter to send the following matrix
float **u, **u_local;
if (rank == 0){
u = (float**) malloc(N * size * sizeof(float*));
for(i = 0; i < N * size; i++){
u[i] = (float*) malloc(M * sizeof(float));
memset(u[i], 0, M * sizeof(float));
}
}
I wanna send u[N][M] matrix to all processes equally (u_local) N number of rows M number of columns
Thanks