GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » Memory leak during EMC clustering
icon5.gif  Memory leak during EMC clustering [message #4329] Thu, 24 May 2007 21:07 Go to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Dear EMCers,

I noticed that during the clustering task for the EMC (reco_emc.C), root is eating up memory rapidly. In case of many events, I am able to hang-up the system. The funny thing is that even an empty task (i.e. empty EmcMakeCluster::Exec() function), memory is consumed as fast. So I guess it is related to reading the digi information from the root tree. PS I am running revision 782 of PandaRoot.

Does someone has similar experience or has an idea what it could be?

Kind wishes,

Johan.


Johan Messchendorp
University of Groningen/KVI
Zernikelaan 25
NL-9747 AA Groningen
The Netherlands
tel. +31-503633558
fax +31-503634003
Re: Memory leak during EMC clustering [message #4330 is a reply to message #4329] Thu, 24 May 2007 22:09 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *dip.t-dialin.net
Hi,
the problem is already known since several months... but not so much the reason.
I have the fear that it is connected to the stl code (push_back of Hits with oush_back of many many many Points), but this is only a guess.

The code sooner or later should be revised, to make it faster and lighter, but this will require some time.
Of course testing and ideas meanwhile are always welcome...
Re: Memory leak during EMC clustering [message #4331 is a reply to message #4329] Fri, 25 May 2007 01:08 Go to previous messageGo to next message
Anonymous Poster From: *cern.ch
Hi there,

reading this I get the suspicion that this might be something similar to a problem I fixed in the tpc and genfit code some time ago. OK, maybe I am wrong and missing the problem, but let's give it a shot:
When you put stuff into TClonesArrays you use the overloaded new operator stuff of ROOT (black magic to me). Then you go to the next event, and you do a Clear() on the TClonesArray first of all. However, that just clears the pointers,h but it does not delete the objects on the heap. If you do Delete() on the TClonesArray instead, you call the destructors of all the objects referenced in the TClonesArray.
Reading that this problem you have even persisits when you have an empty Exec() makes me believe I could be missing the problem, but maybe it was not really completely empty afterall.

CU, Christian
Re: Memory leak during EMC clustering [message #4344 is a reply to message #4329] Fri, 25 May 2007 10:48 Go to previous messageGo to next message
Dima Melnychuk is currently offline  Dima Melnychuk
Messages: 213
Registered: April 2004
Location: National Centre for Nucle...
first-grade participant
From: *fuw.edu.pl
Hi all,
I made a correction in EmcMakeCluster.cxx, i.e replaced fClusterArray->Clear() by fClusterArray->Delete().
After that I do not observe memory leak.

I made also small correction in CbmEmcHitProducer.cxx, .hh

All the changes are in svn now.

Best regrads,

Dima
icon14.gif  Re: Memory leak during EMC clustering [message #4353 is a reply to message #4329] Fri, 25 May 2007 12:40 Go to previous message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *KVI.nl
Indeed solved. Thanks! I am impressed how fast you guys can operate...... my compliments!

Johan.


Johan Messchendorp
University of Groningen/KVI
Zernikelaan 25
NL-9747 AA Groningen
The Netherlands
tel. +31-503633558
fax +31-503634003
Previous Topic: geometry check
Next Topic: emc end-caps update
Goto Forum:
  


Current Time: Thu Nov 28 05:43:30 CET 2024

Total time taken to generate the page: 0.00747 seconds