Do MPI collective operations involve multiple hops?

Click For Summary
The discussion centers on the mechanics of the reduce operation in parallel computing, specifically using MPI (Message Passing Interface). It explores whether all nodes should send data directly to the root node or if an intermediate structure is more efficient, where nodes perform reductions on data received from a subset of other nodes before passing results along. The use of MPI_ALLREDUCE is highlighted as a method to achieve this in two steps, allowing all group members to receive the final result in their buffers, contrasting with MPI_REDUCE, which only sends the result to the root. The conversation references specific sections of the MPI documentation to clarify these operations.
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?
 
Technology 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:
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
4K