building an athena job with ganga a step-by-step gui approach tutorial material by c l tan

22
Building an Athena Job with GANGA a step-by-step GUI approach Tutorial Material by C L Tan

Upload: justin-tyler

Post on 01-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Building an Athena Job with

GANGAa step-by-step GUI approach

Building an Athena Job with

GANGAa step-by-step GUI approach

Tutorial Material by C L TanTutorial Material by C L Tan

j = Job()j.name='Athena_DQ2_IO'j.application=Athena()j.application.prepare()j.application.option_file= '$HOME/athena/testarea/11.0.5/InstallArea/jobOptions/UserAnalysis/AnalysisSkeleton_jobOptions.py'j.inputdata=DQ2Dataset()j.inputdata.type='DQ2_LOCAL'j.inputdata.dataset="csc11.005300.PythiaH130zz4l.recon.AOD.v11004103"j.inputdata.names=[ 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00025.pool.root.5', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00028.pool.root.2', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00017.pool.root.2' ]j.outputdata=DQ2OutputDataset()j.outputdata.outputdata=['AnalysisSkeleton.aan.root']j.backend=LCG()j.backend.CE='cclcgceli02.in2p3.fr:2119/jobmanager-bqs-short'j.submit()

j = Job()j.name='Athena_DQ2_IO'j.application=Athena()j.application.prepare()j.application.option_file= '$HOME/athena/testarea/11.0.5/InstallArea/jobOptions/UserAnalysis/AnalysisSkeleton_jobOptions.py'j.inputdata=DQ2Dataset()j.inputdata.type='DQ2_LOCAL'j.inputdata.dataset="csc11.005300.PythiaH130zz4l.recon.AOD.v11004103"j.inputdata.names=[ 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00025.pool.root.5', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00028.pool.root.2', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00017.pool.root.2' ]j.outputdata=DQ2OutputDataset()j.outputdata.outputdata=['AnalysisSkeleton.aan.root']j.backend=LCG()j.backend.CE='cclcgceli02.in2p3.fr:2119/jobmanager-bqs-short'j.submit()

Athena Job Building (CLI-style)

Athena Job Building (CLI-style)

We have seenWe have seen

Working with the Ganga GUI

Working with the Ganga GUI

Now to try Now to try

GUI main windowTo start the GANGA GUI, simply type:$ /afs/cern.ch/sw/ganga/slc3_gcc323/4.2.4/ganga/bin/ganga --gui

Job Builder windowCreate a new job by clicking on the New button.

j = Job()

Choose applicationIn the Job Builder window, select the application(Executable) job attribute from the job attributes list and left-click on the corresponding drop-drop menu. Choose Athena.

j.application = Athena()

Provide job options file

Provide the option file required by the Athena job. Use the Browse button if necessary.

j.application.option_file = ‘$HOME/athena/testarea/12.0.31/PhysicsAnalysis/AnalysisCommon/UserAnalysis/run/AnalysisSkeleton_topOptions.py’

Choose backendSelect the backend(Local) job attribute from the job attributes list and left-click on the corresponding drop-drop menu. Choose LCG.

j.backend = LCG()

Provide CE locationProvide the location of the CE.

j.backend.CE = ‘cclcgceli02.in2p3.fr:2119/jobmanager-bqs-short’

Choose input data type

Select the inputdata(None) job attribute from the job attributes list and left-click on the corresponding drop-drop menu.Choose DQ2Dataset.

j.inputdata = DQ2Dataset()

Provide input dataset

Provide the name of the input dataset required by the job.

j.inputdata.dataset = ‘csc11.005300.PythiaH130zz4l.recon.AOD.v11004103’

Provide file names in dataset (optional)

Use the Add button to create additional name entries.

j.inputdata.names = ['csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00025.pool.root.5', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00028.pool.root.2', 'csc11.005300.PythiaH130zz4l.recon.AOD.v11004103._00017.pool.root.2']

Define input dataset type

Define the type of the input data.

j.inputdata.type = ‘DQ2_LOCAL’

Choose output dataset definition

Select the outputdata(None) job attribute from the job attributes list and left-click on the corresponding drop-drop menu.Choose DQ2OutputDataset.

j.outputdata = DQ2OutputDataset()

Define output data filename

Use the Add button to create additional name entries.

j.outputdata.outputdata = [‘AnalysisSkeleton.aan.root’]

Define retrieval destination of output data.

Define the location of the output data upon retrieval.

j.outputdata.local_location = ‘$HOME/myGangaOutputdataDir’

Prepare the jobLeft-click and hold on to the Extras button to reveal pop-up menus.Select Job.application>prepare.

j.application.prepare()

Submit job...Retrieve Job Output

Click on the Submit button.

j.submit()

When job has completed, to retrieve job output, click on the Retrieve Output button.

Retrieve Job Output (cont.)

The output retrieval window:1) view/edit output files with the Open button.2) retrieve selected file to an alternative location with Browse button (to select destination directory) followed by the Retrieve button.

Retrieve Output Data

Select appropriate job tab in Job Builder, left-click and hold on to the Extras button. Select Job.outputdata>retrieve. Data will be retrieved to location defined in job.outputdata.local_location.

jobs[10].subjobs[0].outputdata.retrieve()

Ignore argument list request

The j.outputdata.retrieve() method takes two arguments. These are not in use at the moment. Click Ok.

Done!

End of Athena job building exercise