So I'm trying to write myself a matrix multiplication that uses MPI (OpenMPI implementation). The problem is,although sending parts of a matrix from master to slaves by MPI_Send/MPI_Recv works properly, MPI_Recv in the master process that's supposed to receive answers from slaves (marked by //!!! comment) waits indifinitely, never receiving any answer.
However, I can see that slave processes are sending answers (debugMessage in line 167).
To make the question clear, the code can be found there: http://pastebin.com/ZY9jQXDD
So, anybody knows where the problem lies, and could please help me?