Sottomissione di job di analisi
con prun
Esempio basato sul pacchetto di analisi per il Top
Marino Romano
Analisi del top
https://svnweb.cern.ch/cern/wsvn/atlasgrp/Institutes/Bologna/
Analisi del top (esempio)
• Checkout dei pacchetti
$ svn co
svn+ssh://nomeutente@svn+ssh://svn.cern.ch/reps/atlasusr/m
romano/AnalysisFramework/trunk AnalysisFramework
$ svn co
svn+ssh://nomeutente@svn+ssh://svn.cern.ch/reps/atlasusr/m
romano/NoteXIAnalysis/trunk NoteXIAnalysis
• Installazione
$
$
$
$
cd AnalysisFramework
make PREFIX=your_install_dir (default $HOME/local)
cd NoteXIAnalysis
make PREFIX=same_as_above
• Esecuzione
$ ./NoteXIRunner –d dataset_dir –o outputfile
other options)
( plus
Il pacchetto HelloWorldOnGrid
https://svnweb.cern.ch/cern/wsvn/atlasusr/mromano/HelloWorldOnGrid
$ svn co
svn+ssh://nomeutente@svn+ssh://svn.cern.ch/reps/atlasusr/mroman
o/HelloWorldOnGrid/trunk HelloWorldOnGrid
$ cd HelloWorldOnGrid
$ ./submit_analysis.sh
#!/bin/bash
ANALYSIS=NoteXI
[…]
echo "Removing previous installations before submitting job"
./clean.sh $ANALYSIS
today=`date +%Y%m%d%H%M`
datasets=data10_7TeV.00167575.physics_Egamma.merge.NTUP_TOP.f298_m634_p291_p297_tid183390_00
…
echo "Launching analysis ${ANALYSIS}Analysis"
for inds in $datasets
do
echo "Input dataset" $inds
outds=user.MarinoRomano.HelloWorld.histograms.${today}
echo "Output dataset" $outds
echo $outds >> output.list
prun --exec "./launch_analysis.sh $ANALYSIS" --bexec "source build_analysis.sh $ANALYSIS" --outputs
BaselineAnalysis.root --athenaTag=15.6.9.3.1 --inDS $inds --outDS $outds --excludedSite
ANALY_LRZ,ANALY_GOEGRID,ANALY_SLAC,ANALY_LYON_DCACHE,ANALY_LONG_LYON_DCACHE,ANALY_PIC,ANALY_MW
T2 --nGBPerJob=5
done
#!/bin/bash
ANALYSIS=NoteXI
if [ $# -gt 0 ]
then
ANALYSIS=$1
fi
ROOT_DIR=$PWD
ANALYSIS_LOCAL=$ROOT_DIR/local
ANALYSIS_FRAMEWORK_DIR=$ROOT_DIR/AnalysisFramework
ANALYSIS_DIR=$ROOT_DIR/${ANALYSIS}Analysis
cd $ANALYSIS_FRAMEWORK_DIR
gmake clean
cd $ANALYSIS_DIR
gmake clean
#~ cd $ANALYSIS_LOCAL/lib
#~ rm *so* -vrf
#~ cd $ANALYSIS_LOCAL/include/AnalysisFramework/
#~ rm *.h -vrf
#~ cd TinyXML
#~ rm *.h
#~ cd $ANALYSIS_LOCAL/share/AnalysisFramework/
#~ rm *.xml
rm -vrf $ANALYSIS_LOCAL
#!/bin/bash
ANALYSIS=NoteXI
[…]
echo "Removing previous installations before submitting job"
./clean.sh $ANALYSIS
today=`date +%Y%m%d%H%M`
#datasets=data10_7TeV.00167575.physics_Egamma.merge.NTUP_TOP.f298_m634_p291_p297_tid183390_00
…
echo "Launching analysis ${ANALYSIS}Analysis"
for inds in $datasets
do
echo "Input dataset" $inds
outds=user.MarinoRomano.HelloWorld.histograms.${today}
echo "Output dataset" $outds
echo $outds >> output.list
prun --exec "./launch_analysis.sh $ANALYSIS" --bexec "source build_analysis.sh $ANALYSIS" --outputs
BaselineAnalysis.root --athenaTag=15.6.9.3.1 --inDS $inds --outDS $outds --excludedSite
ANALY_LRZ,ANALY_GOEGRID,ANALY_SLAC,ANALY_LYON_DCACHE,ANALY_LONG_LYON_DCACHE,ANALY_PIC,ANALY_MW
T2 --nGBPerJob=5
done
#!/bin/bash
#asetup runtime,TopPhys,15.6.12.7.1
ROOT_DIR=$PWD
ANALYSIS_LOCAL=$ROOT_DIR/local
ANALYSIS_FRAMEWORK_DIR=$ROOT_DIR/AnalysisFramework
ANALYSIS_DIR=$ROOT_DIR/NoteXIAnalysis
if [ ! -d $ANALYSIS_LOCAL ]
then
mkdir $ANALYSIS_LOCAL
mkdir $ANALYSIS_LOCAL/share
mkdir $ANALYSIS_LOCAL/lib
mkdir $ANALYSIS_LOCAL/include
mkdir $ANALYSIS_LOCAL/bin
fi
$BoostVERS
$CMTCONFIG
echo cmtconfig is $CMTCONFIG
echo boost version is $BoostVERS
echo Boostinc is ${SITEROOT}/sw/lcg/external/Boost/1.39.0_python2.5/i686-slc5-gcc43-opt/include/boost-1_39
cd $ANALYSIS_FRAMEWORK_DIR
gmake -j8 PREFIX=$ANALYSIS_LOCAL
cd $ANALYSIS_DIR
make PREFIX=$ANALYSIS_LOCAL
#!/bin/bash
ANALYSIS=NoteXI
[…]
echo "Removing previous installations before submitting job"
./clean.sh $ANALYSIS
today=`date +%Y%m%d%H%M`
#datasets=data10_7TeV.00167575.physics_Egamma.merge.NTUP_TOP.f298_m634_p291_p297_tid183390_00
…
echo "Launching analysis ${ANALYSIS}Analysis"
for inds in $datasets
do
echo "Input dataset" $inds
outds=user.MarinoRomano.HelloWorld.histograms.${today}
echo "Output dataset" $outds
echo $outds >> output.list
prun --exec "./launch_analysis.sh $ANALYSIS" --bexec "source build_analysis.sh $ANALYSIS" --outputs
BaselineAnalysis.root --athenaTag=15.6.9.3.1 --inDS $inds --outDS $outds --excludedSite
ANALY_LRZ,ANALY_GOEGRID,ANALY_SLAC,ANALY_LYON_DCACHE,ANALY_LONG_LYON_DCACHE,ANALY_PIC,ANALY_MW
T2 --nGBPerJob=5
done
#!/bin/bash
ANALYSIS=NoteXI
if [ $# -gt 0 ]
$PREFIX
then
ANALYSIS=$1
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/local/lib
echo $LD_LIBRARY_PATH
echo ls .
ls .
cd ${ANALYSIS}Analysis
./${ANALYSIS}Runner –d $PWD/..-w JSearcyD3PD -p cardfiles/Analysis_periodH.xml | tee
../log.txt
cp Baseline*root ..
I Makefile
BOOSTINC =
$(SITEROOT)//sw/lcg/external/Boost/
1.39.0_python2.5/i686-slc5-gcc43opt/include/boost-1_39
BOOSTINC =
/net/nas/datanas/users/disipio/athe
na/15.6.12/sw/lcg/external/Boost/1.
39.0_python2.5/i686-slc5-gcc43opt/include/boost-1_3
BAT =
${ATLAS_EXTERNAL}/BAT/0.3.2/i686slc5-gcc43
BAT = ${ATLAS_EXTERNAL}/BAT/*/i686slc5-gcc43
I Makefile
include Makefile.inc
------------------------------
BOOSTINC =
#BOOSTINC =
/net/nas/datanas/users/disipio/athena/15. /net/nas/datanas/users/disipio/athena/15.
6.12/sw/lcg/external/Boost/1.39.0_python2 6.12/sw/lcg/external/Boost/1.39.0_python2
.5/i686-slc5-gcc43-opt/include/boost-1_39 .5/i686-slc5-gcc43-opt/include/boost-1_39
all: NoteXIAnalyzer.o NoteXIRunner lib
HelloWorld
lib: NoteXIAnalyzer.o #dictionary.cxx
HelloWorld: ConfigFile.o NoteXIAnalyzer.o
$(CXX) $(CXXFLAGS) $(DEBUG) I$(FRMWK_INCDIR) -IConfigFile
$(LIBRARY_PATH)/$(ANALY_LIB) ConfigFile.o
NoteXIAnalyzer.o \ HelloWorld.C -o
HelloWorld
all: NoteXIAnalyzer.o NoteXIRunner lib
lib: NoteXIAnalyzer.o dictionary.cxx
#
#
#
#
#
#
#
Prospettive
Separare i pacchetti di analisi veri e propri dagli script per lanciarli sulla grid
(i link simbolici
pare non
funzionino)
Rendere il codice piuì flessibile alle varie versioni di athena (ad esempio con la release 16 la
versione di boost e’ passata dalla 1.39 alla 1.42)
Automatizzare il tutto
Decidere se mantenere degli script unici usabili da tutti o ognuno se li fa per se’ (in fondo si
tratta di arrangiare il comando prun a seconda delle proprie esigenze)
Riserve
(da testare)
cd $ANALYSIS_FRAMEWORK_DIR
Boostinc=$(SITEROOT)//sw/lcg/external/Boost/1.39.0_python2.5/i68
6-slc5-gcc43-opt/include/boost-1_39
Bat=${ATLAS_EXTERNAL}/BAT/0.3.2/i686-slc5-gcc43
gmake
-j8
PREFIX=$ANALYSIS_LOCAL BOOSTINC=$Boostinc BAT=$Bat
cd $ANALYSIS_DIR
make PREFIX=$ANALYSIS_LOCAL BOOSTINC=$Boostinc BAT=$Bat
I Makefile
AnalysisFramework: $(OBJECTS) $(HEADERS)
$(FRMWK_INCDIR)/NtupleFactory.h
#dictionary.cxx
$(CXX) $(CXXFLAGS) -shared -Wl,soname,$(TARGETLIB) -I$(FRMWK_INCDIR)
$(LIBS) -lReflex -lCintex \ $(OBJECTS)
$(FRMWK_INCDIR)/NtupleFactory.h -o
$(TARGETLIB)
AnalysisFramework: $(OBJECTS) $(HEADERS)
$(FRMWK_INCDIR)/NtupleFactory.h
dictionary.cxx
$(CXX) $(CXXFLAGS) -shared -Wl,soname,$(TARGETLIB) -I$(FRMWK_INCDIR)
$(LIBS) -lReflex -lCintex \ $(OBJECTS)
$(FRMWK_INCDIR)/NtupleFactory.h
dictionary.cxx -o $(TARGETLIB)
Scarica

echo - Indico