2008/12/9 Kevin Anthony Joy <kjo...@hotmail.com>: > if (rank==0) { /// REMOVE THIS IF > MPI::COMM_WORLD.Scatter( > stat, > 1, > MPI::DOUBLE, > &test3, > 1, > MPI::DOUBLE, > 0); > }
Hi Kevin. I see you are mixing C and C++ calls. It is probably best to stick with one or the other. Anyway, the source of your problem is that the peers that are supposed to be receiving data from the scatter don't call MPI_Scatter! MPI_Scatter is a collective operation, meaning that all processes in the communicator have to call it. Remove the if block around the scatter call, and you should get the results you expect. mch