Re: hadd: "too many open files"

From: Noel Dawe <Noel.Dawe_at_cern.ch>
Date: Sun, 7 Aug 2011 00:23:36 +0200


Right, there is no need to open all files simultaneously and I think it's mainly an oversight in the code (TFileMerger.cxx). Instead of keeping a TList of open files, just keep a TList of file names and only open the files as needed (as I said before I think this can be done without opening more than two at one time).

Noel

On Sat, Aug 6, 2011 at 11:22 PM, Vladimir Savinov <vps3_at_pitt.edu> wrote:

> Valeri,
> does this script also merge TTrees?
> And, also, do you know why hadd needs to keep all files open until the end
> of merging?
> thanks,
> v
>
>
>
> On 8/6/2011 4:13 PM, Fine, Valeri wrote:
>
> There is no need to open all files to merge it.****
>
> For example STAR experiment uses the MergeHistogramFile.C attached. ****
>
> ( it can be found on afs ****
>
> /afs/
> rhic.bnl.gov/star/packages/DEV/StRoot/macros/analysis/MergeHistogramFile.C)
> ****
>
> The script opens the input files one by one. Been compiled with ACliC it
> works much faster than the regular ‘hadd” ****
>
> .****
>
> Best regards , Valeri Fine****
>
> -----------------------------------****
>
> Brookhaven National Laboratory****
>
> Upton, NY 11973****
>
> Phone +1-631-344-7806****
>
> ** **
>
> *From:* owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch<owner-roottalk_at_root.cern.ch>]
> *On Behalf Of *Noel Dawe
> *Sent:* Saturday, August 06, 2011 6:19 AM
> *To:* roottalk_at_cern.ch
> *Subject:* [ROOT] hadd: "too many open files"****
>
> ** **
>
> I don't know why hadd needs to open all the files at the same time but
> probably a better way to write this tool would be to never open more than
> two files at once: copy the first file to the destination and keep it open,
> then pop off the next file, open it, merge it into the first, close it, then
> pop off the next file and open it, etc...
>
> Noel****
>
>
Received on Sun Aug 07 2011 - 00:24:05 CEST

This archive was generated by hypermail 2.2.0 : Mon Aug 08 2011 - 05:50:01 CEST