Hi Rosen
as I've written to you, when you first reported the problem, the leak is caused
because, by design, certain GENIE objects allocate memory in the default constructor.
However, ROOT I/O requires that no memory is allocated in default constructors.
The problem, once recognised, was swept under the carpet because it was not too
annoying to live with (doesn't affect event generation / only reading from *very* large
event files) but it was quite annoying to fix (a cascade of required changes).
Thanks to Corey Reed, a ROOT feature was identified and a very easy solution has
been implemented in the SVN trunk. Basically, one can add an Xyz::Xyz(TRootIOCtor*)
constructor which takes precedence over the default constructor for ROOT I/O purposes.
Such (empty) constructors were added in the Interaction and GHEP package classes.
We believe this fixes the problem without interfering at all with any of the existing code.
cheers
Costas
On 13 Apr 2010, at 23:32, Rosen Matev wrote:
> I am trying out the $GENIE/src/test/testEventLoop.cxx with a genie root file. When ran, the memory usage of the process increases with a steady rate. I have isolated the leak to "tree->GetEntry(i);". (obviously, the memory allocation is done in this row.) Can someone try to reproduce this problem? If I only make many consecutive news and deletes of NtpMCEventRecord objects, the memory usage does not grow.
>
> Note: Because I run out of entries in the input file quickly, I change "tree->GetEntry(i);" to "tree->GetEntry(i % nev);" and run the loop nev*10000 times.
> Versions: genie 2.6.0; root 5.26.00;
>
> Steps to reproduce:
> wget http://www.hepforge.org/archive/genie/data/2.6.0/gxspl-t2k-v2.6.0.xml
> export GSPLOAD=gxspl-t2k-v2.6.0.xml
> gevgen -s -n 1000 -p 14 -t 1000060120 -e 0,15 -f $GENIE/data/flux/t2kflux.root,h30000
> edit testEventLoop.cxx as mentioned in the note above.
> compile testEventLoop.cxx
> ./testEventLoop -f gntp.0.ghep.root
>
>
> Regards,
> Rosen Matev
|