CMS user jobs submission with the usage of ASAP

Download Report

Transcript CMS user jobs submission with the usage of ASAP

CMS user jobs submission with the usage of ASAP

Natalia Ilina 16/04/2007, ITEP, Moscow 1

What’s ASAP?

ASAP

:

A

rda

S

upport for CMS

A

nalysis

P

rocessing ASAP is a job creation and submission framework for CMS Analysis jobs:  command line tool to create and control jobs  optional server part which can assume responsibility for the users jobs resubmitting in case of failure 2

What’s ASAP?

2 types of jobs can be submitted by ASAP: 

standard user job

- data are registered in CMS DBS/DLS system 

private user job

- any job (the limitation is that ASAP uses scramv1 environment) 3

STEP I

Starting to work with ASAP

4

Starting to work with ASAP

 create the tracking directory which is opened for r/w for everybody: > mkdir user_path/ASAP > chmod a+w user_path/ASAP  setup enviroment: > source /afs/cern.ch/sw/arda/install/CMS/asap3/setup.{sh,csh}  create proxy: > voms-proxy-init -voms cms -valid 192:0 5

Starting to work with ASAP

 create CMSSW project area Usage of default library: > scramv1 project CMSSW CMSSW_1_2_0 > cd CMSSW_1_2_0/src > eval `scramv1 runtime -csh` Changed library: > scramv1 project CMSSW CMSSW_1_2_0 > cd CMSSW_1_2_0/src > project CMSSW > cvs co -r CMSSW_1_2_0 JetMETCorrections/JetVertexAssociation > cd JetVertexAssociation 

Edit *.h, *.cc

> scramv1 b > eval `scramv1 runtime -csh` 6

STEP II

Configure Job

7

Configure Job: STANDARD JOB

Requires 2 files:

1.

CMSSW .cfg file 2.

Configuration file for ASAP (task.conf) 8

Example of task.conf

# specify directory to store tasks

jobdir = /afs/cern.ch/user/n/nilina/scratch0/ASAP_tracking

# Store output at SE

store_output = 1

# store output directly to castor (the dir should already exist and have # the correct permitions: rfchmod 777 /path/output)

output_se = srm.cern.ch

output_se_path = /castor/cern.ch/user/n/nilina/asap # bad_se=fnal.gov

# specify grid to submit to (lcg, my)

grid = lcg

# or specify dataset path

primary_dataset = mc-onsel-120_qqH135_2tau tier = FEVT processed_dataset = CMSSW_1_2_0-FEVT-1166726234

9

Example of task.conf (continue)

# pset file (CMSSW configuration file)

pset_file = JetVertex.cfg

# specify output sandbox, could be filename, # a comma sep list of filename or *

output_files = jetvertex.root

# total number of events you wish to process # (if unspecified assume all)

events_required = 20

# events per job

events_per_job = 5

# specify minimum time requirements for the job

min_wall_clock_time = 100 min_cpu_time = 100

10

Configure Job: PRIVATE JOB

Requires 4 files:

 CMSSW .cfg file  Configuration file for ASAP (task.conf)  dataset.conf - dataset file which tells ASAP which files to use for which jobs and with which parameters  template.sh – script that has to be run at working node 11

template.sh

#!/bin/sh lcg-cp --vo cms lfn:/my_lfn file:///`pwd`/my_lfn cmsRun --parameter-set `pwd`/test_analysis.cfg

Instead of cmsRun one can use any other executable

12

dataset.conf

FORMAT:

INPUT_FILE SKIP_EVENTS MAX_EVENTS ATTRIBUTE_1 … ATTRIBUTE_N Example N1:

input_1.root 0 100 3.5 32 input_2.root 100 200 4.5 20 input_3.root 0 100 3.5 11

Example N2 (if the file is stored in a SE):

srm://srm.cern.ch/castor/cern.ch/user/u/user/input.root 0 100 srm://srm.cern.ch/castor/cern.ch/user/u/user/input.root 100 100

Example N3 (no input data):

- 0 100 345 9329 - 100 100 1345 93290 - 200 100 2345 13290 - 300 100 1111 345

13

Changes in CMSSW .cfg file

# Now it should be:

source = PoolSource { untracked vstring fileNames = {${FILENAMES}} } service = RandomNumberGeneratorService { untracked uint32 sourceSeed = ATTRBUTE_1 PSet moduleSeeds = { untracked uint32 VtxSmeared = ATTRBUTE_2 } }

14

task.conf for private job

# specify directory to store tasks

jobdir = /afs/cern.ch/user/n/nilina/scratch0/ASAP_tracking

# Store output at SE

store_output = 1

# specify grid to submit to (lcg, my)

grid = lcg

# specify dataset file

dataset_file = dataset.conf

# pset file (CMSSW configuration file)

pset_file = test_analysis.cfg

15

task.conf for private job (continue)

# template file (shell script to run at WN)

application_wrapper = template.sh

# specify output sandbox, could be filename, a comma sep list of filename or *

output_files = *.root

# specify minimum time requirements for the job

min_wall_clock_time = 100 min_cpu_time = 100

16

STEP III

Job submition

17

JOB SUBMITION

 Create jobs: > asap --create task.conf

ASAP will package your executable for transfer to the Grid, check DBS/DLS if it is required, provide you with a TASK ID which you should use for all future operations

You’ll see on the screen: * starting asap3 (0_7_13), fasten your seatbelts * split 4 jobs with 20 events * using SCRAM environment * application: CMSSW_1_2_0 * use taskid 95312 for further tracking 18

JOB SUBMITION

 Match jobs: > asap --taskid TASKID --match

Checking if there are resources available to satisfy your jobs requirements

 Submit manually: > asap --taskid TASKID --submit 19

JOB SUBMITION

 Monitor status: > asap –taskid TASKID –update --list You’ll see on the screen: Job ASAP Status GRID Status GRID Reason ---------------------------------------------------------------------------------------------- 1 SUBMITTED Scheduled Job successfully submitted to Globus 2 SUBMITTED Scheduled Job successfully submitted to Globus 3 SUBMITTED Scheduled Job successfully submitted to Globus 4 SUBMITTED Scheduled Job successfully submitted to Globus ---------------------------------------------------------------------------------------------- 20

JOB SUBMITION

 Fetch output from GRID: > asap --taskid TASKID --fetch

If you have not specified an output directory the output will be stored in jobdir/TASKID/output (jobdir was specified in your original config file)

21

Using monitor

 Delegate your proxy: > asap-user-register  Register Jobs with the Monitor: > asap --taskid TASKID --register

ASAP will submit and resubmit jobs to GRID upon completion the output.

The address of a webpage will be displayed.

Before looking at the task one need to insert the GRID certificate in the Browser.

You can track the progress of your jobs by webpage.

22

Using monitor

 Monitor status with cmd line: > asap --taskid TASKID --list  Unregister Jobs: > asap --taskid TASKID --unregister

Before retrieving the output one need to unregister job

23

Other usefull commands

 Kill jobs: > asap --taskid TASKID --kill  Fetch output: > asap --taskid TASKID --fetch --output_dir OUTPUT_DIR > asap --taskid TASKID –fetch-logs > asap --taskid TASKID –fetch-data  Resubmit jobs: > asap --taskid TASKID --submit 24

 ASAP’s User Guide:

Usefull links

http://lxarda13.cern.ch/docs/rn01.html

 Contact:

[email protected]

,

[email protected]

,

[email protected]

25

Practical part of tutorial

 2 examples of standard job: ~nilina/scratch0/ASAP_TUTORIAL/ASAP/EXAMPLE1 ~nilina/scratch0/ASAP_TUTORIAL/ASAP/EXAMPLE2  1 example of private job: ~nilina/scratch0/ASAP_TUTORIAL/ASAP/EXAMPLE3 26