TUESDAY

From LHEP Wiki
Jump to navigation Jump to search

TUESDAY'S OBJECTIVES

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

ATHENA ON THE GRID

  • Write a batch script which runs your Athena job on the local machine.
  • Write the corresponding xrsl file. Submit it to the grid (like described for Monday).

Example which compiles on remote cluster :

[shaug@lheppc44] > cat test.sh

#/bin/bash
# /terabig/shaug/atlas
# tar cvf myAnalysis.tar 14.1.0.2/
pwd
ls -l 
env
export CMTPATH=$HOME:$CMTPATH
cd 14.1.0.2/PhysicsAnalysis/AnalysisCommon/UserAnalysisUtils/cmt
source setup.sh
cmt config
gmake
cd
cd 14.1.0.2/PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt
cmt config
source setup.sh
gmake
cd ../run
athena.py AnalysisSkeleton_topOptions_lowpt.py

[shaug@lheppc44] > cat athena.xrsl

&(executable=test.sh)
(inputFiles=("myAnalysis.tar" "myAnalysis.tar"))
(outputfiles=("/" ""))
(stdout=test.log)
(stderr=test.err)
(jobname=sigves-athena)
(runTimeEnvironment=APPS/HEP/ATLAS-14.1.0.2)

Example without compiling remotely : In order to send the compiled job to the grid we have to include the following directory in the gridfiles.tar file

InstallArea/python

as well as the libraries (inside InstallArea/i686-slc4-gcc34-opt/lib/*.so)

libUserAnalysis.so, 
libAnalysisUtilsLib.so, 
libUserAnalysisUtils.so


The resulting tar file will then contain all the custom .so files and the python directory.

In order to make the system use the custom libraries, one needs to set LD_LIBRARY_PATH (for libraries) and PYTHONPATH (for python bindings):

(just after the tar -xvzf command)

cd gridfiles
a=$(pwd)
export LD_LIBRARY_PATH=$a:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$a/python:$LD_LIBRARY_PATH
export PYTHONPATH=$a/python:$PYTHONPATH


An example bash script which will be executed on the grid:

#/bin/bash
tar -xvf gridfiles.tar
cd gridfiles
a=$(pwd)
export LD_LIBRARY_PATH=$a:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$a/python:$LD_LIBRARY_PATH
export PYTHONPATH=$a/python:$PYTHONPATH
athena.py AnalysisSkeleton_topOptions.py