User Tools

Site Tools


grid:storegrid

This is an old revision of the document!


Storing Data on a Grid Storage Element

Introduction

When running a job on the Grid (backend = Dirac()), the output data can be stored on a Grid Storage Element (SE) instead of the lxplus AFS account. The access to the files is however a bit different than on lxplus.

How to tell the ganga job to store the output on the SE?

go to your home directory on lxplus open the .gangarc file modify the following line (line 313 in standard .gangarc file (to get a standard one do 'ganga -g')) :

 
#outputsandbox_types = ['NTupleSvc', 'HistogramPersistencySvc', 'MicroDSTStream']

here are 3 services in the list: NTupleSvc produces .root files, HistogramPersistencySvc produces histograms, MicroDSTStream produces .dst files.
Outputsandbox means, the output files of these services end up in your sandbox folder on lxplus.
If you want the output files NOT to end up on lxplus, but somewhere else, remove the service from the list.
For example if you don't want your .root files on lxplus uncomment the line and remove 'NTupleSvc':

outputsandbox_types = ['HistogramPersistencySvc', 'MicroDSTStream']

save the .gangarc file
restart Ganga

in Ganga choose the outputdata option for your job and not outputsandbox, i.e.:

ntuple = "filename.root"
j.outputdata = [ntuple]

Where are the output files (on which SE)?

in Ganga when the job has completed do:

jobs(jobnumber).subjobs(subjobnumber).backend.getOutputData()

that gives you a logical filename (LFN):

['/lhcb/user/myInitial/myUsername/diracSlice/DiracJobID/filename.root']

The data will end up in the SE closest to the location where your job did run.
To find out on which SE your file actually is, execute the following commands on lxplus:

SetupProject Dirac
dirac-dms-lfn-replicas /lhcb/user/myInitial/myUsername/diracSlice/DiracJobID/filename.root

there you get back for instance the following:

2009-07-29 12:10:41 UTC dirac-dms-lfn-replicas.py/DiracAPI  INFO: Replica Lookup Time: 96.89 seconds
{'Failed': {},
 'Successful': {'/lhcb/user/a/abuechle/4125/4125675/bsKK_23July09.root': {'RAL-USER': 'srm://srm-lhcb.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/lhcb/user/a/abuechle/4125/4125675/bsKK_23July09.root'}}}

so the file is on RAL at at the srm address: 'srm:srm-lhcb.gridpp.rl.ac.uk/castor/ads.rl.ac.uk/prod/lhcb/user/a/abuechle/4125/4125675/bsKK_23July09.root'.

grid/storegrid.1248876785.txt.gz · Last modified: 2009/07/29 16:13 by abuechle