Example of two ways (simple way, better way) to do a broadcast.
Simple approach

One process broadcasts the same message to all the other processes, one at a time.

One-to-many communication strategy. Each time-step, the communicator process contacts one other process until each process receives the message.
Simple approach to doing a broadcast.
Amount of data transferred \((N-1)*p\)
Number of processes \(N\)
Size of message \(p\)
Number of steps \(N-1\)
Smarter approach

Let other processes help propagate the message. In the first step, process 1 sends the message to process 2. In the second step, both processes can now participate: process 1 sends to process 3, while process 2 sends to process 4. Similarly, by the third step, four processes (1, 3, 2, and 4) are sending the message to the four remaining processes (5, 6, 7, and 8).

Call tree style communication strategy as described in text.
Smarter approach to doing a broadcast. Solid lines represent a data transfer. Dotted lines represent carry-over from previous transfers.
Amount of data transferred \((N-1)*p\)
Number of processes \(N\)
Size of message \(p\)
Number of steps \(\log_2 N\)

Compare the number of steps in the two approaches:

  • Simple approach: \(N-1\)
  • Smarter approach: \(\log_2 N\)

The latter scales better as N increases.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement