WEDNESDAY: Difference between revisions

From LHEP Wiki
Jump to navigation Jump to search
No edit summary
 
m (1 revision imported)
 
(No difference)

Latest revision as of 09:49, 18 March 2015

WEDNESDAY'S OBJECTIVES

  • Run your Athena job on the grid with Ganga (this will take your whole day).

ON THE GRID WITH GANGA

First of all, create a ganga setup file (ganga.setup.sh) with this content:

echo '#############Running ganga.setup.sh  ############################'
# the following lines are needed if you use Athena 14.X.X (to avoid some trouble between python releases)
unset LD_LIBRARY_PATH
if [ ! -z ${AtlasVersion} ]
then
if [ ! -z `echo ${AtlasVersion} | grep 14.` ]
then
unset PYTHONPATH
fi
fi
# setup glite, then ganga can check the status of your jobs whern it start
source /terabig/atlsoft/LocalSoft/glite/current/external/etc/profile.d/grid-env.sh # will setup glite
# Environment variables to be able to store the output files on the Storage Element
export LFC_HOST='lfc-atlas-test.cern.ch'
export LCG_CATALOG_TYPE=lfc
export GANGA_CONFIG_PATH=GangaAtlas/Atlas.ini # Atlas setup for ganga
export PATH=/terabig/atlsoft/LocalSoft/ganga/install/5.2.3/bin:$PATH #puts ganga in the path

When sourcing this script, you can run ganga but you won't be able to run easily Athena jobs.

A working procedure is :

1. setup athena what means :

- source the /APPS/HEP/ATLAS-XX release you want to use

- go to the /cmt directory in your preferred package and source the setup.(c)sh script

2. go to your run directory

3. source your ganga setup script

source ganga.setup.sh

Now you should be able to use ganga:

ganga

You will find [here [1]] a tutorial to use Ganga on Nordugrid.

A simple athena job:

type this into ganga, but replace

/terabig/..../run/AnalysisSkeleton_topOptions.py with the full path to your joboptions script

/terabig/..../run/AOD.pool.root with your input file

j = Job()
j.name='NG_Ex3_1'
j.application=Athena()
j.application.prepare(athena_compile=False,NG=True)
j.application.option_file='/terabig/ctopfel/atlas/15.1.0/PhysicsAnalysis/AnalysisCommon/UserAnalysis/run/AnalysisSkeleton_topOptions.py'
j.application.max_events=100
j.outputdata=ATLASOutputDataset()
j.outputdata.outputdata=['AnalysisSkeleton.aan.root']
j.backend=NG()
j.backend.check_availability=True
j.backend.CE = 'grid03.unige.ch'
j.inputdata=ATLASLocalDataset() # output files are stored locally
j.inputdata.names=['/terabig/ctopfel/atlas/15.1.0/PhysicsAnalysis/AnalysisCommon/UserAnalysis/run/AOD.pool.root']
j.submit() 


An other athena job:

j = Job()
j.name='NG_dq2'
j.application=Athena()
j.application.prepare_old(athena_compile=False,NG=True)
j.application.option_file='/terabig/cogneras/TestGanga/PhysicsAnalysis/AnalysisCommon/UserAnalysis/run/AnalysisSkeleton_topOptions.py'
j.application.max_events=200
j.splitter=AthenaSplitterJob()
j.splitter.numsubjobs=3
j.inputdata=DQ2Dataset()
j.inputdata.dataset="mc08.105401.SU1_jimmy_susy.recon.AOD.e352_s462_r541/"
j.inputdata.type='DQ2_LOCAL'
j.inputdata.number_of_files=10
j.outputdata=DQ2OutputDataset()
j.outputdata.outputdata=['AnalysisSkeleton.aan.root']
j.backend=NG()
j.backend.check_availability=True
j.submit()

If it doesn't work, you can tune the ganga profile just copying /terabig/cogneras/.gangarc in your home directory (you can check for the difference between both files)