Hi dear ROOT experts,
i am currently struggling with streaming rootfile via xrootd.
I am using the LCG 95 stack (/cvmfs/sft.cern.ch/lcg/views/LCG_95/x86_64-centos7-gcc8-opt/bin/root
)
ROOT Version: ROOT Version: 6.16/00
Built for linuxx8664gcc on Jan 23 2019, 09:06:13
Platform: CentOS7
A minimal example of what i am trying to do:
import ROOT
inputfiles = [
'root://cmsxrootd-kit.gridka.de:1094//store/user/sbrommer/smhtt/2016/ntuples/DYJetsToLLM50_RunIISummer16MiniAODv3_PUMoriond17_13TeV_MINIAOD_madgraph-pythia8_ext2-v2/DYJetsToLLM50_RunIISummer16MiniAODv3_PUMoriond17_13TeV_MINIAOD_madgraph-pythia8_ext2-v2.root'
]
friend_inputfiles_collection = [[
'root://cmsxrootd-kit.gridka.de:1094//store/user/sbrommer/smhtt/2016/friends/NNScore/emb_ff_stage1_fix/DYJetsToLLM50_RunIISummer16MiniAODv3_PUMoriond17_13TeV_MINIAOD_madgraph-pythia8_ext2-v2/DYJetsToLLM50_RunIISummer16MiniAODv3_PUMoriond17_13TeV_MINIAOD_madgraph-pythia8_ext2-v2.root'
]]
folder = "tt_nominal/ntuple"
name = '#tt#tt_emb#ZL#smhtt#Run2016#tt_max_score#125#'
prename = 'tt_max_score'
cut ='(tt_max_index==0)'
tree = ROOT.TChain()
for inputfile in inputfiles:
tree.Add(inputfile + "/" + folder)
friend_trees = []
if friend_inputfiles_collection != None:
for friend_inputfiles in friend_inputfiles_collection:
friend_tree = ROOT.TChain()
for friend_inputfile in friend_inputfiles:
friend_tree.Add(friend_inputfile + "/" + folder)
tree.AddFriend(friend_tree)
friend_trees.append(friend_tree)
counthist = ROOT.TH1D(name, name, 17, 0.0, 1.0)
tree.Draw("{}>>{}".format(prename, name), cut, "goff")
output_file = ROOT.TFile('test.root', "recreate")
counthist.Write()
output_file.Close()
The code above works, depending on the size of the cut in the Draw() command. For a short cutstring this example works perfeclty, but if i use a larger cutstring with many different variables
cut = "(tt_max_index==0)*(flagMETFilter==1)*(extraelec_veto<0.5)*(extramuon_veto<0.5)*(dilepton_veto<0.5)*(byVLooseDeepTau2017v2p1VSmu_1>0.5 && byVLooseDeepTau2017v2p1VSmu_2>0.5)*(byVVLooseDeepTau2017v2p1VSe_1>0.5 && byVVLooseDeepTau2017v2p1VSe_2>0.5)*(byTightDeepTau2017v2p1VSjet_1>0.5)*(byTightDeepTau2017v2p1VSjet_2>0.5)*(q_1*q_2<0)*(trg_doubletau==1)*(!(gen_match_1==5 && gen_match_2==5) && !(gen_match_1 == 6 || gen_match_2 == 6))*(generatorWeight)*(isoWeight_1*isoWeight_2)*(idWeight_1*idWeight_2)*(puweight)*(trackWeight_1*trackWeight_2)*(eleTauFakeRateWeight*muTauFakeRateWeight)*((((abs(eta_2)<2.1)*((byTightDeepTau2017v2p1VSjet_1<0.5 && byVLooseDeepTau2017v2p1VSjet_1>0.5)*crossTriggerDataEfficiencyWeight_vloose_DeepTau_1 + (byTightDeepTau2017v2p1VSjet_1>0.5)*crossTriggerDataEfficiencyWeight_tight_DeepTau_1))*((abs(eta_2)<2.1)*((byTightDeepTau2017v2p1VSjet_2<0.5 && byVLooseDeepTau2017v2p1VSjet_2>0.5)*crossTriggerDataEfficiencyWeight_vloose_DeepTau_2 + (byTightDeepTau2017v2p1VSjet_2>0.5)*crossTriggerDataEfficiencyWeight_tight_DeepTau_2)))/(((abs(eta_2)<2.1)*((byTightDeepTau2017v2p1VSjet_1<0.5 && byVLooseDeepTau2017v2p1VSjet_1>0.5)*crossTriggerMCEfficiencyWeight_vloose_DeepTau_1 + (byTightDeepTau2017v2p1VSjet_1>0.5)*crossTriggerMCEfficiencyWeight_tight_DeepTau_1))*((abs(eta_2)<2.1)*((byTightDeepTau2017v2p1VSjet_2<0.5 && byVLooseDeepTau2017v2p1VSjet_2>0.5)*crossTriggerMCEfficiencyWeight_vloose_DeepTau_2 + (byTightDeepTau2017v2p1VSjet_2>0.5)*crossTriggerMCEfficiencyWeight_tight_DeepTau_2))))*(1.0)*(1.0)*(prefiringweight)*((((gen_match_1 == 5)*(((decayMode_1!=11)*tauIDScaleFactorWeight_tight_DeepTau2017v2p1VSjet_1)+((decayMode_1==11)*0.89484048)) + (gen_match_1 != 5))*((gen_match_2 == 5)*(((decayMode_2!=11)*tauIDScaleFactorWeight_tight_DeepTau2017v2p1VSjet_2)+((decayMode_2==11)*0.89484048)) + (gen_match_2 != 5))))*(zPtReweightWeight)*(((genbosonmass >= 50.0) * 4.1545e-05*((npartons == 0 || npartons >= 5)*1.0+(npartons == 1)*0.32123574062076404+(npartons == 2)*0.3314444833963529+(npartons == 3)*0.3389929050626262+(npartons == 4)*0.2785338687268455) + (genbosonmass < 50.0)*(numberGeneratedEventsWeight * crossSectionPerEventWeight)))*(35870.0)*((gen_match_2==1 || gen_match_2==3)*(((abs(eta_1) < 1.46) * (1./0.6) * 1.22) + ((abs(eta_1) > 1.5588) * (1./0.88) * 1.47))+!(gen_match_2==1 || gen_match_2==3))"
i get xrootd error messages (see also full error log attached)
Got a kXR_error response to request kXR_readv (handle: 0x00000000, chunks: 125398, total size: 27554298) [3002] Single readv transfer is too large.
following by root segfaults and a coredump. When i process the file locally, i don’t have any issues. Do you have any idea how to fix this error ?
Best Wishes
Sebastian
EDIT: when i contruct an equally long cutstring which uses just one variable
cut = "*".join(['(tt_max_index==0)'for i in xrange(200)])
the example also works, so the issue seems to be related to the number of different variables that are accessed via the cutstring.
xrootd_error.txt (132.5 KB)