Difference between revisions of "Ganga with AMAAthena"

From Atlas Wiki
Jump to navigation Jump to search
Line 48: Line 48:
 
  <pre>% get_files -jo AMAAthena_jobOptions_new.py</pre>   
 
  <pre>% get_files -jo AMAAthena_jobOptions_new.py</pre>   
 
  </ul>
 
  </ul>
<li>convert user-level AMA configuration file into a Athena job option file
+
<li>convert user-level AMA configuration file into a Athena job option file.  For example, if you have a configuration file called
<pre>% AMAConfigfileConverter my_ama_config.conf my_ama_config.py</pre>
+
<pre>% AMAConfigfileConverter data09_wjet_muon_sel.conf data09_wjet_muon_sel.py</pre>
<li>create a runtime definition job option
+
<li>create a runtime definition job option called <tt>rundef.py</tt> and edit it as the following example:
 +
<pre>
 +
SampleName = 'data09_900GeV_00140541_MuonswBeam'
 +
ConfigFile = 'data09_wjet_muon_sel.py'
 +
FlagList = ''
 +
EvtMax = -1
 +
AMAAthenaFlags = ['DATA', 'TRIG']
 +
</pre>
 +
 
 +
The variables in rundef.py is explained in the following:
 +
<ul>
 +
<li>'''SampleName''': the user defined sample name.  This name will be used in composing the AMA summary output files.
 +
<li>'''ConfigFile''': the job option file name converted from the user-level configuration file (the output of step 2)
 +
<li>'''FlagList''':
 +
<li>'''EvtMax''': the maximum number of event to be processed in the job
 +
<li>'''AMAAthenaFlags''': the additional AMA job option files to be included by the main AMA job option file.  This is ignored if using AutoConfiguration.
 +
</ul>
 +
 
 
</ol>
 
</ol>
  

Revision as of 16:09, 12 January 2010

Introduction

This page will describe how to run AMAAthena jobs with Ganga on different computing platforms (Stoomboot, lxbatch, Grid).

Preparation

  • Make sure you can run AMAAthena standalone on local desktop. Here are instructions about doing it at NIKHEF: Using Athena at NIKHEF
  • Make sure you manage to submit HelloWorld jobs to different computing platforms. Here are instructions: Ganga: basic usage

Starting Ganga

Before starting Ganga, set CMT environment properly. Here is the example commands presuming that you have the setup scripts for CMT in $HOME/cmthome directory.

% source $HOME/cmthome/setup.sh -tag=15.6.1,32
% source $TestArea/PhysicsAnalysis/AnalysisCommon/AMA/AMAAthena/cmt/setup.sh

The start Ganga in $TestArea/PhysicsAnalysis/AnalysisCommon/AMA/AMAAthena/run directory.

% cd $TestArea/PhysicsAnalysis/AnalysisCommon/AMA/AMAAthena/run
% source /project/atlas/nikhef/ganga/etc/setup.[c]sh
% ganga --config-path=/project/atlas/nikhef/ganga/config/Atlas.ini.nikhef

Making Ganga/Athena job

To create a new job in Ganga, do

In [n]: j = Job()

and you can set job's name as

In [n]: j.name = 'my_ama_job'

Application configuration

AMAAthena is an Athena "Algorithm", so you can just use the Athena application object in Ganga to configure your AMAAthena job. However, there are steps to be done before setting the Athena application object in Ganga:

  1. copy the top-level job option file of AMAAthena to your working directory:
    • with AutoConfiguration
      % get_files -jo AMAAthena_jobOptions_AUTO.py
    • without AutoConfiguration
      % get_files -jo AMAAthena_jobOptions_new.py
  2. convert user-level AMA configuration file into a Athena job option file. For example, if you have a configuration file called
    % AMAConfigfileConverter data09_wjet_muon_sel.conf data09_wjet_muon_sel.py
  3. create a runtime definition job option called rundef.py and edit it as the following example:
    SampleName = 'data09_900GeV_00140541_MuonswBeam'
    ConfigFile = 'data09_wjet_muon_sel.py'
    FlagList = ''
    EvtMax = -1
    AMAAthenaFlags = ['DATA', 'TRIG']
    

    The variables in rundef.py is explained in the following:

    • SampleName: the user defined sample name. This name will be used in composing the AMA summary output files.
    • ConfigFile: the job option file name converted from the user-level configuration file (the output of step 2)
    • FlagList:
    • EvtMax: the maximum number of event to be processed in the job
    • AMAAthenaFlags: the additional AMA job option files to be included by the main AMA job option file. This is ignored if using AutoConfiguration.

Once you have the above steps done, you can proceed in Ganga to set up the Athena application:

In [n]: j.application = Athena()
In [n]: j.application.max_events = -1
In [n]: j.application.option_file += [ File('rundef.py'), File('AMAAthena_jobOptions_AUTO.py') ]
In [n]: j.application.prepare()

InputDataset configuration

Splitter configuration

Backend (platform) configuration