46
1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

Embed Size (px)

Citation preview

Page 1: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

1

Andreea Chisunder the guidance of Frédéric Desprez and Eddy Caron

Scheduling for a Climate Forecast Application

ANR-05-CIGC-11

Page 2: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

2

LOGOContents

Scheduling Heuristics3

Introduction 1

Simulation Results4

Related Works2

Conclusions and Future Works5

Page 3: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

3

LOGOContents

Scheduling Heuristics3

Introduction 1

Experimental Results4

Related Works2

Conclusions and Future Works5

Page 4: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

4

LOGO General Purpose

Context : global warming and climate fluctuations

Numerical simulations using general circulation models of a climate system

• atmosphere

• ocean

• continental surfaces

Climatologists’ purpose estimate global warming simulations’ sensitivity with respect to

the model’s parameterization

Climate forecast application provided by CERFACS within the LEGO project

Introduction

Page 5: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

5

LOGOOur Goal

Analyze the application

Model its needs

• Execution model

• Data access pattern

• Computing needs

Elaborate, test and compare appropriate scheduling heuristics

Provide generic scheduling schemes for applications with similar dependence graphs

Introduction

Page 6: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

6

LOGOApplication Description

“Scenario” simulations current climate followed by 21st century for 150 years (1800

months) different parameterization of atmospheric model

Introduction

Page 7: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

7

LOGOApplication Description

One monthly simulation :

concatenate_atmospheric_input_files(1) modify_parameters(1)

process_coupled_run

convert_output_format(60)

compress_diagonals(30) extract_minimun_information(30)

atmospheric model (ARPEGE) ocean and sea-ice model (OPA) runoff pathway (TRIP) coupler (OASIS)

Introduction

Page 8: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

8

LOGOApplication Description

Introduction

Page 9: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

9

LOGOContents

Scheduling Heuristics3

Introduction 1

Experimental Results4

Related Works2

Conclusions5

Page 10: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

10

LOGORelated Works

Multiple DAGs Scheduling Mixed Parallelism Pipelined Data Parallel Tasks

Related Works

Page 11: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

11

LOGOMultiple DAGs Scheduling

Directed Acyclic Graph (DAG) Nodes – tasks Edges – precedence constraints

Multiple DAGs Scheduling

Related Works

Page 12: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

12

LOGOMultiple DAGs Scheduling

Composite DAG

Related Works

Page 13: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

13

LOGOMultiple DAGs Scheduling

Group DAGs’ tasks in levels of independent tasks

Related Works

Page 14: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

14

LOGORelated Works – Multiple DAGs Scheduling

Composite DAG and round-robin policy of scheduling among DAGs

Composite DAG & ranking based composition

Related Works

Page 15: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

15

LOGOMixed Parallelism

Parallel scientific application Data parallelism

Task parallelism

Mixed parallelism

Scheduling a DAG on a finite number of resources – NP complete even for the simple case of mono-processor tasks

Heuristic approaches

Related Works

Page 16: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

16

LOGOMixed Parallelism

A. Radulescu & A. Gemund (2001) – 2 step heuristic - CPA (Critical Path and Area based Scheduling)

Processors allocation to tasks - based on a compromise between the critical path length and the processor utilization

Task allocation on processors - list scheduling heuristic

Related Works

Page 17: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

17

LOGOPipelined Data Parallel Tasks

Computations consisting of a chain of data-parallel tasks that process successive data sets in a pipeline fashion – particular case of mixed parallelism

2 key metrics to be optimized: Latency- duration of processing a data-set Throughput- rate at which data sets can be processed

Related Works

Page 18: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

18

LOGORelated Works – Pipelined Data Parallel Tasks

Aspects to be considered :

Clustering of successive stages into modules

• Reduces communications

• Improves latency

Replicating modules

• Improves throughput

• Increases latency

Related Works

Page 19: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

19

LOGOContents

Scheduling Heuristics3

Introduction 1

Experimental Results4

Related Works2

Conclusions5

Page 20: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

20

LOGOScheduling Heuristics

Climate Application SchedulingGeneric Scheduling Heuristics

Scheduling Heuristics

Page 21: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

21

LOGOClimate Application Scheduling

Homogeneous platform composed of R resources

Communication assumed contention-free through NFS

Tasks execution time is assumed to include the necessary time to access the data

redistribute it to processors

effective computing time

store back the data

Scheduling Heuristics

Page 22: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

22

LOGOClimate Application Scheduling

concatenate_atmosferic_input_files(1) modify_parameters(1)

process_coupled_run

convert_output_format(60)

compress_diagonals(30) extract_minimun_information(30)

Main processing

Post

processing

Scheduling Heuristics

Page 23: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

23

LOGOClimate Application Scheduling

We divide processors into disjoint sets on which multi-processor tasks can execute

All multi-processor tasks execute on the same number of resources G, defining a certain grouping of resources

For the given application, 8 possible values for the parameter G (4 →11)

Scheduling Heuristics

Page 24: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

24

LOGOClimate Application Scheduling

Case 1

Case 2

Scheduling Heuristics

Page 25: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

25

LOGOClimate Application Scheduling

The makespan is computed analytically as a function of number of resources R; grouping G ; number of months in an independent simulation (NM) number of independent simulations (NS).

The grouping G yielding the smallest makespan is chosen

Scheduling Heuristics

Page 26: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

26

LOGOClimate Application Scheduling

The constraint of scheduling all multi-processor tasks on the same number of resources is tight Eg. R=53, NS=10, NM=1800,

• found optimal grouping G = 7;– 49 resources for main processing;– 1 resource used for the corresponding post-processing

– 3 resources unused.• however, 3 groups with 8 resources and 4 groups

with 7 resources – 4.5% of gain

Scheduling Heuristics

Page 27: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

27

LOGOClimate Application Scheduling

Possibilities for improvement :

Heuristic 1• distribute evenly the unused resources among the existing

groups

Heuristic 2• use all resources for multi-processor tasks (evenly

distributing the extra-resources among processor groups)• all post-processing at the end

Heuristic 3• use all resources for multi-processor tasks and model the

problem as an instance of the knapsack problem • all post-processing at the end

Scheduling Heuristics

Page 28: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

28

LOGOClimate Application Scheduling

Knapsack problem modelization Items – the 8 possibilities (groupings of resources) for

allocating processors to multi-processor tasks (4 → 11) Cost of an item – the number of resources of that grouping Value of a grouping G – 1/T[G] – the fraction of a multi-

processor task that gets executed in a time unit on G resources

Unknowns ni (i=4 → 11) – number of groups with i resources in the final solution

Constraints

Goal : maximize

11

4i i Rni

11

4i i NSn

11

4 ][

1i i iT

n

Scheduling Heuristics

Page 29: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

29

LOGOClimate Application Scheduling

Scheduling Heuristics

Page 30: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

30

LOGOGeneric Scheduling Heuristics

Scheduling Heuristics

We propose generic scheduling heuristicsfor a class of applications consisting of independent identical chains of identical DAGs

Page 31: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

31

LOGOGeneric Scheduling Heuristics

First approach Create a composite DAG

– link all entry nodes to a common entry node and all exit tasks to a common exit node

Apply mixed parallelism scheduling heuristics on the composite DAG

• CPA – reduced complexity (O(V(V+E)R)); – drawback of being a 2 step algorithm.

Scheduling Heuristics

Page 32: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

32

LOGOGeneric Scheduling Heuristics

Second approach

Exploit the knowledge on the specific structure of the application

• Exploit the pipelined structure of the application

• Separate the independent pre and post-processing tasks and schedule them with algorithms for independent malleable tasks (5/4 approximation in constant time)

Scheduling Heuristics

Page 33: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

33

LOGOGeneric Scheduling Heuristics

Scheduling Heuristics

Page 34: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

34

LOGOGeneric Scheduling Heuristics

Scheduling Heuristics

Page 35: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

35

LOGOGeneric Scheduling Heuristics

Heuristic 1 Schedule all pre-processing tasks at the beginning Schedule inter and main processing tasks as interval

on the same number of resources Schedule all post-processing tasks at the end

Heuristic 2 Schedule all pre-processing tasks at the beginning Schedule inter and main processing tasks separately

as a pipeline Schedule all post-processing tasks at the end

Scheduling Heuristics

Page 36: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

36

LOGOGeneric Scheduling Heuristics

Heuristic 3 Schedule inter and main processing tasks as an

interval pipeline on the same number of resources Schedule pre and post processing tasks

simultaneously on resources specially reserved for them as well as resources unused by the pipeline

Schedule pre and post-processing tasks left at the beginning and end of pipeline respectively

Scheduling Heuristics

Page 37: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

37

LOGOGeneric Scheduling Heuristics

Heuristic 4 Schedule inter and main processing tasks separately

as a pipeline schedule pre and post processing tasks

simultaneously with the pipeline on resources specially reserved for them as well as resources unused by the pipeline ;

schedule pre and post processing tasks left at the beginning and end of pipeline respectively;

Scheduling Heuristics

Page 38: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

38

LOGOContents

Scheduling Heuristics3

Introduction 1

Simulation Results4

Related Works2

Conclusions5

Page 39: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

39

LOGOSimulation Results

Behavior of the 4 heuristics tested against CPA applied on the composite DAG

Tasks’ execution time modeled by Amdahl’s law:

Several configurations tested

1

1),( T

nntT

Simulation Results

Page 40: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

40

LOGOSimulation Results Configuration 1

All tasks’ execution time on 1 processor identical (500) All tasks’ coefficient α is identical (0.1)

Simulation Results

Page 41: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

41

LOGOSimulation Results Configuration 2

Same as before, with αinterprocessing = 0.8

Simulation Results

Page 42: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

42

LOGOSimulation Results

Configuration 3 T1pre-processing= T1post-processing=50, T1main-processing = T1inter-processing=500

α= 0.1, α inter_processing=0.6

Simulation Results

Page 43: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

43

LOGOSimulation Results Configuration 4

T1pre-processing= T1post-processing=50, T1main-processing = T1inter-processing=500

α= 0.1, α inter_processing=1.0

Simulation Results

Page 44: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

44

LOGOContents

Scheduling Heuristics3

Introduction 1

Experimental Results4

Related Works2

Conclusions and Future Works5

Page 45: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

45

LOGOConclusions

We found a model for the given real application

We proposed a basic heuristic for this model and 3 improved versions

We proposed 4 pipeline- based heuristics for the generalized problem and compared them with the approach of applying a mixed-parallelism algorithm on the composite DAG of the application

Conclusions and Future Works

Page 46: 1 Andreea Chis under the guidance of Frédéric Desprez and Eddy Caron Scheduling for a Climate Forecast Application ANR-05-CIGC-11

46

LOGOFuture Works

Enhance the heuristics by taking into account a more precise communication model

Perform real experimentations on Grid’5000 in order to validate the theoretical results

Analyze other applications using a similar approach with the long term goal of deriving application dependent scheduling schemes that could finally be implemented as DIET plug-in schedulers

Conclusions and Future Works