Hypercube (communication pattern): Difference between revisions

Content deleted Content added
m Fix translation
Danielmyr (talk | contribs)
Line 76:
 
=== All-to-All ===
Here every processing element has a unique message for all other processing elements.
 
'''Eingabeinput:''' Nachrichten message<math>m_{ij}</math> aufat Prozessorprocessing element <math>i</math> anto processing Prozessorelement <math>j</math>.
Bei der All-to-All Kommunikation hat jeder Prozessor eine eigene Nachricht für alle anderen Prozessoren.
 
'''Eingabe:''' Nachrichten <math>m_{ij}</math> auf Prozessor <math>i</math> an Prozessor <math>j</math>.
'''for''' <math>d > k \geq 0</math> '''do'''
'''ErhalteReceive''' vonfrom Prozessorprocessing element <math>i \text{ XOR } 2^k</math>:
alleall Nachrichtemessages fürfor meinenmy <math>k</math>-dimensionalendimensional Teilwürfelsub cube
'''SendeSend''' anto Prozessorprocessing element <math>i \text{ XOR } 2^k</math>:
alleall Nachrichtemessages fürfor seinenhis <math>k</math>-dimensionalendimensional Teilwürfelsub cube
'''endfor'''
 
With each iteration a messages comes closer to its destination by one dimension, if it hasn't arrived yet. So there only <math>d = \log{p}</math> steps needed. In every step <math>p / 2</math> are sent. In the first iteration half of the messages aren't meant for the own sub cube. In every following step the sub cube is only half the size, but in the previous step exactly the same number of messages arrived from another processing element.
Eine Nachricht kommt in jedem Iterationsschritt eine Dimension näher an ihr Ziel, sollte sie es noch nicht erreicht haben. Demnach werden nur maximal <math>d = \log{p}</math> viele Schritte benötigt. In jedem Schritt werden <math>p / 2</math> Nachrichten verschickt. Für den ersten Schritt liegen genau die Hälfte der Nachrichten nicht im eigenen Teilwürfel. In den allen folgenden Schritten ist der Teilwürfel nur noch halb so groß wie davor, allerdings wurden im vorhergegangenem Schritt genauso viele Nachrichten von einem anderen Prozessor erhalten, die auch für diesen Teilwürfel bestimmt sind.
 
InsgesamtThis bedeutetresults diesin einea Laufzeitrun-time von:of <math>T(n,p) \approx \log{p} (T_\text{start} + \frac{p}{2}nT_\text{byte}) </math>
 
== ESBT-Broadcast ==