1 / 46

Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert

Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert. Going Parallel. Goals. Describe our vision to the CCA Solicit contributions (code) for: RMI (SOAP | SOAP w/ Mime types) Parallel Network Algs (general arrays) Encourage Collaboration. Outline. Background on Components @llnl.gov

sibley
Download Presentation

Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert

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. Tammy Dahlgren, Tom Epperly, Scott Kohn, & Gary Kumfert Going Parallel

  2. Goals • Describe our vision to the CCA • Solicit contributions (code) for: • RMI (SOAP | SOAP w/ Mime types) • Parallel Network Algs (general arrays) • Encourage Collaboration

  3. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  4. Components @llnl.gov • Quorum - web voting • Alexandria - component repository • Babel - language interoperability • maturing to platform interoperability • … implies some RMI mechanism • SOAP | SOAP w/ MIME types • open to suggestions, & contributed sourcecode

  5. Babel & MxN problem • Unique Opportunities • SIDL communication directives • Babel generates code anyway • Users already link against Babel Runtime Library • Can hook directly into Intermediate Object Representation (IOR)

  6. Impls and Stubs and Skels • Application: uses components in user’s language of choice • Client Side Stubs: translate from application language to C • Internal Object Representation: Always in C • Server Side Skeletons: translates IOR (in C) to component implementation language • Implementation: component developers choice of language. (Can be wrappers to legacy code) Application Stubs IORs Skels Impls

  7. Remote Components Application Line Protocol Stubs Unmarshaler Internet IORs IORs Marshaler Skels Line Protocol Impls

  8. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  9. Initial Assumptions • Working Point-to-Point RMI • Object Persistence

  10. Example #1: 1-D Vectors double d = x.dot( y ); x 0.0, 1.1 p0 y .9, .8, .7 p3 x 2.2, 3.3 p1 y p4 .6, .5, .4 x 4.4, 5.5 p2

  11. Example #1: 1-D Vectors double d = x.dot( y ); x p0 y p3 x p1 y p4 x p2

  12. Rule #1: Owner Computes double vector::dot( vector& y ) { // initialize double * yData = new double[localSize]; y.requestData( localSize, local2global, yData); // sum all x[i] * y[i] double localSum = 0.0; for( int i=0; i<localSize; ++i ) { localSum += localData[i] * yData[i]; } // cleanup delete[] yData; return localMPIComm.globalSum( localSum );}

  13. Design Concerns • vector y is not guaranteed to have data mapped appropriately for dot product. • vector y is expected to handle MxN data redistribution internally • Should each component implement MxN redistribution? y.requestData( localSize, local2global, yData);

  14. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  15. Vector Dot Product: Take #2 double vector::dot( vector& y ) { // initialize MUX mux( *this, y ); double * yData = mux.requestData( localSize, local2global ); // sum all x[i] * y[i] double localSum = 0.0; for( int i=0; i<localSize; ++i ) { localSum += localData[i] * yData[i]; } // cleanup mux.releaseData( yData ); return localMPIComm.globalSum( localSum );}

  16. Generalized Vector Ops vector<T>::parallelOp( vector<T>& y ) { // initialize MUX mux( *this, y ); vector<T> newY = mux.requestData( localSize, local2global ); // problem reduced to a local operation result = x.localOp( newY ); // cleanup mux.releaseData( newY ); return localMPIComm.reduce( localResult );}

  17. Rule #2: MUX distributes data • Users invoke parallel operations without concern to data distribution • Developers implement local operation assuming data is already distributed • Babel generates code that reduces a parallel operation to a local operation • MUX handles all communication • How general is a MUX?

  18. 0 1 2 3 4 5 6 7 8 9 10 11 Example #2: Undirected Graph 0 0 1 2 1 2 3 4 5 3 4 5 6 7 6 7 8 8 9 10 9 10 11 11

  19. Key Observations • Every Parallel Component is a container and is divisible to subsets. • There is a minimal (atomic) addressable unit in each Parallel Component. • This minimal unit is addressable in global indices.

  20. Atomicity • Vector (Example #1): • atom - scalar • addressable - integer offset • Undirected Graph (Example #2): • atom - vertex with ghostnodes • addressable - integer vertex id • Undirected Graph (alternate): • atom - edge • addressable - ordered pair of integers

  21. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  22. MxNRedistributable Interface interface Serializable { store( in Stream s ); load( in Stream s );}; interface MxNRedistributable extends Serializable { int getGlobalSize(); local int getLocalSize(); local array<int,1> getLocal2Global(); split ( in array<int,1> maskVector, out array<MxNRedistributable,1> pieces); merge( in array<MxNRedistributable,1> pieces);};

  23. Rule #3: All Parallel Components implement “MxNRedistributable” • Provides standard interface for MUX to manipulate component • Minimal coding requirements to developer • Key to abstraction • split() • merge() • Manipulates “atoms” by global address

  24. Now for the hard part... ... 13 slides illustrating how it all fits together for an Undirected Graph

  25. pid=0 0 1 2 pid=1 3 4 5 6 7 8 9 10 11 %> mpirun -np 2 graphtest

  26. pid=0 orb 2 3 0 1 2 1 pid=1 3 4 4 5 orb 6 7 8 9 10 11 BabelOrb * orb = BabelOrb.connect( “http://...”);

  27. 2 3 graph MUX graph MUX 1 0 graph 4 MUX 1 2 3 4 5 graph MUX 6 7 8 graph MUX 9 10 11 Graph * graph = orb-> create(“graph”,3); orb orb

  28. graph 0 MUX graph 2 MUX 1 2 0 graph 3 4 5 Fancy MUX Routing 3 4 5 MUX 1 2 6 7 8 5 6 3 4 5 graph 9 10 6 7 8 MUX 6 7 8 graph 9 10 MUX 9 10 11 11 graph->load(“file://...”); orb 2 1 orb

  29. 0 0 0 graph 2 2 2 MUX 1 1 1 2 2 2 0 3 3 3 4 4 4 5 5 5 3 3 3 4 4 4 5 5 5 1 2 6 6 6 7 7 7 8 8 8 5 5 5 6 6 6 3 4 5 9 9 9 10 10 10 6 6 6 7 7 7 8 8 8 6 7 8 graph 9 9 9 10 10 10 MUX 9 10 11 11 11 11 graph->doExpensiveWork(); orb orb

  30. pp 0 graph 2 MUX 1 2 0 3 4 5 3 4 5 1 2 6 7 8 5 6 3 4 5 pp 9 10 6 7 8 6 7 8 graph 9 10 MUX 9 10 11 11 PostProcessor * pp = new PostProcessor; orb orb

  31. 0 1 2 3 4 5 pp 0 graph require 2 MUX 1 2 0 3 4 5 3 4 5 1 2 6 7 8 5 6 6 7 8 9 10 11 3 4 5 pp 9 10 6 7 8 6 7 8 graph require 9 10 MUX 9 10 11 11 pp->render( graph ); • MUX queries graph for global size (12) • Graph determinesparticulardata layout(blocked) orb • MUX is invoked to guaranteethat layout before render implementation is called orb

  32. 0 1 2 3 4 5 pp 0, 1, 2, 3 0 graph require 2 MUX 1 2 0 3 4 5 4, 5 3 4 5 1 2 6 7 8 5 6 6 7 8 9 10 11 3 4 5 pp 6, 7 9 10 6 7 8 6 7 8 graph require 9 10 MUX 9 10 8, 9, 10, 11 11 11 MUX solves general parallel network flow problem (client & server) orb orb

  33. 0 1 2 3 4 5 pp 0, 1, 2, 3 0 graph require 2 MUX 1 2 0 3 4 5 4, 5 3 4 5 1 2 6 7 8 5 6 6 7 8 9 10 11 3 4 5 pp 6, 7 9 10 6 7 8 6 7 8 graph require 9 10 MUX 9 10 8, 9, 10, 11 11 11 MUX opens communication pipes orb orb

  34. 2 3 4 5 3 4 5 0 1 2 3 4 5 6 7 8 pp 6 7 8 0, 1, 2, 3 0 9 10 graph require 2 MUX 1 2 0 3 4 5 4, 5 3 4 5 1 2 6 7 8 5 6 6 7 8 9 10 11 3 4 5 pp 6, 7 9 10 6 7 8 6 7 8 graph require 9 10 MUX 9 10 8, 9, 10, 11 11 11 MUX splits graphs with multiple destinations (server-side) orb orb

  35. 2 3 4 5 3 4 5 0 1 2 3 4 5 6 7 8 pp 6 7 8 0 0 9 10 graph require 2 MUX 1 1 2 2 0 3 4 5 3 3 4 4 5 5 1 2 6 7 8 5 5 6 6 6 7 8 9 10 11 3 4 5 pp 9 10 6 6 7 7 8 8 6 7 8 graph require 9 9 10 10 MUX 9 10 11 11 11 MUX sends pieces through communication pipes (persistance) orb orb

  36. 2 3 4 5 3 4 5 0 1 2 3 4 5 6 7 8 pp 0 6 7 8 0 0 9 10 graph 1 2 require 2 MUX 1 1 2 2 3 4 5 0 3 4 5 3 3 4 4 5 5 6 7 8 1 2 6 7 8 5 5 6 6 6 7 8 9 10 11 3 4 5 pp 9 10 6 6 7 7 8 8 3 4 5 6 7 8 graph require 9 9 10 10 6 7 8 MUX 9 10 11 11 9 10 11 11 MUX receives graphs through pipes & assembles them (client side) orb orb

  37. 0 0 1 2 2 1 2 3 4 5 0 3 4 5 3 4 5 6 7 8 1 2 6 7 8 5 6 3 4 5 9 10 6 7 8 3 4 5 6 7 8 9 10 6 7 8 9 10 11 9 10 11 11 pp -> render_impl( graph ); (user’s implementation runs)

  38. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  39. Summary • All distributed components are containers and subdivisable • The smallest globally addressable unit is an atom • MxNRedistributable interface reduces general component MxN problem to a 1-D array of ints • MxN problem is a special case of the general problem N handles to M instances • Babel is uniquely positioned to contribute a solution to this problem

  40. Outline • Background on Components @llnl.gov • General MxN Solution : bottom-up • Initial Assumptions • MUX Component • MxNRedistributable interface • Parallel Handles to a Parallel Distributed Component • Tentative Research Strategy

  41. Java only, no Babel serialization & RMI built-in Build MUX Experiment Write Paper Finish 0.5.x line add serialization add RMI Add in technology from Fast Track Tentative Research Strategy Fast Track Sure Track

  42. Open Questions • Non-general, Optimized Solutions • Client-side Caching issues • Fault Tolerance • Subcomponent Migration • Inter vs. Intra component communication • MxN , MxP, or MxPxQxN

  43. MxPxQxN Problem Long-Haul Network

  44. MxPxQxN Problem Long-Haul Network

  45. TheEnd

  46. UCRL-VG-142096 Work performed under the auspices of the U. S. Department of Energy by the University of California, Lawrence Livermore National Laboratory under Contract W-7405-Eng-48

More Related