a brave new parallel world - openmpopen% wound rvdp% abrave"new"parallel"world"...

30
RvdP A Brave New Parallel World 1 A Brave New Parallel World OpenMP BOF SC13, Denver, November 19, 2013 Ruud van der Pas

Upload: others

Post on 04-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

1  

Open  WOUND  

A Brave New Parallel World

OpenMP BOF SC13, Denver, November 19, 2013

Ruud  van  der  Pas  

Page 2: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

2  

Open  WOUND  Why  Do  We  Need  Something  New  ?  

Exis3ng  parallel  programming  models  all  fail  

We  can’t  get  the  ul3mate  performance  today  Given  the  hardware  trend,  we  need  prepare  for  scalability  to  at  least  1,000,000,000  threads  

Every  applica3on  and  developer  is  unique  with  specific  needs  

Need  something  different  and  beGer  !  All  of  this  needs  to  be  supported  

Page 3: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

3  

Open  WOUND  

World’s Only Unified New Development

Open Source (obviously) WOUND

Page 4: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

4  

Open  WOUND  

A Brave New Parallel World

Open WOUND

Page 5: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

5  

Open  WOUND  

Language  

RunBme  

Environment  

Tools  

Open WOUND

Page 6: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

6  

Open  WOUND  Open  WOUND  Goals  

Total  control  over  everything  

Extreme  scalability  

Trivial  to  understand  

Explicit  language  High  level  

Can  express  uncertainty  

Extremely  powerful  Always  op3mal  performance  

Page 7: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

7  

Open  WOUND  What  Is  Wrong  With  This  ?  

Tradi3onal  pragma  based  model:  

#pragma omp <action>!

This  is  an  all  or  nothing  model  Real-­‐life  is  different  

Page 8: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

8  

Open  WOUND  Open  WOUND  DifferenBator  

This allows the developer to rely on the system to help out, while maintaining full

control

Confidence Levels !

Page 9: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

9  

Open  WOUND  Confidence  Levels  

#pragma wound [confidence level] <action>!

Open  WOUND  adds  a  second  dimension:  

Page 10: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

10  

Open  WOUND  How  To  Define  Parallelism  ?  

#pragma wound [confidence level] open!

Confidence  levels  supported:  always  maybe  some3mes  depends  not  (to  preserve  sequen3al  seman3cs  !)    

Start  and  end  parallel  execu3on  

#pragma wound [confidence level] close!

Page 11: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

11  

Open  WOUND  Open  WOUND’s  DifferenBator  

Confidence levels can be combined !

Page 12: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

12  

Open  WOUND  Examples  Confidence  Levels  

#pragma wound maybe!

#pragma wound maybe sometimes!

#pragma wound maybe sometimes not!

#pragma wound depends sometimes!

#pragma wound depends not!#pragma wound not always depends!

Current limitation is to only support 5 combinations (see the roadmap though)

Page 13: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

13  

Open  WOUND  Acknowledgement  

What  follows  next  has  been  inspired  by  the  expressive  power  of  some  of  the  more  elegant  constructs  from  OpenMP  4.0  

For  example:  

 #pragma omp declare simd\ ! aligned(a,b,c) \! linear(e,f,g:18)! simdlen(27) \! inbranch!

Page 14: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

14  

Open  WOUND  How  About  Open  WOUND  Then  ?  

Successfully  marries  full  control  with  ease  of  code  development  

superscalar  level  

Non-­‐Expert  Rapid  Decision  (NERD)  controls  

Ini3ally  only  support  for:  

pipeline  scheduling  order  preferred  number  of  instruc3ons  number  of  cache  misses  allowed:  target  and  max  

Page 15: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

15  

Open  WOUND  Simple  Example  Of  NERD  Control  

#pragma nerd wound \! superscalar(3) \! pipeline(ex0,FPU1,ex1) \! instructions(12) \! cachemisses(t:0,m:123454321)!

Page 16: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

16  

Open  WOUND  Open  WOUND’s  DifferenBator  

NERD supports confidence levels !

Page 17: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

17  

Open  WOUND  Simple  Example  Of  NERD  Control/2  

#pragma nerd wound\! maybe superscalar(3) \! pipeline(not ex0,always FPU1,ex1) \! instructions(sometimes 12) \! cachemisses(not t:0,m:123454321)!

Page 18: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

18  

Open  WOUND  HURT  –  The  Run  Time  System  

Handles  everything  for  the  user  Hybrid  Unified  Run  Time  (HURT)  :  

Extremely  powerful  

Easy  to  use  *  

*)  Incorrect  use  is  fatal  though  

Page 19: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

19  

Open  WOUND  Open  WOUND  -­‐  Environment  Variables  

WOUND GO_AHEAD [YES|NO]!

HURT_WOUND [ALWAYS|SOMETIMES|NEVER]!

NERD_WOUND [[CONFIDENCE LEVEL],TARGET]]!

NERD_WOUND INSTRUCTIONS, NOT PIPELINE!

Example:  

Page 20: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

20  

Open  WOUND  Open  WOUND  -­‐  TEARS  

Symbolic  debugger  for  Open  WOUND  

Totally  Expressive  Advanced  Rela3onal  System  (TEARS)    

Example  (tears)  STOP  if  perhaps  not  always  (tears)  TEARS:  program  stopped  (tears)  print  handkerchief  (tears)  TEARS:  inconsistency  detected  

(tears)  TEARS:  conflict  with  “maybe  depends”    

Page 21: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

21  

Open  WOUND  Open  WOUND  –  BANDAID  

BAND  –  Brave  And  Naive  Developer  AID  –  Architecturally  Independent  Dependences      

Two  component  SDK  for  rapid  program  development  and  deployment  

Page 22: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

22  

Open  WOUND  Open  WOUND  –  STITCHES  

Connects  it  all  together  Dropped  concept  of  page  count  

Uses  “STAPLES”  instead  

Community  Documenta3on  Project  *  

*)  Driven  by  ini3al  user  feedback.  Personally  I  think  Open  WOUND  is  so  easy,  straighcorward  and  obvious  that  it  doesn’t  need  documenta3on  

Page 23: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

23  

Open  WOUND  Hello  World  Example  –  Original  Code  

! !!! ! for (int i=0; i<n; i++)! do_whatever_you_like(&i)! ! this_is_my_job_only()! ! always_the_same_answer() !!

Page 24: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

24  

Open  WOUND  Hello  World  Example  –  Prototype!  

#pragma wound always open! hurt_always(sometimes)! #pragma nerd wound \! superscalar(8) instructions(4) \! pipeline(FPU0,not FPU1,MMU3) \! cachemisses(t:4,m:666)! for (int i=0; i<n; i++)! do_whatever_you_like(&i)! hurt_ends()!! #pragma wound never open! this_is_my_job_only()! #pragma wound always close!! #pragma wound maybe not! always_the_same_answer() !#pragma wound sometimes close!

Page 25: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

25  

Open  WOUND  Open  WOUND  -­‐  Status  

•  WOUND  is  on  ice  •  HURT  is  fleshed  out  s3ll  •  TEARS  code  is  trickling  in  •  BANDAID  0.9.1.7.3  has  been  patched  for  1.0  release  •  STITCHES  is  at    666  STAPLES    (and  growing)  

Public  comment  phase  expected  to  start  April  1,  2014  

Page 26: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

26  

Open  WOUND  Open  WOUND  –  Roadmap/1  

•  WOUND  ü  Plan  2  more  ac3ons  for  1.1  release  ü  Target  for  1.1    is    to  support  200  confidence  levels  

•  Massive  increase  of  HURT  at  all  levels  

Page 27: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

27  

Open  WOUND  Open  WOUND  –  Roadmap/2  

•  BANDAID  ü  BAND  has  been  frozen  ü  AID  is  on  the  cujng  table  

•  TEARS  ü  Support  200  confidence  levels  in  1.1  release  

•  STITCHES  ü  Effort  to  automa3cally  insert  STAPLES  

Page 28: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

28  

Open  WOUND  

WOUND  

HURT  

NERD  

TEARS  

Open WOUND

Page 29: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

29  

Open  WOUND  Come  And  See  Us  In  New  Orleans  !  

Open  WOUND  1.0  targeted  for  SC’14  A  BOF  WOUND  planned  !  

Come  and  stop  by  our  booth  for  your  free  copy  of  the  1.0  BANDAID  kit  !  

Page 30: A Brave New Parallel World - OpenMPOpen% WOUND RvdP% ABrave"New"Parallel"World" 3 Open% WOUND World’s Only Unified New Development Open Source (obviously) WOUND

Open  WOUND  

RvdP   A  Brave  New  Parallel  World  

30  

Open  WOUND  

Thank You And ..... Stay Tuned !

[email protected]