Do MPI collective operations involve multiple hops?

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
ektrules
Messages
35
Reaction score
0
Consider the reduce operation for example. Do all nodes send data directly to the root? Or is there some structure where a node will receive data from a few other nodes, perform a reduction, then pass the intermediate results to other nodes?
 
Physics news on Phys.org
ektrules said:
Or is there some structure where a node will receive data from a few other nodes, perform a reduction, then pass the intermediate results to other nodes?

Sth like that could be achieved in two steps using appropriate grouping and using MPI_ALLREDUCE (instead of MPI_REDUCE) first

Pls attend:
http://www.mpi-forum.org/docs/mpi22-report/node109.htm#Node109
If comm is an intracommunicator, MPI_ALLREDUCE behaves the same as MPI_REDUCE except that the result appears in the receive buffer of all the group members.

and
http://www.mpi-forum.org/docs/mpi22-report/node87.htm#Node87
 
Last edited by a moderator: