Dear ROOT experts,
I have a code which was written like this
TChain *chain = GetChainFromSomewhere() ;
for( slot_computation : CONFIGURATIONS_SETTINGS){
ROOT::EnableImplicitMT( 8) ;
ROOT::RDataFrame df( *chain);
RNode lastNode = df.Define("DUMMY","1>0");
for( xx: SEVERAL SUBSETUPS){
lastNode = lastNode.XXX() ;
}
*df.Count();
//Store results for this configuration
ROOT::DisableIMplicitMT() ; //Neede to store in a sorted way with RDataFrame some results i produced
}
With this configuration of the code , after i am iterating for 1-2 slot_computation , the code breaks and it cnsumes an enourmous amount of memory.
If i refactor the code to do this :
TChain *chain = GetChainFromSomewhere() ;
ROOT::RDataFrame df( *chain);
for( slot_computation : CONFIGURATIONS_SETTINGS){
ROOT::EnableImplicitMT( 8) ;
RNode lastNode = df.Define("DUMMY","1>0");
for( xx: SEVERAL SUBSETUPS){
lastNode = lastNode.XXX() ;
}
*df.Count();
//Store results for this configuration
ROOT::DisableIMplicitMT() ; //Neede to store in a sorted way with RDataFrame some results i produced
}
The code consumes much less memory and it completes successfully.
In practice, i know i would need to refactor the code to “bookkep” everything once, and just do 1 event loop, but it would require quite some time to refactor containers of results to have an extra bookkeping level in my code.
I wonder if this behaviour is expected.
Cheers
Renato
Please read tips for efficient and successful posting and posting code
_ROOT Version: 6.18/04
Platform: x86_64-centos7-gcc8-opt
Compiler: linuxx8664gcc