on going work at eia-frmarcod/wp3homepage/london06/eia-fr.pdf · 2-an arriving sequential call is...
TRANSCRIPT
On going work at EIA-FRThe POP programming modeland the POP-C++ tool
Tél. : ++41 (0)26 429 65 65
Fax: : ++41 (0)26 429 66 00
Prof. Pierre Kuonen,
Communication and Information Technologies Dpt.
GRID & Ubiquitous Computing Group
University of Applied Science Western Switzerland
1/19/2006 CurrentWork at EIA-FR: the POP model 2
POP: Parallel Object Programming
Object oriented application Grid environment
execute
• Heterogeneous• Large scale• Unstructured• Dynamic and unknown topology
• Distributed objects• Heterogeneous• Dynamic• “Autonomous”
ObjectObj
Object
ObjectObject
Object
1/19/2006 CurrentWork at EIA-FR: the POP model 3
POP: Inactive objectsInactive objects
Objects are active only when an method is invocatedCloser to the sequential semantic but…
Parallelism must be realized thanks to methods invocations
Need for asynchronous method invocation
1/19/2006 CurrentWork at EIA-FR: the POP model 4
POP: Methods invocations, caller side
SynchronousMethod returns when the execution is finished
Same semantic than sequential invocation
AsynchronousMethod returns immediately
Allows parallelism but.. no returned value
Object 1 Object 2
Object 1 Object 2
Parallel execution
1/19/2006 CurrentWork at EIA-FR: the POP model 5
POP: Methods invocations, recipient side
We transformed a «parallelism» problem in a «concurrency»problem
Order and atomicity
Object 1 Object 2
Call method X
Parallel execution
Object 3
Call method Y
1/19/2006 CurrentWork at EIA-FR: the POP model 6
POP: Order and atomicity controlThe POP model defines three ways to execute a method
ConcurrentNo order no atomicity (time sharing)
SequentialOrdered and atomic regarding others sequential methods of the object
MutexTotally ordered and atomic
1/19/2006 CurrentWork at EIA-FR: the POP model 7
O1 O2
Method call semantics : example
O2.Mseq()
Delayed
Delayed
Delayed
Delayed
O2.Mseq()
O2.Mconc()
O2.Mmut()
O2.Mconc()
O2.Mconc()
O2.Mseq()
All calls are asynchronous
1/19/2006 CurrentWork at EIA-FR: the POP model 8
Method call semantics : definition1 - An arriving concurrent call can be executed concurrently (time sharing) when it arrives, except if mutex calls are pending or executing. In the later case he is executed after completion of all mutex calls previously arrived.
2-An arriving sequential call is executed after completion of all sequential and mutex calls previously arrived.
3-An arriving mutex call is executed after completion of all calls previously arrived.
1/19/2006 CurrentWork at EIA-FR: the POP model 9
POP-C++
POP-C++ is an implementation of the parallel object model as an extension of C++
SyntaxSix new key words have been added to the language
parclass : to declare a parallel class
Any instance (object) of a parallel class is a parallel objectasync : asynchronous method call
sync : synchronous method call
conc : concurrent method execution
seq : sequential method execution
mutex : mutex method execution
1/19/2006 CurrentWork at EIA-FR: the POP model 10
Object descriptionParallel objects can express the needed resources to run thanks to a so-called object description (OD).
OD is a part of the POP-C++ language.
Each constructor of a parallel class can be associated with an OD which contains a high level expression that can be parameterized with actual inputs of the constructor.
These requirements will be evaluated at run-time to generate the resource requirement specification which in turn will be used by the runtime system to perform the resource discovery for that specific parallel object.
1/19/2006 CurrentWork at EIA-FR: the POP model 11
OD: Exampleparclass MyObj
{
public:
MyObj(float P) @{ od.power(P); od.memory(100,60);od.protocol("socket http");};
...
};
Interpretation:To run an instance of MyObj we need:
A P Mflops processor (available power)Preferably 100 MB of ram but at least 60MBThe protocol to use to communicate with this object is socket or http
1/19/2006 CurrentWork at EIA-FR: the POP model 12
POP and SPMDIntegration of MPI in POP-C++
POP-C++ can encapsulate MPI processesEach MPI process becomes a parallel object
Can communicate through MPI callORusing remote methods invocation
The popc_mpi.h library provides the template class POPMPI
template<class T> class POPMPI
{public:
POPMPI(int nb);
bool executeMPI();
inline operator T*();
/* … */
}
1/19/2006 CurrentWork at EIA-FR: the POP model 13
MPI objects in POP-C++#include <popc_mpi.h>#include <mpi…h>parclass TestMPI{public:
async void ExecuteMPI(); // Mandatory, MPI computationsync float GetResult();
/* … */
int main(){
POPMPI<TestMPI> myMpiProc(10); // Create 10 MPI processes/* … */myMpiProc.ExecuteMPI(); // Launch ExecuteMPI on all proc.x=myMpiProc[9].GetResult(); // Access a specific proc.
}
1/19/2006 CurrentWork at EIA-FR: the POP model 14
POP-C++ implements the parallel object model
A minimal extension of C++
class Foo { ...
Foo(...);
void MyMethod(...);
};
Foo::Foo(...) { ...}
void Foo::MyMethod(...){...}
Constructor:
Method:
POP-C++C++
Shared implementation
parclass Foo { ...
Foo(...) @{ power=100;};
async conc void MyMethod(...);
};
1/19/2006 CurrentWork at EIA-FR: the POP model 15
Overview of POP-C++ architecture
Release 1.1 of POP-C++ is available at:http://www.eif.ch/gridgroup/popc/
High performance applications
POP-C++ programming language
System wide services
App-scopeservices Comm
Heterogeneous environment
Support parallel objectsPOP-C++ compiler
Running POP-C++ applications
Executing environment (the Grid)
Globus, XtremWeb, ssh, Unicore,…
1/19/2006 CurrentWork at EIA-FR: the POP model 16
POP-C++ and CoreGRIDTo implement POP-C++ using «CoreGRID middleware»
Unicore, FHG FJUL (on going)
Assist, UNIPI (on going fellowship)
More related to WP6
To merge POP model with other models developed in CoreGRIDPacO++, INRIA/IRISA (on going white paper)
…
Related to task 3.1
To use POP-C++ to implement components compliant with the CoreGRIDmodel
Related to task 3.2
To port POP-C++ in specific environmentsCray supercomputer, Blue Gene, …
DSP multi processor boards
Tank you for your attention !!