Worker tasks are trying to MPI_Recv into "a" and "b" - which haven't been allocated.

The way you are allocating the matrices now (array of arrays), you will only be able to send/recv one row at a...