TWiki> LHCb Web>LHCbComputing>FileAccess (revision 2)EditAttachPDF

Accessing files on SEs from ROOT

Castor and DPM

A bit of history

Following a mail exchange with Flavia and discussion in the Architect's Forum about being able to use a universal that would serve Castor and DPM, I have made a few tests.

Just a bit of history for those who didn't follow the saga: at Mumbai (February 2006!!), it was decided to provide with highest priority a universal libshift that would then steer to Castor or DPM library depending on the flavour of the backend. In August 2006 the WLCG MB agreed the proposed timeline to have it as a prototype in October 2006 and released soon afterwards. In the mean time the EGEE TCG (that is defining the priorities of developments in EGEE) decided to set a very low priority on this point and essentially everything stopped (at least officially).

Now the problem is to be able to set up an application that defines an environment suitable for reading either files on a Castor or a DPM backend. The solution used by CMS and ATLAS on sites supporting DPM is to create a soft link (on the LD_LIBRARY_PATH) called pointing to Of course this is cumbersome as the environment setting script has to know a priori whether it will access files through DPM or Castor. LHCb doesn't have (yet) the problem as we don't use site with DPM. However NIKHEF proposes us a disk1tape0 storage at NIKHEF (rather than at SARA) based on DPM. Hence before embarking on a migration we have to test it out...

It was suggested by Flavia to go through the ROOT gfal plugin since gfal is able to steer the appropriate library. She kindly set up an SAPath for LHCb tests on a DPM instance on the CERN PPS. Thanks!

I used this opportunity for testing again all tURLs of the creation against ROOT... I used the file /castor/ that is on the lhcbdata pool (i.e. as well as on the default pool (

Results of the tests

For this test, I used an SLC3 LXPLUS node, ROOT 5.14.00e and gfal 1.7.7 as installed in the AA. On SLC4, I used a GFAL plugin kindly built by Gerri on May 23rd for ROOT 5.14.00e and gfal 1.9.0.

Tests on srm-durable-lhcb

Returns a tURL of the form:

rfio://castorlhcb:9002/?svcClass=lhcbdata&castorVersion=2&path=//castor/ and similarly for the rootd protocol (rfio: replaced by castor:)

  • Direct call: OK
root [6] f=TFile::Open("rfio://$
(class TFile*)0x9b0a3d0
  • Through gfal: not OK
root [7] f=TFile::Open("gfal:rfio://$
SysError in : file rfio:// can not be opened for reading (No such file or directory)
(class TFile*)0x0
  • Through gfal using the SURL: not OK
root [8] f=TFile::Open("gfal:srm://")
SysError in : file srm:// can not be opened for reading (No such file or directory)
(class TFile*)0x0

Tests on

Returns a tURL of the form (note the different number of slashes)

  • Direct call: OK
root [9] f=TFile::Open("rfio:////castor/")
(class TFile*)0x9e99a20
root [10] f=TFile::Open("castor:/castor/")
Info in : fAuthProto = root, u: castor:///castor/
(class TFile*)0x9ec4ec8
Note that ROOT accepts the following number of slashes: 1, 3, 4, 5 (but not 2) for both protocols
  • Through gfal: OK for rfio
    • castor: protocol not supported
    • rfio: OK for 3 or 4 slashes (not 1: invalid argument)
root [15] f=TFile::Open("gfal:rfio:////castor/")
(class TFile*)0x9958548
  • Through gfal using the SURL: OK
root [2] f=TFile::Open("gfal:srm://")
(class TFile*)0x9dec900

Tests on

Now I copied the file to DPM and got a tURL (using the PPS-BDII). SRM v1.1 and SRM v2.2 give the same tURL

[lxplus209] ~ > lcg-cp -v srm:// srm://
Source URL: srm://
File size: 188734264
Source URL for copy: gsi
Destination URL: srm://
# streams: 1
# set timeout to  0 (seconds)
            0 bytes      0.00 KB/sec avg      0.00 KB/sec inst
Transfer took 4830 ms
[lxplus209] ~ > lcg-gt  srm:// rfio

  • Direct call (after setting as a link to not OK (but it's known that ROOT doesn't like this type of tURL, even for Castor)
root [0] f=TFile::Open("rfio://")    
Error in : file rfio:// does not exist
(class TFile*)0x0
  • Through gfal: not OK
root [0] f=TFile::Open("gfal:rfio://")
SysError in : file rfio:// can not be opened for reading (Connection reset by peer)
(class TFile*)0x0

Tests on SLC4

Using SLC4 with gfal 1.9.0 gives results similar to the above.


  • Accessing files on Castor from ROOT works fine using the protocols rfio: and castor: with the tURLs obtained by lcg-gt on the SRM endpoints (both old-style and new-style tURLs).
  • Using gfal:rfio: for accessing files also works fine on Castor with the tURLs obtained by lcg-gt on (rfio: protocol, not castor: protocol), but not the new-style tURLs obtained from Note that gfal supports less syntaxes for the tURL as the native RFIO or ROOTD plugins (only one / is not accepted)
  • We didn't succeed to open a file on DPM, either directly faking not through gfal

Note that ATLAS are conducting similar tests and their results can be found here

-- Main.phicharp - 22 May 2007

Edit | Attach | Watch | Print version | History: r7 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2007-05-23 - PhilippeCharpentierSecondary
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback