Problem with running on files on CERN CASTOR system

I’m trying to run an analysis on some files I have on castor at CERN (I’m working from lxplus) and I can’t seem to get to the files properly. Some complete code that replicates the problem for me is:

{
TChain *chain = new TChain(“CollectionTree”);
chain->Add(“rfio:///castor/cern.ch/user/j/jgoodson/release14METAANs/1420/Zmumu5151/user.JeremiahJetGoodson.005151.ZmumuMcAtNLO.AAN.v1420Nightly.AANT._00001.root”);
chain->MakeClass(“analysisClass”);
}
which I just have in a little file called classMaker that I run with root classMaker.

When I run this in ROOT 5.10/00 I get:
SysError in TRFIOFile::TRFIOFile: file /castor/cern.ch/user/j/jgoodson/release14METAANs/1420/Zmumu5151/user.JeremiahJetGoodson.005151.ZmumuMcAtNLO.AAN.v1420Nightly.AANT._00001.root can not be opened for reading (Internal error)

repeated a few times. If I switch to 5.14/00i or 5.16/00 I get a segmentation violation.

If I rfcp the file into /tmp/jgoodson/ and try the program off of there, it works fine and produces a full class. The root file is readable in /tmp and in castor its permissions are mrw-r–r--

I’ve tried adding environment variables, specifically:
export STAGE_HOST=castoratlas
export RFIO_USE_CASTOR_V2=YES
export STAG_SVCCLASS=default

to no avail, but I’m also not sure if those are ideal. My connection to ROOT is setup with:

export ROOTSYS=/afs/cern.ch/sw/root/v5.10.00/slc3_gcc3.2.3/root

export PATH=$PATH:${ROOTSYS}/bin

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ROOTSYS}/lib

Is there something else I should be doing in order to make this work? The basic documentation I’ve seen seems to just add up to “add rfio:// to the path”.

Any help is much appreciated.

Dear JetGoodson,

Not sure what’s going on, but it could be an environment setting problem. First, you say you are running from lxplus but you try to use binaries for ‘slc3_ia32_gcc323’. Your machine should be running SLC4 with a gcc 3.46 compiler and probably AMD64 architecture, therefore the binaries you should use are those under ‘slc4_amd64_gcc34’. If not sure, please post the output of

gcc -v
uname -a

Then you should pickup your versions from the LCG area

/afs/cern.ch/sw/lcg/external/root/

which is maintained (not sure the other it is).

I have tried to open the file with the versions that you mention picked up from under the LCG area and I get what I expect, i.e. ‘permission denied’. But no crash.
Could you please do the same and send the output? You have to run

f = TFile::Open("rfio:///castor/cern.ch/user/j/jgoodson/release14METAANs/1420/Zmumu5151/user.JeremiahJetGoodson.005151.ZmumuMcAtNLO.AAN.v1420Nightly.AANT._00001.root"); 

after having setup ROOTSYS and tye rest (included the Castor specific vars) as you did. You may want to add

export STAGER_TRACE=3

to get some more verbosity from Castor.

Gerri Ganis

Thanks for the feedback, Gerri.

I switched to 5.14.00i/slc4_amd64_gcc34/ and it seems to be working now.