MPI_Scatter: Why do I have to allocate memory in all the processes?
问题 I am dealing with parallelizing Conways' Game of Life using MPI (in c++). I have to read a (very large) matrix from input, then scatter it in slices row-wise, and then process every slice in parallel. The idea I am following is to let only one process deal with the I/O stuff. In particular, process 0 read from file and saves the initial datas into a say RxC matrix, to be scattered among the process in (R/P)xC "slice matrices". Now, when I perform the routine MPI_Scatter, the compiler