1 / 8

Parallel and Distributed Simulation

Parallel and Distributed Simulation. Transient Messages. Outline. Transient Messages A simple synchronous algorithm Transient message problem Flush barrier: tree implementation Flush barrier: butterfly implementation. A Simple Synchronous Algorithm. N i = time of next event in LP i

denton
Télécharger la présentation

Parallel and Distributed Simulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Parallel and Distributed Simulation Transient Messages

  2. Outline • Transient Messages • A simple synchronous algorithm • Transient message problem • Flush barrier: tree implementation • Flush barrier: butterfly implementation

  3. A Simple Synchronous Algorithm • Ni = time of next event in LPi • LAi = lookahead of LPi WHILE (unprocessed events remain) receive messages generated in previous iteration LBTS = min (Ni + LAi) process events in with time stamp ≤ LBTS barrier synchronization endDO Transient message: one that has been sent, but has not yet been received at its destination The algorithm fails if transient message(s) remain after the processes are released from the barrier

  4. Flush Barrier No process will be released from the barrier until • All processes have reached the barrier • Any message sent by a process before reaching the barrier has arrived at its destination Revised algorithm: WHILE (unprocessed events remain) receive messages generated in previous iteration LBTS = min (Ni + LAi) process events in with time stamp ≤ LBTS flush barrier endDO

  5. Implementation • Use FIFO communication channels, send a message on each channel • Message counters • Sendi = number of messages sent by LPi (this iteration) • Reci = number of messages received by LPi (this iteration) • There are no transient messages when • All processes are blocked (i.e., at the barrier), and • ∑Sendi = ∑Reci

  6. -1 +4 -2 Receive transient message +1 0 +1 -2 -1 +3 -1 +1 -2 +1 0 -1 -2 +3 -2 +4 -2 +1 -1 -2 +3 -2 +4 -2 +1 Tree: Flush Barrier • When a leaf process reaches flush barrier, include counter (#sent - #received) in messages sent to parent • Parent adds counters in incoming messages with its own counter, sends sum in message sent to its parent • If sum at root is zero, broadcast “go” message, else wait until sum is equal to zero • Receive transient message: send update message to root #sent - # received

  7. 0 0 0 0 0 0 0 0 1 2 4 5 6 7 3 step 3 -6 -6 -6 -6 +6 +6 +6 +6 Wallclock time 0 1 2 4 5 6 3 7 step 2 -3 -3 +1 +1 +5 +5 -3 -3 0 2 4 6 1 3 5 7 step 1 -1 -2 -5 +2 +1 0 +3 +2 0 1 2 3 4 5 6 7 Butterfly: Flush Barrier For (i = 1 to log N) send local counter to partner at step i wait for message from partner at step i local counter := local counter + counter in message End-for If local counter not zero after last step: • Send update messages up butterfly • Alternatively, abort and retry 0

  8. Summary • Transient messages must be accounted for by the synchronization algorithm • Flush barrier • Send and receive counters

More Related