Charades An Adap've Parallel Discrete Event Simula'on - - PowerPoint PPT Presentation

charades
SMART_READER_LITE
LIVE PREVIEW

Charades An Adap've Parallel Discrete Event Simula'on - - PowerPoint PPT Presentation

Charades An Adap've Parallel Discrete Event Simula'on Framework on Charm++ Eric Mikida Char m++ Overlap of Communica'on & Computa'on A dap've Object


slide-1
SLIDE 1

Charades ¡

An ¡Adap've ¡Parallel ¡Discrete ¡Event ¡ Simula'on ¡Framework ¡on ¡Charm++ ¡

Eric ¡Mikida ¡

slide-2
SLIDE 2

Charm++ ¡ Adap've ¡ Discrete ¡ Event ¡ Simulator ¡

2 ¡

Overlap ¡of ¡ Communica'on ¡ & ¡Computa'on ¡ Object ¡Mapping ¡ via ¡Dynamic ¡Load ¡ Balancing ¡ GVT ¡Computa'on ¡ via ¡Asynchronous ¡ Messaging ¡

slide-3
SLIDE 3

Brief ¡PDES ¡Descrip'on ¡

  • Simula'on ¡made ¡up ¡of ¡Logical ¡Processes ¡(LPs) ¡
  • LPs ¡process ¡events ¡in ¡'mestamp ¡order ¡
  • Synchroniza'on ¡is ¡conserva've ¡or ¡op'mis'c ¡
  • Periodically ¡compute ¡global ¡virtual ¡'me ¡(GVT) ¡

3 ¡

slide-4
SLIDE 4

Performance ¡Metrics ¡

Event ¡Rate ¡= ¡ Event ¡Efficiency ¡= ¡ EcommiRed ¡/ ¡s ¡ EcommiRed ¡/ ¡Etotal ¡

4 ¡

slide-5
SLIDE 5

Performance ¡Tuning ¡Tradeoffs ¡

  • Shown ¡good ¡performance ¡on ¡benchmarks ¡

– We ¡can ¡execute/send ¡large ¡numbers ¡of ¡fine-­‑ grained ¡events ¡effec'vely ¡

  • How ¡do ¡we ¡adapt ¡to ¡improve ¡performance ¡in ¡

the ¡less ¡ideal ¡cases? ¡

– What ¡events ¡are ¡we ¡actually ¡execu'ng/sending ¡

5 ¡

slide-6
SLIDE 6

GVT ¡Computa'on ¡

  • Global ¡computa'on, ¡required ¡frequently ¡
  • Common ¡solu'on ¡blocks ¡en'rely ¡during ¡

computa'on ¡

– Side ¡effect ¡of ¡blocking ¡is ¡bounded-­‑op'mism ¡ – Leads ¡to ¡higher ¡event ¡efficiency ¡

6 ¡

slide-7
SLIDE 7

GVT ¡Tradeoff ¡

7 ¡

  • One ¡coupled ¡tuning ¡knob ¡
  • Common ¡case ¡is ¡high ¡synchroniza'on ¡

Synchroniza'on ¡Costs ¡ Event ¡Efficiency ¡ High ¡ Low ¡ GVT ¡

slide-8
SLIDE 8

GVT ¡Tradeoff ¡

8 ¡

  • One ¡coupled ¡tuning ¡knob ¡
  • Common ¡case ¡is ¡high ¡synchroniza'on ¡
  • As ¡we ¡lower ¡synchroniza'on, ¡we ¡lose ¡

efficiency ¡

Synchroniza'on ¡Costs ¡ Event ¡Efficiency ¡ High ¡ Low ¡ GVT ¡

slide-9
SLIDE 9

GVT ¡Tradeoff ¡

9 ¡

  • One ¡coupled ¡tuning ¡knob ¡
  • Common ¡case ¡is ¡high ¡synchroniza'on ¡
  • As ¡we ¡lower ¡synchroniza'on, ¡we ¡lose ¡

efficiency ¡

Synchroniza'on ¡Costs ¡ Event ¡Efficiency ¡ High ¡ Low ¡ GVT ¡

slide-10
SLIDE 10

Reducing ¡Synchroniza'on ¡Costs ¡

10 ¡

Red Red Event Execution Event Execution

Asynchronous Reduction Continuous Execution

Event Exec. Event Execution Event Execution Red QD FC CD FC CD FC

slide-11
SLIDE 11

Performance ¡on ¡Blue ¡Waters ¡

11 ¡

Sync ¡ Cont ¡

slide-12
SLIDE 12

Load ¡Balancing ¡on ¡Blue ¡Waters ¡

12 ¡

slide-13
SLIDE 13

Load ¡Balancing ¡on ¡Blue ¡Waters ¡

13 ¡

slide-14
SLIDE 14

Decoupling ¡the ¡Tuning ¡Knob ¡

  • GVT ¡can ¡tune ¡for ¡synchroniza'on ¡
  • LB ¡can ¡tune ¡for ¡efficiency ¡

14 ¡

Synchroniza'on ¡Costs ¡ Event ¡Efficiency ¡ High ¡ Low ¡ GVT ¡

slide-15
SLIDE 15

Decoupling ¡the ¡Tuning ¡Knob ¡

  • GVT ¡can ¡tune ¡for ¡synchroniza'on ¡
  • LB ¡can ¡tune ¡for ¡efficiency ¡

15 ¡

Synchroniza'on ¡Costs ¡ Event ¡Efficiency ¡ High ¡ Low ¡ LB ¡ GVT ¡

slide-16
SLIDE 16

Con'nuous ¡GVT ¡w/ ¡Load ¡Balancing ¡

16 ¡

slide-17
SLIDE 17

Bucketed ¡GVT ¡Scheme ¡

17 ¡

Virtual ¡Time ¡

slide-18
SLIDE 18

Bucketed ¡GVT ¡Scheme ¡

  • 1. Divide ¡en're ¡simula'on ¡'meline ¡into ¡buckets ¡

18 ¡

Virtual ¡Time ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡

slide-19
SLIDE 19

Bucketed ¡GVT ¡Scheme ¡

  • 1. Divide ¡en're ¡simula'on ¡'meline ¡into ¡buckets ¡
  • 2. Monitor ¡incoming/outgoing ¡events ¡

19 ¡

Virtual ¡Time ¡ Sent: ¡4 ¡ Recvd: ¡2 ¡ Sent: ¡3 ¡ Recvd: ¡1 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡

slide-20
SLIDE 20

Bucketed ¡GVT ¡Scheme ¡

  • 1. Divide ¡en're ¡simula'on ¡'meline ¡into ¡buckets ¡
  • 2. Monitor ¡incoming/outgoing ¡events ¡
  • 3. As ¡buckets ¡get ¡passed, ¡advance ¡GVT ¡

20 ¡

Virtual ¡Time ¡ Sent: ¡4 ¡ Recvd: ¡2 ¡ Sent: ¡3 ¡ Recvd: ¡1 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡

slide-21
SLIDE 21

Bucketed ¡GVT ¡Scheme ¡

  • 1. Divide ¡en're ¡simula'on ¡'meline ¡into ¡buckets ¡
  • 2. Monitor ¡incoming/outgoing ¡events ¡
  • 3. As ¡buckets ¡get ¡passed, ¡advance ¡GVT ¡

21 ¡

Virtual ¡Time ¡ Sent: ¡4 ¡ Recvd: ¡2 ¡ Sent: ¡3 ¡ Recvd: ¡1 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡ Sent: ¡1 ¡ Recvd: ¡0 ¡ Sent: ¡0 ¡ Recvd: ¡0 ¡

How ¡do ¡we ¡know ¡when ¡a ¡bucket ¡is ¡passed? ¡

slide-22
SLIDE 22

Bucketed ¡GVT ¡Scheme ¡

22 ¡

Virtual ¡Time ¡ Virtual ¡Time ¡ GVT ¡ GVT ¡ LVT ¡ LVT ¡ Each ¡PE ¡contributes ¡to ¡a ¡ min ¡reduc'on ¡when ¡it ¡ passes ¡a ¡bucket ¡boundary ¡

slide-23
SLIDE 23

Bucketed ¡GVT ¡Scheme ¡

23 ¡

Virtual ¡Time ¡ Virtual ¡Time ¡ GVT ¡ GVT ¡ LVT ¡ LVT ¡ Contributes ¡1, ¡for ¡1 ¡bucket ¡passed ¡ Each ¡PE ¡contributes ¡to ¡a ¡ min ¡reduc'on ¡when ¡it ¡ passes ¡a ¡bucket ¡boundary ¡

slide-24
SLIDE 24

Bucketed ¡GVT ¡Scheme ¡

24 ¡

Virtual ¡Time ¡ Virtual ¡Time ¡ GVT ¡ GVT ¡ LVT ¡ LVT ¡ Contributes ¡1, ¡for ¡1 ¡bucket ¡passed ¡ Contributes ¡2, ¡for ¡2 ¡buckets ¡passed ¡ Each ¡PE ¡contributes ¡to ¡a ¡ min ¡reduc'on ¡when ¡it ¡ passes ¡a ¡bucket ¡boundary ¡

slide-25
SLIDE 25

Bucketed ¡GVT ¡Scheme ¡

  • Once ¡the ¡reduc'on ¡completes, ¡we ¡know ¡

everyone ¡has ¡passed ¡at ¡least ¡some ¡buckets ¡

  • Start ¡a ¡series ¡of ¡“tuple” ¡reduc'ons ¡of ¡bucket ¡

counts, ¡and ¡buckets ¡passed ¡

  • Similar ¡to ¡comple'on ¡detec'on ¡with ¡extra ¡

informa'on ¡

25 ¡

slide-26
SLIDE 26

Bucketed ¡GVT ¡Scheme ¡

  • Result ¡of ¡count ¡reduc'ons ¡for ¡n ¡buckets ¡

– Sent ¡counts: ¡[s1, ¡s2, ¡…, ¡sn] ¡ – Received ¡counts: ¡[r1, ¡r2, ¡…, ¡rn] ¡ – New ¡min ¡bucket ¡passed: ¡k ¡

  • Find ¡x ¡such ¡that ¡si==ri ¡for ¡all ¡i≤x ¡and ¡x≤k ¡
  • Advance ¡GVT ¡x ¡buckets, ¡k-­‑x ¡keep ¡reducing ¡

26 ¡

slide-27
SLIDE 27

Bucketed ¡GVT ¡Scheme ¡

27 ¡ Sent: ¡4 ¡ Recvd: ¡6 ¡ Sent: ¡3 ¡ Recvd: ¡7 ¡ Sent: ¡2 ¡ Recv: ¡3 ¡ Sent: ¡6 ¡ Recvd: ¡4 ¡ Sent: ¡7 ¡ Recvd: ¡3 ¡ Sent: ¡6 ¡ Recvd: ¡1 ¡

GVT ¡ GVT ¡ LVT ¡ LVT ¡ First ¡2 ¡buckets ¡counts ¡ match, ¡and ¡all ¡PEs ¡have ¡ passed ¡at ¡least ¡3 ¡buckets ¡

slide-28
SLIDE 28

Bucketed ¡GVT ¡Scheme ¡

28 ¡ Sent: ¡4 ¡ Recvd: ¡6 ¡ Sent: ¡3 ¡ Recvd: ¡7 ¡ Sent: ¡2 ¡ Recv: ¡3 ¡ Sent: ¡6 ¡ Recvd: ¡4 ¡ Sent: ¡7 ¡ Recvd: ¡3 ¡ Sent: ¡6 ¡ Recvd: ¡1 ¡

GVT ¡ GVT ¡ LVT ¡ LVT ¡ First ¡2 ¡buckets ¡counts ¡ match, ¡and ¡all ¡PEs ¡have ¡ passed ¡at ¡least ¡3 ¡buckets ¡ Advance ¡GVT ¡2 ¡buckets, ¡ con'nue ¡wai'ng ¡on ¡the ¡3rd, ¡ and ¡possibly ¡pull ¡in ¡more ¡

slide-29
SLIDE 29

Early ¡Results ¡

  • Comparable, ¡or ¡beRer, ¡to ¡Con'nuous ¡
  • More ¡manageable/robust ¡
  • Easier ¡to ¡tune/understand ¡
  • Opportunity ¡for ¡adap've ¡event ¡control ¡

– Adap'vely ¡hold ¡back ¡high-­‑risk ¡events ¡ – Reduce ¡overall ¡communica'on ¡load ¡

29 ¡

slide-30
SLIDE 30

Adap've ¡Event ¡Delay ¡

30 ¡

Offset ¡From ¡GVT ¡ Reg: ¡101 ¡ Anti: ¡ ¡ ¡1 ¡ Reg: ¡90 ¡ Anti: ¡ ¡3 ¡ Reg: ¡40 ¡ Anti: ¡ ¡8 ¡ Reg: ¡38 ¡ Anti: ¡30 ¡ Reg: ¡27 ¡ Anti: ¡26 ¡ Reg: ¡5 ¡ Anti: ¡5 ¡ GVT ¡

slide-31
SLIDE 31

Adap've ¡Event ¡Delay ¡

31 ¡

Offset ¡From ¡GVT ¡ Reg: ¡101 ¡ Anti: ¡ ¡ ¡1 ¡ Reg: ¡90 ¡ Anti: ¡ ¡3 ¡ Reg: ¡40 ¡ Anti: ¡ ¡8 ¡ Reg: ¡38 ¡ Anti: ¡30 ¡ Reg: ¡27 ¡ Anti: ¡26 ¡ Reg: ¡5 ¡ Anti: ¡5 ¡ GVT ¡ High-­‑Risk ¡Events ¡

slide-32
SLIDE 32

Ques'ons? ¡

32 ¡