1 / 18

An Orchestration Language for Parallel Objects

An Orchestration Language for Parallel Objects. Laxmikant Kal é , Mark Hills, Chao Huang Parallel Programming Lab University of Illinois. Outline. Motivation Charm++ and Virtualization Language Design Program Structure Orchestration Statements Communication Patterns Code Example

quiana
Télécharger la présentation

An Orchestration Language for Parallel Objects

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. An Orchestration Language for Parallel Objects Laxmikant Kalé, Mark Hills, Chao Huang Parallel Programming Lab University of Illinois

  2. Outline • Motivation • Charm++ and Virtualization • Language Design • Program Structure • Orchestration Statements • Communication Patterns • Code Example • Implementation • Jade and MSA • Future Work charm.cs.uiuc.edu

  3. System implementation User View Motivation • Charm++/AMPI and migratable parallel objects (VPs) • User partitions work into parallel objects • RTS maps objects onto physical processors • Asynchronous method invocation on Chares and ChareArray elements charm.cs.uiuc.edu

  4. Solid Solid Solid . . . Fluid Fluid Fluid 1 2 P . . . Solid1 Solid2 Solid3 Solidn . . . Fluid1 Fluid2 Fluidm Motivation (cont.) • Rocket simulation example under traditional MPI vs. Charm++/AMPI framework • Benefit: load balance, communication optimizations, modularity • Problem: flow of control buried in asynchronous method invocations charm.cs.uiuc.edu

  5. Motivation (cont.) • Car-Parrinello Ab Initio Molecular Dynamics (CPAIMD) charm.cs.uiuc.edu

  6. Language Design • Program consists of • Orchestration (.or) code • Chare arrays declaration • Orchestration with parallel constructs • Global flow of control • User code • User variables • Sequential methods charm.cs.uiuc.edu

  7. Language Design (cont.) • Array creation classes MyArrayType : ChareArray1D; Pairs : ChareArray2D; end-classes vars myWorkers : MyArrayType[10]; myPairs : Pairs[8][8]; otherPairs : Pair[2][2]; end-vars • Invoking method on an array myWorkers[i].foo(); myWorkers.foo(); charm.cs.uiuc.edu

  8. Language Design (cont.) • Orchestration Statements • forall forall i in myWorkers myWorkers[i].doWork(1,100); end-forall • Whole set of elements (abbreviated) forall in myWorkers doWork(1,100); end-forall • Subset of elements forall i:0:10:2 in myWorkers forall <i,j:0:8:2> in myPairs charm.cs.uiuc.edu

  9. Language Design (cont.) • Orchestration Statements • overlap overlap forall i in worker1 ... end-forall forall i in worker2 ... end-forall end-overlap charm.cs.uiuc.edu

  10. Language Design (cont.) • Communication Patterns • Input and output of method invocations forall i in workers <..,q[i],..>:=workers[i].f(..,p[(i+1)%N],..); end-forall • Method workers::fproduces the value q, and consumes value p. (p and q can overlap) • Producer-consumer model: Values of p and q can be used as soon as they are made available during the method execution • Produces value with same index i; e(i) for consumed value must be affine expression charm.cs.uiuc.edu

  11. Language Design (cont.) • Communication Patterns • Point-to-point <p[i]> := A[i].f(..); <..> := B[i].g(p[i]); • Multicast <p[i]> := A[i].f(...); <...> := B[i].g(p[i-1], p[i], p[i+1]); charm.cs.uiuc.edu

  12. Language Design (cont.) • Communication Patterns • Reduction <..,+e,..> := B[i,j].g(..); • All-to-All forall i in A <rows[i,j:0:N-1]> := A[i].1Dforward(...); end-forall forall k in B ... := B[k].2Dforward(rows[l:0:N-1, k]); end-forall charm.cs.uiuc.edu

  13. Language Design (cont.) • Code Example • Jacobi 1D begin forall i in J <lb[i],rb[i]> := J[i].init(); end-forall while (e > threshold) forall i in J <+e, lb[i], rb[i]> := J[i].compute(rb[i-1],lb[i+1]); end-forall end-while end charm.cs.uiuc.edu

  14. Language Design (cont.) • CPAIMD Revisited charm.cs.uiuc.edu

  15. Implementation • Jade • Java-like parallel language supporting Chares and ChareArrays • Simple interface, everything in one file • Translated to Charm++ and compiled • Multi-phase Shared Array (MSA) • Restricted shared-memory abstraction • Provides global view of data to parallel objects • Accesses are divided into phases: read, write, accumulate • Reduced synchronization traffic charm.cs.uiuc.edu

  16. Implementation (cont.) • Current implementation • Orchestration code (.or) file translated into Jade (.java) • Chare array declaration, control flow code, etc, will be generated • Sequential method definition and additional variables integrated into the target file • Translated as Jade, compiled and run as a Charm++ program charm.cs.uiuc.edu

  17. Future Work • Design details • MSA vs. Message based communication • Implicit method: Inlining user code in orchestration • Support for sparse chare arrays • Implementation • Dependence analysis • Producer-consumer communication • Productivity • Interoperability with Charm++/AMPI • Integrate libraries charm.cs.uiuc.edu

  18. Thank You Parallel Programming Lab at University of Illinois http://charm.cs.uiuc.edu charm.cs.uiuc.edu

More Related