Running the Alignment on the Grid

Using the Grid

Usually it's not possible to use the Grid for alignment jobs as one want to do multiple iteration with gaudipariter.py instead of the standard one iteration with gaudirun.py used by default on the Grid. It is possible however to use a trick to run the alignment jobs on the CERN computers of the grid.

  • make a python executable that runs gaudipariter.py on your options and then make a .tar.gz archive out of the AlignmentResults folder; for example if your option file is called alignMC.py:

#!/usr/bin/env python
import os, sys

cmd = 'gaudipariter.py -n3 -p1 -e200000 '+os.getcwd()+'/alignMC.py'

# Run the command
os.system('echo "Here is the command that will run:"')
os.system('echo "'+cmd+'"')
os.system(cmd)

# Compress AlignmentResults
os.system('echo "Compress folder AlignmentResults:"')
os.system('tar -zcvf AlignmentResults.tar.gz AlignmentResults')

N.B. always run on only one core (-p1) as the Grid currently does not support multithreaded applications.

  • make your python script executable: chmod 755 runAlignment.py (if your script is called runAlignment.py)

  • Write a ganga script to submit the job. Notice that if you indicated the PFNs to run over directly in the alignment option file you need to run at CERN.

# Setup application
app = GaudiPython(project='Alignment',version='v9r2') 
app.script = [ File('runAlignment.py') ]
        
# Setup Job
j = Job( name='VeloResolution', application=app )
j.name = 'Alignment'
j.inputsandbox += ['alignMC.py']
j.outputfiles += [LocalFile('*.tar.gz')]     
j.backend = Dirac()
j.backend.settings['Destination'] = 'LCG.CERN.ch'
j.submit()

-- GiulioDujany - 2014-11-06


This topic: LHCb > WebHome > LHCbComputing > LHCbDetectorAlignment > AlignmentIntro > AlignmentGrid
Topic revision: r1 - 2014-11-06 - GiulioDujany
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback