Cannot cache remote file when cachedir is eos user


ROOT Version:6.30/04
Platform: linuxx8664gcc
Compiler: 11.3.0


I want to cache a remote root file (from eos as well) but it seems that the cache path is not properly parsed if the cache directory is within my eos user directory.

Reproducer

import os
import ROOT

user = os.environ['USER']
outdir = f"/eos/user/{user[0]}/{user}"
filename = os.path.join(outdir, "test.root")
ROOT.RDataFrame(100).Define("x", "1").Snapshot("test", filename)
#cachedir = "/tmp"  # works
cachedir = os.path.join(outdir, "tmp")
ROOT.TFile.SetCacheFileDir(cachedir, True, True)
chain = ROOT.TChain("test")
chain.AddFile(f"root://eosuser.cern.ch/{filename}")
chain.GetEntries()

This gives the error:

Info in <TFile::OpenFromCache>: using local cache copy of root://eosuser.cern.ch//eos/user/c/chlcheng/test.root [/eos/user/c/chlcheng/tmp//eos/user/c/chlcheng/test.root]
Info in <TFile::OpenFromCache>: using local cache copy of root://eoshome-i04.cern.ch//eos/user/c/chlcheng/tmp/eos/user/c/chlcheng/test.root [/eos/user/c/chlcheng/tmp//eos/user/c/chlcheng/tmp/eos/user/c/chlcheng/test.root]
Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3011] Unable to open file /test.root819.tmp; No such file or directory
Error in <TFile::Cp>: cannot open source file root://eoshome-i04.cern.ch//test.root819.tmp
Warning in <TFile::OpenFromCache>: you want to read through a cache, but I cannot make a cache copy of /eos/user/c/chlcheng/tmp - CACHEREAD disabled
Error in <TNetXNGFile::Open>: [ERROR] Server responded with an error: [3011] Unable to open file /test.root819.tmp; No such file or directory

However, if I set the cache directory to anywhere else, e.g. “/tmp”, “/afs/user/…”, the correct cache path will be used.

Hi Alkaid,

Thanks for this post.
This seems to be a glitch in CERN’s infrastructure, in particular, if I had to guess, of the EOS fuse mount of the machine you are running on.
If this is reproducible on a standard platform like lxplus, have you tried submitting a SNOW Ticket to CERN?

Cheers,
Danilo

Hi Danilo,

Thanks for the reply. I tested this on lxplus and Swan, both have the same issue. I will try to open a SNOW ticket.

Thanks. Hopefully this will be fixed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.