Entrar a un computador con scientific linux 5
ssh quinonez@lxplus5.cern.ch
Levantar la GRID
Ir a myscripts y hacer el script flojongo.sh y colocar en el lo siguiente:
source /afs/cern.ch/project/gd/LCG-share/current/etc/profile.d/grid-env.sh
voms-proxy-init --voms atlas
source /afs/cern.ch/atlas/offline/external/GRID/ddm/DQ2Clients/setup.sh
source /afs/cern.ch/sw/ganga/install/etc/setup-atlas.sh
Luego simplemente hacemos:
source flojongo.sh
Este comando nos va a pedir la contrase~a de
GRID; si se la damos, el mensaje total sera algo asi:
[quinonez@lxplus306]~/myscripts% source flojongo.sh
Cannot find file or dir: /afs/cern.ch/user/q/quinonez/.glite/vomses
Enter GRID pass phrase:
Your identity: /C=CL/O=REUNACA/O=REUNA/OU=PUC/CN=fernandoquinonez
Creating temporary proxy .......................................................................................................... Done
Contacting voms.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=voms.cern.ch] "atlas" Done
Creating proxy ......................................................... Done
Your proxy is valid until Tue Mar 30 02:18:33 2010
- Enabled current AFS CERN GRID SLC5 UI
- Enabled Python 2.5
- Configured local site
- Enabled DQ2 Clients
-- IMPORTANT -- IMPORTANT -- IMPORTANT -- IMPORTANT -- IMPORTANT --
If you have not done so already, execute:
voms-proxy-init -voms atlas
-- IMPORTANT -- IMPORTANT -- IMPORTANT -- IMPORTANT -- IMPORTANT --
If you have any questions, go to:
https://twiki.cern.ch/twiki/bin/view/Atlas/DQ2ClientsHowTo
Ready
Setting up Ganga 5.5.2 (sh,atlas)
[quinonez@lxplus306]~/myscripts%
Concentrarse en la linea que dice:
Your identity: /C=CL/O=REUNACA/O=REUNA/OU=PUC/CN=fernandoquinonez
En este caso fernandoquinonez es mi
GRID id, toda tarea que yo corra en la
GRID tendra mi id. Lo mismo va para ustedes.
cd $HOME
mkdir scratch0/AtlasOffline-15.6.6
Levantar Athena en el release 15.6.6
Ir a myscripts y crear el archivo opt.15.6.6.sh y colocar adentro lo siguiente:
export ATHENA_VERSION=15.6.6
cd ~/cmthome
cp rg${ATHENA_VERSION} requirements
source /afs/cern.ch/sw/contrib/CMT/v1r20p20090520/mgr/setup.sh
cmt config
source ~/cmthome/setup.sh -tag=${ATHENA_VERSION},opt,setup
echo $CMTCONFIG
echo $CMTPATH
cmt show path
cd $HOME/myscripts
Luego ir a cmthome y hacer el archivo rg15.6.6 y colocar adentro lo siguiente:
set CMTSITE CERN
set SITEROOT /afs/cern.ch
macro ATLAS_DIST_AREA ${SITEROOT}/atlas/software/dist/
macro ATLAS_TEST_AREA ${HOME}/scratch0/
use AtlasLogin AtlasLogin-* $(ATLAS_DIST_AREA)
Para levantar athena solo volvemos a myscripts y ejecutamos:
source opt.15.6.6.sh
cd $TestArea
cmt show versions PhysicsAnalysis/AnalysisCommon/UserAnalysis
cmt co -r UserAnalysis-00-14-03 PhysicsAnalysis/AnalysisCommon/UserAnalysis
Ahora configuramos el paquete y compilamos
cd $TestaArea/PhysicsAnalysis/AnalysisCommon/UserAnalysis/cmt
cmt config
source setup.sh
make
Ir al dircetorio run y copiar las joboptions
cd ../run
cp ../share/AnalysisSkeleton_topOptions.py .
Siempre es bueno correr localmente con pocos eventos antes de enviar a la
GRID, luego de ver que todo anda corriendo bien, podemos enviar a la
GRID con todos los eventos que queramos. En este caso, nos saltamos el paso de correr localmente y enviamos directamente los jobs a la
GRID.
Creamos el archivo myganga.py o como quieran llamarlo y colocamos adentro:
# Esto es un comentario en python
j = Job()
j.application = Athena()
j.application.option_file = 'AnalysisSkeleton_topOptions.py'
j.application.athena_compile = False
j.application.prepare()
j.inputdata = DQ2Dataset()
j.inputdata.dataset = "data09_2TeV.00142308.physics_BPTX.merge.AOD.r988_p62_tid105376_00"
j.outputdata=DQ2OutputDataset()
j.outputdata.outputdata=['AnalysisSkeleton.aan.root']
j.backend=LCG()
j.backend.requirements=AtlasLCGRequirements()
#j.backend.requirements.cloud = 'FR'
j.splitter = DQ2JobSplitter()
j.splitter.numsubjobs = 1
config.Logging['Ganga.Lib.LCG'] = 'DEBUG'
config.LCG.MatchBeforeSubmit = True
j.submit()
Para enviar solamente hacemos:
ganga -i myganga.py
Para ver el estatus del job, hacer
jobs
Para ver los subjobs hacer:
jobs(2).subjobs
--+ Recuperar mis datasets de la
GRID:
Para hacer esto, primero abrimos un terminal nuevo y levantamos la grid con dq2 y con ganga mediante flojongo.sh.... Luego nos buscamos a nos mismos en la
GRID
dq2-ls "user10.fernandoquinonez.*"
Luego recuperamos con dq2-get
-- BorisP - 19-Jul-2010