encyclopegia.org

Broadcast (parallel pattern)

Broadcast is a collective communication primitive in parallel programming to distribute programming instructions or data to nodes in a cluster. It is the reverse operation of reduction. The broadcast operation is widely used in parallel algorithms, such as matrix-vector multiplication, Gaussian elimination and shortest paths. The Message Passing Interface implements broadcast in MPI_Bcast .

Broadcast is a collective communication primitive in parallel programming to distribute programming instructions or data to nodes in a cluster. It is the reverse operation of reduction. The broadcast operation is widely used in parallel algorithms, such as matrix-vector multiplication, Gaussian elimination and shortest paths. The Message Passing Interface implements broadcast in MPI_Bcast . Therefore, the time to send a package from one node to another is t = \mathrm{size} \times T_\text{byte} + T_\text{start} . p is the number of nodes and the number of processors. Message M id := node number p := number of nodes if id > 0 blocking_receive M for (i := ceil(log_2(p)) - 1; i >= 0; i--) if (id % 2^(i+1) == 0 && id + 2^i The message is split up into k packages and sent piecewise from node n to node n+1 . The time needed to distribute the first message piece is p t = \frac{m}{k} T_\text{byte} + T_\text{start} whereby t is the time needed to send a package from one processor to another. Sending a whole message takes ( p + k )\left( \frac{mT_\text{byte}}{k} + T_\text{start} \right) = (p + k) t = p t + k t . Optimal is to choose k = \sqrt{ \frac{ m (p-2) T_\text{byte} }{T_\text{start} } } resulting in a runtime of approximately m T_\text{byte} + p T_\text{start} + \sqrt{m p T_\text{start} T_\text{byte}} The run time is dependent on not only message length but also the number of processors that play roles. This approach shines when the length of the message is much larger than the amount of processors. Message M := [m_1, m_2, ..., m_n] id = node number for (i := 1; i We will assume in the following that communication is full-duplex. The Fibonacci tree structure has a depth of about d \approx \log_\Phi(p) whereby \Phi = \frac{1+\sqrt{5}}{2} the golden ratio. The resulting runtime is (\frac{m}{k}T_\text{byte} + T_\text{start})(d + 2k - 2) . Optimal is k = \sqrt{\frac{n (d-2) T_\text{byte} }{ 3T_\text{start}}} . This results in a runtime of 2mT_\text{byte} + T_\text{start} \log_\Phi(p) + \sqrt{2m \log_\Phi(p) T_\text{start} T_\text{byte}} . Message M := [m_1, m_2, ..., m_k] for i = 1 to k if (hasParent()) blocking_receive m_i if (hasChild(left_child)) send m_i to left_child if (hasChild(right_child)) send m_i to right_child The number of steps needed to construct two parallel-working binary trees is dependent on the amount of processors. Like with other structures one processor can is the root node who sends messages to two trees. It is not necessary to set a root node, because it is not hard to recognize that the direction of sending messages in binary tree is normally top to bottom. There is no limitation on the number of processors to build two binary trees. Let the height of the combined tree be . Tree A and B can have a height of h -1 . Especially, if the number of processors correspond to p = 2^h - 1 , we can make both sides trees and a root node. To construct this model efficiently and easily with a fully built tree, we can use two methods called "Shifting" and "Mirroring" to get second tree. Let assume tree A is already modeled and tree B is supposed to be constructed based on tree A. We assume that we have p processors ordered from 0 to p-1 . In this case the number of packet k is divided in half for each tree. Both trees are working together the total number of packets k = k/2 + k/2 (upper tree + bottom tree) In each binary tree sending a message to another nodes takes 2i steps until a processor has at least a packet in step i . Therefore, we can calculate all steps as d := \log_2 (p+1) \Rightarrow \log_2(p+1) \approx \log_2(p) . The resulting run time is T(m,p,k) \approx (\frac{m}{k}T_\text{byte} + T_\text{start})(2d + k - 1) . (Optimal k = \sqrt{{m (2d-1) T_\text{byte} }/{ T_\text{start}}} ) This results in a run time of T(m,p) \approx mT_\text{byte} + T_\text{start} \cdot 2\log_2 (p) + \sqrt{m \cdot 2\log_2 (p) T_\text{start} T_\text{byte}} . In this section, another broadcasting algorithm with an underlying telephone communication model will be introduced. A Hypercube creates network system with p = 2^d (d = 0,1,2,3,...) . Every node is represented by binary {0,1} depending on the number of dimensions. Fundamentally ESBT(Edge-disjoint Spanning Binomial Trees) is based on hypercube graphs, pipelining( m messages are divided by k packets) and binomial trees. The Processor 0^d cyclically spreads packets to roots of ESBTs. The roots of ESBTs broadcast data with binomial tree. To leave all of k from p_0 , k steps are required, because all packets are distributed by p_0 . It takes another d steps until the last leaf node receives the packet. In total d+ k steps are necessary to broadcast m message through ESBT. The resulting run time is T(m,p,k) = (\frac{m}{k}T_\text{byte} + T_\text{start})(k+d) . (k = \sqrt{{m d T_\text{byte} }/{ T_\text{start}}}) . This results in a run time of T(m,p) := mT_\text{byte} + dT_\text{start} + \sqrt{mdT_\text{start} T_\text{byte}} .

References

No reference rows published for this article.

Cite this article

MLA

"Broadcast (parallel pattern)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/broadcast-parallel-pattern. Accessed 24 November 2026.

Chicago

"Broadcast (parallel pattern)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/broadcast-parallel-pattern.

APA

encyclopegia.org. (2025). Broadcast (parallel pattern). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/broadcast-parallel-pattern

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1312369535 · 0.5 · snapshot enwiki-001312369535

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.