23
Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian PEREZ Projet-team GRAAL - INRIA Rhône-Alpes - ENS Lyon (France) Towards Software Component Assembly Language Enhanced with Workflows and Skeletons

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Embed Size (px)

Citation preview

Page 1: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008

Marco ALDINUCCI and Marco DANELUTTOUNIPI - University of Pisa (Italy)

Hinde Lilia BOUZIANE and Christian PEREZProjet-team GRAAL - INRIA Rhône-Alpes - ENS Lyon (France)

Towards Software Component Assembly Language Enhanced with

Workflows and Skeletons

Page 2: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 2

Outline of the talk

Introduction Software component models

Existing models STCM: a spatio-temporal component model Skeletons based models for parallel programming

STKM: proposal of skeletons introduction in STCM Objectives Overview Example of usage

Conclusions and future works

Page 3: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 3

Context and problematic

Mechanics

Thermal

Optics

Dynamics

LAN

WAN

SAN

SAN

programming simply

Code reuse Assembly

programming independentlyof resources

Portability Efficient

computation

Page 4: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 4

Software component (1/2)

Softwarecomponent

PROVIDEDPORTS

REQUIREDPORTS

(client interfaces)(server interfaces)

Black box Ports

Method invocation (CCM, CCA, Fractal/GCM, SCA) Events (CCM) Streams (Grid.it/ ASSIST) Message passing (Darwin) Document passing (SCA) …

Page 5: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 5

Assembly

Component instances and connections

Architecture Description Language (ADL) CCM, GCM, …

Dynamic (API) CCA, CCM, GCM, …

ADLinstanceComp:

a: A, b: B, c: C, d: D;connections:

a.pA1 <-> b.pB;c.pC <-> d.pD2;d.pD1 <-> a.pA2;

a

b

c

pA1pB

pC

pD2

dpD1

pA2

Page 6: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 6

Limitations of existing component models

Assembly models close to the computing resources Behavior hidden in the assembly

- “Over-consumption” of resources

Simple spatial relations

- Resource dependencies- Complex design

- Parallel paradigms (e.g. master-worker)

A B C

network network

step1 step2 step3

A B C

t

AB

C

ABC

activerunning

Workflow models

Algorithmic skeleton models

Page 7: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 7

Outline of the talk

Introduction Software component models

Existing models STCM: a spatio-temporal component model Skeletons based models for parallel programming

STKM: proposal of skeletons introduction in STCM Objectives Overview Example of usage

Conclusions and future works

Page 8: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 8

Overview of STCM [EuroPar’08]

Combination of component and workflow models Spatial and temporal dimensions at

the same level of assemblies

Component-task Spatial ports (classical ones) Input and output ports (temporal) Task

Assembly model Adaptation of a workflow language end

start

CB

A

Page 9: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 9

Assembly modelcomponent Example { … parallel parCtrl { dataIn Double inPar <= a.outA; component B { dataIn Double inB; clientPort Compute pB; … }; component C { dataIn Double inC; serverPort Compute pC; … };

instance B b; instance C c; connect b.inB to parCtrl.inPar; connect c.inC to parCtrl.inPar; connect b.pB to c.pC; // instructions section : exectask (a); section : exectask (b); } // end parallel …}

CB

A

D

pC

pB

outA

inB inC

inPar

Page 10: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 10

Algorithmic skeletons [M. Cole 1989]

Predefined patterns for parallel programming Stream parallel

Pipeline, farm, … Data parallel

Map (independent forAll), reduce, …

Structured programming Simplicity Correctness of programs

Hide the complexity of parallelism management Creation of processes, data distribution, ..

Behavioral skeletons add advanced management for adaptation

Page 11: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 11

Algorithmic skeletons

sequential

int a float b

pipe p

int int floatfloat

p1 p2 p3

pipe pp

farm f

pp1 pp3w

w

emitter collector

floatfloat intint int

int

compute in (int a) out (float b) $ sequential code $end

pipe p in (int a) out (float b) p1 in (a) out (float b1) p2 in (b1) out (int b2) p3 in (b2) out (b)end pipe

farm f in (int af) out(int bf) w in (af) out(bf)end farmpipe pp in (float a) out(float b) pp1 in (b) out (int b1) f in (b1) out (b2) pp3 in (b2) out (b)end pipe

Page 12: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 12

Outline of the talk

Introduction Software component models

Existing models STCM: a spatio-temporal component model Skeletons based models for parallel programming

STKM: proposal of skeletons introduction in STCM Objectives Overview Example of usage

Conclusions and future works

Page 13: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 13

Objectives

Simplifying programming parallel parts of an application

Offering a similar level of abstraction as in skeleton models

Portability on different execution resources Code reuse Efficiency

Page 14: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 14

Overview of STKM

Assembly model STCM assembly + skeleton

constructs An STKM skeleton is a

composite with a predefined behavior

Parameterization Wrapping components

Usage in spatial and temporal dimension Port cardinality principle

(temporal dimension)

step3

step1

pipe

bp1 p2 p3a

Parallel step2

Page 15: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 15

Component wrappingand port cardinality principle

A skeleton element is a wrapped component

inSkel outSkel

longfloat float long

stream ports

op (in float, out long)

inSkel

outSkel long

float

float

long

Port cardinality

p1

p2

p3

pipe

A

B

1

n

1

n

forAll … setOut...

wait n data before

task execution

Page 16: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 16

Assembly model

ww

farm step2

step1

step3

component Example{ … Step1 and Step3 components…

farm Step2{ inputSkel double inS2; outputSkel string outS2;

worker sequential w { inputSkel double inW; outputSkel string outW; component Worker{ streamIn double inW; streamOut string outW; }; connect outW to Worker.outW; connect Worker.inW to inW; };

instances: Step1 step1; Step2 step2; Step3 step3; … Connexions step1 <=> step2 <=> step3 …sequence ApplMain{ exectask(step1); exectask(step2); exectask(step3);};

Page 17: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 17

Check

STKM usage and benefits

Split

FingerPrintMatcher(Functional replication skeleton)

GateAdmin

MGR

Gate

Gate

Gate

w

w

SplitMGR

CE

w

w

Page 18: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 18

Outline of the talk

Introduction Software component models

Existing models STCM: a spatio-temporal component model Skeletons based models for parallel programming

STKM: proposal of skeletons introduction in STCM Objectives Overview Example of usage

Conclusions and future works

Page 19: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 19

Conclusions

A combination of component models, workflows and skeletons

Previous works STCM: merging component models with

workflows (Related work) Skeleton models

Contribution: STKM Merging STCM with skeleton models

All advantages in a same model

Page 20: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 20

Perspectives

Already done Manual implementation prototype on top of SCA Preliminary experiments results (TR-0171 CoreGrid)

Future works Framework implementation for automatic

generation of assemblies at execution Generic skeletons constructs for easy extension

with new skeletons Applications implementation

Page 21: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 21

Questions ?

Page 22: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 22

Page 23: Hinde Bouziane – CBHPC’08 – 16-17 October 2008 Marco ALDINUCCI and Marco DANELUTTO UNIPI - University of Pisa (Italy) Hinde Lilia BOUZIANE and Christian

Hinde Bouziane – CBHPC’08 – 16-17 October 2008 23

STKM usage and benefits: example 2

Task graph managed by an engine “à la workflow”

Mapping to behavioral skeletons

forAll

s3

s1

s2

s5

s4

s6

s0At execution

s0

s6

s1 s2 s3

s5

s4 s4

loop

fRep

OR