I have seen many similar threads here, but the problem with me, is, that my program actually runs for different settings.
For example: when my matrix is 1024x1024
For 2 cores : Error 11
For 4, 8, 16 etc works fine.
Matrix 2048x2048
:
For any core setting : Error 11.
I don't understand why this happens, each process is taking a 2048/(total processes) X 2028 matrix to calculate. And it should be working correctly.
This is how i declare my matrix:
int temp[wp][hp];
For receive:
rc = MPI_Recv(&temp[0][0], wp*hp, MPI_INT, i, tag, MPI_COMM_WORLD, &status);
And for send:
rc = MPI_Send(&temp[0][0], wp*hp, MPI_INT, 0, tag, MPI_COMM_WORLD);
I don't get it, it should be working. Do you think it is perhaps a memory issue and not pointer related?