24
CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Embed Size (px)

Citation preview

Page 1: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

CONDOR DAGMan and Pegasus

Selim KalayciFlorida International University

07/28/2009

Note: Slides are compiled from various TeraGrid Documentations

Page 2: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

2

DAGMan• Directed Acyclic Graph Manager

• DAGMan allows you to specify the dependencies between your Condor jobs, so it can manage them automatically for you.

• (e.g., “Don’t run job “B” until job “A” has completed successfully.”)

Page 3: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

3

What is a DAG?

• A DAG is the data structure used by DAGMan to represent these dependencies.

• Each job is a “node” in the DAG.

• Each node can have any number of “parent” or “children” nodes – as long as there are no loops!

Job A

Job B Job C

Job D

Page 4: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

4

• A DAG is defined by a .dag file, listing each of its nodes and their dependencies:# diamond.dagJob A a.subJob B b.subJob C c.subJob D d.subParent A Child B CParent B C Child D

• each node will run the Condor job specified by its accompanying Condor submit file

Defining a DAG

Job A

Job B Job C

Job D

Page 5: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

5

Submitting a DAG• To start your DAG, just run condor_submit_dag with

your .dag file, and Condor will start a personal DAGMan daemon which to begin running your jobs:

% condor_submit_dag diamond.dag

• condor_submit_dag submits a Scheduler Universe Job with DAGMan as the executable.

• Thus the DAGMan daemon itself runs as a Condor job, so you don’t have to baby-sit it.

Page 6: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

6

DAGMan

Running a DAG

• DAGMan acts as a “meta-scheduler”, managing the submission of your jobs to Condor-G based on the DAG dependencies.

Condor-GJobQueue

C

D

A

A

B.dagFile

Page 7: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

7

DAGMan

Running a DAG (cont’d)

• DAGMan holds & submits jobs to the Condor-G queue at the appropriate times.

Condor-GJobQueue

C

D

B

C

B

A

Page 8: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

8

DAGMan

Running a DAG (cont’d)

• In case of a job failure, DAGMan continues until it can no longer make progress, and then creates a “rescue” file with the current state of the DAG.

Condor-GJobQueue

X

D

A

BRescue

File

Page 9: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

9

DAGMan

Recovering a DAG -- fault tolerance

• Once the failed job is ready to be re-run, the rescue file can be used to restore the prior state of the DAG.

Condor-GJobQueue

C

D

A

BRescue

File

C

Page 10: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

10

DAGMan

Recovering a DAG (cont’d)

• Once that job completes, DAGMan will continue the DAG as if the failure never happened.

Condor-GJobQueue

C

D

A

B

D

Page 11: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

11

DAGMan

Finishing a DAG

• Once the DAG is complete, the DAGMan job itself is finished, and exits.

Condor-GJobQueue

C

D

A

B

Page 12: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Additional DAGMan Features

• Provides other handy features for job management…

– nodes can have PRE & POST scripts– failed nodes can be automatically re-tried a

configurable number of times– job submission can be “throttled”

Page 13: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

HANDS-ON

• http://users.cs.fiu.edu/~skala001/DAGMan_Lab.htm

Page 14: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Ewa Deelman, [email protected]

www.isi.edu/~deelmanpegasus.isi.edu

Scientific AnalysisW

orkf

low

Evo

lutio

n Select the Input Data

Map the Workflow onto Available Resources

Execute the Workflow

Construct the Analysis

Workflow Template

Abstract Worfklow

Concrete Workflow

Tasks to be executed

Grid Resources

Page 15: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Ewa Deelman, [email protected]

www.isi.edu/~deelmanpegasus.isi.edu

Execution EnvironmentScientific AnalysisW

orkf

low

Evo

lutio

n

Grid Resources

Select the Input Data

Map the Workflow onto Available Resources

Execute the Workflow

Information Services

Library of Application

Components

Data Catalogs

Construct the Analysis

Resource availability and characteristics

Tasks to be executed

Data properties

Component characteristics

Workflow Template

Abstract Worfklow

Concrete Workflow

Aut

omat

edU

ser

guid

ed

Page 16: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Pegasus: Planning for Execution in Grids

• Abstract Workflows - Pegasus input workflow description– workflow “high-level language”– only identifies the computations that a user wants to do– devoid of resource descriptions– devoid of data locations

• Pegasus (http://pegasus.isi.edu)– a workflow “compiler”– target language - DAGMan’s DAG and Condor submit files– transforms the workflow for performance and reliability– automatically locates physical locations for both workflow components and data– finds appropriate resources to execute the components– provides runtime provenance

• DAGMan– A workflow executor– Scalable and reliable execution of an executable workflow

Page 17: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Pegasus Workflow Management System

Condor Schedd

DAGMan

Pegasus mapper

Reliable, scalable execution of independent tasks (locally, across the network), priorities, scheduling

Reliable and scalable execution of dependent tasks

A reliable, scalable workflow management system that an application or workflow composition service can depend on to get the job done

A decision system that develops strategies for reliable and efficient execution in a variety of environments

Cyberinfrastructure: Local machine, cluster, Condor pool, OSG, TeraGrid

Abstract Workflow

client tool with no special requirements on the infrastructure

Page 18: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Generating a Concrete Workflow

Information– location of files and component Instances– State of the Grid resources

Select specific – Resources– Files– Add jobs required to form a concrete

workflow that can be executed in the Grid environment

• Data movement– Data registration– Each component in the abstract

workflow is turned into an executable job

FFT filea

/usr/local/bin/fft /home/file1

Move filea from host1://home/filea

to host2://home/file1

Abstract Workflow

Concrete Workflow

DataTransfer

Data Registration

Page 19: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Information Components used by Pegasus

• Globus Monitoring and Discovery Service (MDS)– Locates available resources– Finds resource properties

• Dynamic: load, queue length• Static: location of GridFTP server, RLS, etc

• Globus Replica Location Service– Locates data that may be replicated– Registers new data products

• Transformation Catalog– Locates installed executables

Page 20: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Example Workflow Reduction

• Original abstract workflow

• If “b” already exists (as determined by query to the RLS), the workflow can be reduced

d1 d2ba c

d2

b c

Page 21: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Mapping from abstract to concrete

• Query RLS, MDS, and TC, schedule computation and data movement

Execute d2 at B

Move b from A

to B

Move c from B

to U

Register c in the

RLS

d2

b c

Page 22: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Pegasus Research

• resource discovery and assessment• resource selection • resource provisioning• workflow restructuring

– task merged together or reordered to improve overall performance

• adaptive computing– Workflow refinement adapts to changing

execution environment

Page 23: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Benefits of the workflow & Pegasus approach

• The workflow exposes – the structure of the application– maximum parallelism of the application

• Pegasus can take advantage of the structure to– Set a planning horizon (how far into the workflow to

plan)– Cluster a set of workflow nodes to be executed as one

(for performance)

• Pegasus shields from the Grid details

Page 24: CONDOR DAGMan and Pegasus Selim Kalayci Florida International University 07/28/2009 Note: Slides are compiled from various TeraGrid Documentations

Benefits of the workflow & Pegasus approach

• Pegasus can run the workflow on a variety of resources • Pegasus can run a single workflow across multiple

resources• Pegasus can opportunistically take advantage of

available resources (through dynamic workflow mapping)

• Pegasus can take advantage of pre-existing intermediate data products

• Pegasus can improve the performance of the application.