Good day. I have some issues with running MPI program that multiply matrices.
This is code (it is not my code) I get it from

CodePudding user response:
You are doing a MPI_Bcast on B as if it's a contiguous block of N*N elements. However, it's not: it's an array of pointers to N separate arrays for length N. So either you need to allocate B contiguously, or you need to do N broadcasts.
