Re: Merging with 'hadd' results in 'std::bad_alloc'

From: Ida Häggström <ida.haggstrom_at_radfys.umu.se>
Date: Wed, 12 Oct 2011 10:28:02 +0200


Hello Philippe and thanks for your input!

I've installed ROOT v5.30 and tried hadd on all six files. After about 2.5 hours I recieved the error "*** Break *** bus error". I started a run with only five of the files yesterday (root 5.28), but this morning I found it had crashed as usual with "std::bad_alloc". I've looked at all six root-files and there seem to be nothing wrong with them (no errors on opening them, all trees are there). I will now try and send my files to a cluster computer and see if I can hadd them there... I really need to merge those files... And I'm sorry but my root and c++ skills are not at all what they should be, but how do I attain the "stack trace information"? Thanks!
Ida

On Tue, Oct 11, 2011 at 3:21 PM, Philippe Canal <pcanal_at_fnal.gov> wrote:

> Hi Ida,
>
> Could you try with v5.30? What is the minimal number of files needed to
> reached this problem (i.e. does it also crash if you merge
> only 5 files)? Does it matter which file you try to merge with (i.e. if
> you merge 6 times with the first file does it also
> crash)? Was there any stack trace information?
>
> Philippe.
>
> On 10/11/11 8:14 AM, Ida Häggström wrote:
> > Hello!
> >
> > I'll start with some info:
> > Root version: 5.28/00a (21 February 2011)
> > OS: Ubuntu version 10.10 (as a guest via VirtualBox4.0.4 on host Windows
> 7)
> > Memory:
> >
> > I'm experiencing some problems when trying to merge some root files. I
> have six files (around 1.1 GB each) that I want to merge.
> > The files contain the same structure (four different trees + some
> histograms each). I'm trying to use the 'hadd' method, but after
> > a couple of hours it crashes with the message "terminate called after
> throwing an instance of 'std::bad_alloc'" (see below).
> > I've googled the issue and figured I run out of memory (I'm not so
> skilled with root or C++!).
> >
> > I found a thread addressing a similar issue as mine (
> http://root.cern.ch/phpBB3/viewtopic.php?t=9008) where it was suggested to
> > flush the baskets of each root file, then use hadd. I've tried this
> according to:
> > TFile f(fileName.c_str(),"update");
> > cout << "Flushing \"finalCoinci\"..." << endl;
> > TTree *T1 = (TTree*)f.Get("finalCoinci");
> > T1->FlushBaskets();
> > T1->Write();
> >
> > but I still get the same error.
> >
> > ------------------------------------------------
> > hadd test.root rootOutput*
> > Target file: test.root
> > Source file 1: rootOutput_Prompts_t0-1.root
> > Source file 2: rootOutput_Prompts_t0-2.root
> > Source file 3: rootOutput_Prompts_t0-3.root
> > Source file 4: rootOutput_Prompts_t0-4.root
> > Source file 5: rootOutput_Prompts_t0-5.root
> > Source file 6: rootOutput_Prompts_t0-6.root
> > Target path: test.root:/
> > rootOutput_Prompts_t0-1.root tree:finalCoinci entries=1234567890
> > rootOutput_Prompts_t0-2.root tree:finalCoinci entries=1234567890
> > rootOutput_Prompts_t0-3.root tree:finalCoinci entries=1234567890
> > rootOutput_Prompts_t0-4.root tree:finalCoinci entries=1234567890
> > rootOutput_Prompts_t0-5.root tree:finalCoinci entries=1234567890
> > rootOutput_Prompts_t0-6.root tree:finalCoinci entries=1234567890
> > terminate called after throwing an instance of 'std::bad_alloc'
> > what(): std::bad_alloc
> > Aborted
> > ------------------------------------------------
> >
>
Received on Wed Oct 12 2011 - 10:28:11 CEST

This archive was generated by hypermail 2.2.0 : Wed Oct 12 2011 - 11:50:02 CEST