+ All Categories
Home > Documents > 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups...

1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups...

Date post: 26-Mar-2015
Category:
Upload: jesus-strickland
View: 219 times
Download: 1 times
Share this document with a friend
Popular Tags:
48
1 Typed Groups for the Grid Laurent Baduel
Transcript
Page 1: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

1

Typed Groupsfor the Grid

Laurent Baduel

Page 2: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

2

Outline

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 3: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

3

Introduction

Traditional uses of group communicationFault tolerance, ReplicationApplicative groups, Parallelism

Our objectives: Applicative groupsEfficient communicationCollaborative applicationsEasy structuringObject-oriented programming

Page 4: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

4

Analysis of related works 3 projects close to our concerns:

JGroups Centered on low layers of communication Socket programming style

Object Group Service CORBA focused Group communication return only one result (by default)

Group Method Invocation Group members have to implement and extend a

class and an interface

Page 5: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

5

Analysis of related works

Lack of transparency Specific interface for functional calls Inheritance from specific classes and

interfaces Sometimes too application/domain-specific

We want to address those problems !

Page 6: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

6

Communication model

RMI + important new featuresActive object:

A single thread serves requests with a FIFO service

Asynchronous method call Rendez-vous Transparent futures

Wait-by-necessity Automatic wait upon a strict operation on a future First class futures

Page 7: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

7

JVMJVM

Active objectA a = PA.newActive(“A”, […], VirtualNode);V v1 = a.foo (param);V v2 = a.bar (param);…

v1.gee();

a barv1v2 foo

Javaobject

Activeobject

Requestqueue

Future Thread

// Wait-By-Necessity

Page 8: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

8

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 9: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

9

Typed group communications

Idea / goalManipulate groups as “plain” Java objectsMaintain the dot notationCode reusability

Creation of a typed groupGroup members have a common type ancestor

public class A { … }A ag = (A) ProActiveG.newGroup(“A”, params, node);

Page 10: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

10

Group communications

Remote method invocation on a group Multi-unicast approach

Replication of N single communicationsBased on the standard communication

mechanismEach communication is adapted to the calleeAdapt the rendez-vous to group communicationsAdapt the Wait-by-Necessity mechanism

Page 11: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

11

Result of a group communication

Result is dynamically built and updatedV vg = ag.foo();

Immediately operablevg.gee();

Rank property Synchronization primitiveProActiveGroup.waitOne(vg);

ProActiveGroup.waitAll(vg);

Object o = ProActiveGroup.waitAndGetOne(vg);

Page 12: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

12

Group call

JVM

JVM

JVM

JVM

agvg

A ag = PAG.newGroup(“A”,…,vn);V vg = ag.foo(param);…

vg.gee();…

// Wait-By-Necessity

Page 13: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

13

Two representations

Management operations: add, remove, etc.

Two representations of a same groupTyped group (type of the members)

Group of objects (extends Collection)

Ability to switch between themGroup groupA = ProActive.getGroup(ag);

groupA.add(new A());groupA.add(new B()); // B extends A

A ag2 = (A) groupA.getTypedGroup();

Page 14: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

14

Two representations schema

Managementof the group

Functional use of the group

Group of objectsgroupA

getGroupstatic method of class ProActive

getTypedGroupmethod of class Group

Typed groupgA

Single JavaRepresentation

(Transparent) (Explicit)

Page 15: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

15

Broadcast or scatter

Broadcast is the default behavior Scatter is also possible

Scatter uses a group as parameterDistribution relies on rank

ag.bar(cg); // broadcast cg

ProActive.setScatterGroup(cg);

ag.bar(cg); // scatter cg

One call may scatter and broadcast

Page 16: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

16

Broadcast or scatter

JVM

JVM

JVM

JVM

agcg

ag.bar(cg); // broadcast cgProActive.setScatterGroup(cg);ag.bar(cg); // scatter cg

c1 c2c3c1 c2c3

c1 c2c3c1 c2c3

c1 c2c3

c1 c2c3

s

c1 c2c3

s

Page 17: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

17

Static Dispatch Group

JVM

JVM

JVM

JVM

agcg

c1

c2

c3

c4

c5

c6

c7

c8c0

c9c1

c2

c3

c4

c5

c6

c7

c8c0

c9

c1

c2

c3

c4

c5

c6

c7

c8c0

c9

Slowest

Fastestemptyqueue

ag.bar(cg);

Page 18: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

18

Dynamic Dispatch Group

JVM

JVM

JVM

JVM

agcg

c1

c2

c3

c4

c5

c6

c7

c8c0

c9c1

c2

c3

c4

c5

c6

c7

c8c0

c9

c1

c2

c3

c4

c5

c6

c7

c8c0

c9

Slowest

Fastest

ag.bar(cg);

Page 19: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

19

Performances and Optimizations Common operation

Single reificationSingle serialization

Parallel calls (adaptive thread pool)

Page 20: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

20

Error management Using Java exceptions

Common way to express failure in Java A group may produce several exceptions

during one communication Result group is used to store exceptions The ExceptionList is an exception that

contains raised exceptions associated with a reference to the object that produced them

Page 21: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

21

Error interception

JVM

JVM

JVM

JVM

agvg

V vg = ag.foo (param);Group groupV = PAG.getGroup(vg);groupV.getExceptionList();vg.gee();

failure

Except.

Except.List

Page 22: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

22

Active and hierarchical groups

Active group: a group serviceA group becomes remotely accessibleModifiable service policy

Hierarchical groupA group of groupsDynamically builtAchieves scalability

Page 23: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

23

grid frontal

cluster

clusterclustercluster

Grid deployment

Asynchronous callSynchronous call

Page 24: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

24

Grid method calls Grid’5000

Page 25: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

25

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 26: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

26

Jem3D Translation of a FORTRAN application:

EM3D Solves 3D Maxwell equations Relies on finite volume approximation

method Works on unstructured tetrahedral

discretization of the computation domain

Page 27: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

27

Communication based on groups

Groups allow sub-domains communication

Page 28: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

28

Algorithm of Jem3D

Initialization

Compute mag. field, and update elec. field

Compute elec. field, and update mag. field

Calculation of the discreteelectromagnetic energy

Solution Saving

t < tmax

t = tmax

Intensive group communications

Page 29: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

29

Jem3D

Computation of the propagation of an electromagnetic wave in a cubic metallic cavity (standard test case)

INRIA Sophia’s clusterDAS-2

Page 30: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

30

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 31: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

31

Main MPI problems for the Grid

Too static in design Too complex interface (API)

More than 200 primitives and 80 constants Too many specific primitives to be adaptive

Send, Bsend, Rsend, Ssend, Ibsend, etc. Typeless (message passing)

Manual management of complex data structures

Page 32: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

32

Object-Oriented SPMD

MotivationCluster / Grid programmingSPMD programming widely used

Already able to express most of the MPI’s collective communicationsBroadcastScatter

Different barriers Topologies

Gather Reduce

(Single Program Multiple Data)

All scatterAll gather

Page 33: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

33

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

SPMD group CreationA ag = ProActive.newSPMDGroup(“A”, … );

Page 34: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

34

SPMD Group

SPMD Group is a typed group where members get:Local reference to the SPMD group they

belongs toMembershipAccess to their rank

Page 35: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

35

Topologies

Topologies are groups of objectsPlan plan = new Plan(groupSPMD, dimensions); Open API

Neighborhood Creation by extractionLine line = plan.getLine(0);

Page 36: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

36

The Jacobi iterations example

Solve a linear system of equations Typical SPMD program Algorithm loops on:

Exchange dataWait for dataComputeLoop (until exit condition is satisfied)

Page 37: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

37

Jacobi algorithm

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

2 5 7 9 1 0 1 0 5 6 7 8 ……

Page 38: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

38

Global barrier Involves all group membersProActive.barrier(“barrierID”);

JVM

JVMJVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

Page 39: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

39

Neighbor-based barrier Involves only the caller and its neighborsProActive.barrier(“barrierID”, neighbors);

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

Page 40: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

40

Method-based barrier Involves only the caller (no additional messages)

ProActive.barrier({“foo”, “bar”, “gee”});

JVM

JVMJVM

JVM

JVM

JVM

JVM

JVM

JVM

JVM

Page 41: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

41

OO SPMD model

A simple communication modelSmall APINo explicit receive: data flow synchronizationNo message passing: asynchronous RPCComplex data structures (Objects)

SPMD groups are dynamicDedicated barriersTopologies

Page 42: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

42

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 43: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

43

Group behavior manager

Definition of a group behaviorRequest mappingParameters distributionResults gatheringSynchronization semantic

Dynamic configuration and binding IP Multicast library

Bindings to multicast transport protocolTRAM, included in JRMS 1.1

In collaboration with University of Sannio – Benevento (Italy)

Page 44: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

44

Groups in the component framework Implementation of the Fractal component model Collective ports Composite components

Typed group

At binding,on client interface

At composition,on composite inner server interface

Typed groupParallel Component

Page 45: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

45

Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and usage Conclusion and Perspectives

Page 46: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

46

Conclusion High level, Efficient, Transparent, Typed

Group CommunicationNo dedicated inheritance requirementDynamic handling of resultsHigh level synchronization

Tested with a real size application Object-Oriented model for SPMD

ProgrammingMore flexibleEasier to use

Page 47: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

47

Perspectives

Exception handling Improvement of the adaptive thread pool Integrate other group semantics MxN redistribution for components Further development of the OO SPMD

model

Page 48: 1 Typed Groups for the Grid Laurent Baduel. 2 Outline Context and Objectives Typed groups Application: Jem3D Object-Oriented SPMD Group extensions and.

48

Thank you for your attention

? ? ? Questions ? ? ?


Recommended