Presentation is loading. Please wait.

Presentation is loading. Please wait.

Applying the collective entity concept to POP-C++ Pierre Kuonen & Christian Pérez EIA-Fr & INRIA WP3 – Task 3.1 Krakow Meeting, June 27 th 2006.

Similar presentations


Presentation on theme: "Applying the collective entity concept to POP-C++ Pierre Kuonen & Christian Pérez EIA-Fr & INRIA WP3 – Task 3.1 Krakow Meeting, June 27 th 2006."— Presentation transcript:

1 Applying the collective entity concept to POP-C++ Pierre Kuonen & Christian Pérez EIA-Fr & INRIA WP3 – Task 3.1 Krakow Meeting, June 27 th 2006

2 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 2 Outline Context Collective entities POP-C++ Collective entities in POP-C++ Conclusion

3 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 3 Context Work started during a short visit of Christian Pérez to EIA-Fr (January 2006) Collective entity: set up to specify MxN communications between two parallel codes –Originally developed for distributed parallel objects (PaCO++) and components (GridCCM) POP-C++: object oriented programming model for based on task programming

4 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 4 Collective entity : issue Parallel code AParallel code B MPI PVM How to easily and efficiently handle MxN communications?

5 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 5 Collective entity: objective HPC Entity A HPC Entity B What the application designer should see… … and how it must be implemented! Coll. Entity. AColl Entity B

6 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 6 Collective entity : overview (1/3) Abstract model Foundation for building other models –CE + CORBA = PaCO++: Distributed parallel objects –CE + CCM = GridCCM: Distributed parallel components Made of four models –Definition of a distributed collective entity –Connection and communication model Dynamic and parallel connections –MxN data management model Support for unlimited data redistribution methods –Exception handling model in a communication

7 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 7 Collective entity : overview (2/3) Definition of a distributed collective entity –May have managers a) an entity e b) a distributed entity e c) a collective entity State Internal communication capability e0e0 e1e1 enen d) a distributed collective entity (general case) e0e0 e1e1 enen m0m0 mnmn

8 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 8 Collective entity : overview (3/3) Specialization: the connection managers –Input proxy Enable a unique (logical) connection point Hide the parallel nature of the collective entity –Output proxy Deals with out connection requests Deals with the scalar or parallel nature of remote entity e) a collective entity (specialized case) e0e0 e1e1 enen Out Proxy In Proxy i j

9 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 9 The POP Model: Parallel OO Programming Object oriented applicationGrid environment execute Heterogeneous Large scale Unstructured Dynamic and unknown topology Distributed objects Heterogeneous Dynamic “Autonomous” Object Obj Object

10 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 10 POP: An extension of the OO sequential model Generalization of the concept of (sequential) object –But objects can be “efficiently” executed on different machines ….nevertheless modifies as little as possible the OO sequential semantic The “good” proprieties of OO programming paradigm must be conserved –Encapsulation, Interaction by method invocations, Inheritance, Polymorphism,… Parallel object –Various method invocation semantics –Transparent and dynamic object allocation guided by the object resources need. –Shareable, “transmissible” –No explicit send/receive –No (as few as possible) loss of performance

11 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 11 POP: communication model The POP model uses the Inactive objects model –Objects are active only when an method is invocated –Asynchronous method invocation is possible The POP model defines three ways to execute a method –Concurrent No order no atomicity –Sequential Ordered and atomic regarding others sequential methods invocations –Mutex Totally ordered and atomic

12 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 12 Method call semantics: example

13 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 13 POP-C++: exemple File: integer.h 1: class Integer { 2: public: 3: Integer(int wanted, int mini); 4: Integer(char *machine); 5: void Set(int val); 6: int Get(); 7: void Add(Integer &other); 8: private: 9: int data; 10: }; parclass Integer { @{power>=wanted?: mini;}; @{host=machine;}; seq async void Set(int val); conc int Get(); mutex void Add(Integer &other);

14 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 14 Collective entity and POP-C++ Objective –Support parallel object implementation Example: embed a MPI code into a POP-C++ object Definition – A “collective entity” in POP-C++ is a collection (list) of objects of the same class acting altogether as an SPMD program Features: –Invoke a method on all elements (global view) –Invoke a method on a particular element (individual view) Object e0e0 e1e1 enen Out Proxy In Proxy Object

15 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 15 Collective method Rationale –Enable a method to be collectively called on all elements of the collective entity –Support for distributed parameters Declare with a dedicated keyword: coll float x[6]= o b0b0 b1b1 b2b2 ip b op b a0a0 a1a1 ip a op a void foo(float x[]) void bar(float x[])

16 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 16 Group invocation (special case) Rationale –Invoke the method on all the elements of the collective entity –The parameters are replicated (broadcast mode) Declare with a dedicated keyword: all void bar(float x[]) b0b0 b1b1 b2b2 ip b op b a0a0 a1a1 ip a op a o float x[6]= void foo(float x[])

17 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 17 Scalar method in collective entity Rationale –Invoke a scalar method of a collective entity Define the selected element of the collective entity 4 “regular” cases have been selected –first : the first instance of the collection –last : the last instance of the collection –any : any instance of the collection can be selected –random : the instance is randomly chosen b0b0 b1b1 b2b2 ip b op b o

18 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 18 POP-C++ and collective entity: example class MySPMDclass { public: … coll async conc void doComputation(…); first sync mutex float getResult(…); sync seq void aMethod(…); }; => Structural keywords (coll,first, …) are orthogonal to behavioral keywords (sync, async, …)

19 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 19 Helper template to create collective object Two possibilities –Add a new keyword to the language –Use a template Second solution preferred template parclass POPspmd { public: POPspmd(); // n = 1 POPSpmd(int n); SPMDproc* getSPMDprocRef(int no); int getSPMDsize(); };

20 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 20 Example of use (1/2) // Create a collective entity of 10 elements POPsmpd mySPMDobject(10); // collective call from any kind of object mySPMDobject.doComputation(); // method is coll // retrieve the result float r = mySPMDobject.GetResult() // method is first // retrieve the result from proc 4 float r = mySPMDobject.GetSPMDProcRef(4)->GetResult();

21 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 21 Handling distributed data Current rationale –Attach a distribution to parameters –Define distribution as template Inherit from dataDistribution interface  Contains methods called by the runtime to compute MxN communication as define in the collective entity model Example: block cyclic for vectors template class BCvector > : public dataDistribution { public: // methods for “end-user” … // methods from dataDistribution … computeSchedule(…); … private: vector data;// example of private data to store unsigned offset;// the local part of the vector }

22 European Research Network on Foundations, Software Infrastructures and Applications for large scale distributed, GRID and Peer-to-Peer Technologies 22 Conclusion Joint work – Apply the collective entity model to POP-C++ Most of the rationale has been set up –Not presented: support of reduction operations –Specializations of the CE for POP-C++ Individual access to any element of the CE Peaceful cohabitation of –Regular C++ method, –“Scalar” POP-C++ methods, and –Collective methods! Perspective –Finish the rationale for the TR


Download ppt "Applying the collective entity concept to POP-C++ Pierre Kuonen & Christian Pérez EIA-Fr & INRIA WP3 – Task 3.1 Krakow Meeting, June 27 th 2006."

Similar presentations


Ads by Google