The MPI standard provides the MPI_IN_PLACE to handle such situations.
If one consider that each node works on the same amount of data, then
the following call will do what you're looking for:
call MPI_Gather( MPI_IN_PLACE, var, MPI_REAL8,
a, var, MPI_REAL8,
0
Arunkumar C R wrote:
Hello,
I have written an MPI code to find acceleration (a = F/m) of a system
of particles. I would like to know how to perform MPI_GATHER of all
the output data at the root process and print the whole array (in the
present case, f(1:n) ) and reuse it for some other purp
Hello,
I have written an MPI code to find acceleration (a = F/m) of a system of
particles. I would like to know how to perform MPI_GATHER of all the output
data at the root process and print the whole array (in the present case,
f(1:n) ) and reuse it for some other purpose in the serial part of t