Re: maximum number of fills in TH3 ?

From: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
Date: Thu, 21 Jan 2010 07:17:25 +0000


Dear Rene,

  first let me thank you for you suggestion of using the "box" option. That solved my problem. I can now plot both the root files from the simple macro as I sent in the previous message, as well as the files from my Monte Carlo. So we can exclude any problem with the filling and writing of the histograms.

  I have been testing it a lot again and I still have the problem if I try to plot the histograms without any option. If I try to plot the histogram from my macro, even just with the TBrowser, root keeps running for hours without any output. In the case of the output from my Monte Carlo, just by opening the root file with the TBrowser and clicking on the histogram with the biggest number of entries, root runs for some minutes and then starts to use up all the memory in the machine (7-8 GB). Then I have to kill it. Since you can not reproduce it, it may be peculiar of my installation (compiler or flags, I use Scientific Linux 4.8 and compile with g++4). I am unsure on how to proceed. I am happy because I can work with the "box" option. What do you suggest?

Thank you,
Alessio.

On Tue, 19 Jan 2010, Rene Brun wrote:

> I cannot reproduce your problem with the memory.
> Note that when drawing your histogram, you should not set the log scale for x
> and y axis because xmin and ymin are negative.
> Also do not draw with the default option (scatter-plot) as it may take a long
> time with this very special case.
> Simply replace your graphics lines by
> TCanvas *c1 = new TCanvas("c1","hist",200,10,900,900);
> h1->Draw("box");
>
>
> Rene Brun
>
> Alessio Mangiarotti wrote:
>> Dear rooters,
>>
>> I am experiencing a problem with the TH3 class. I have written a simple
>> Monte-Carlo to investigate the PID capabilities of our detector. It takes
>> few hours to process the simulated events, but because I do not need the
>> full information, I prefer to generate a TH3 and not a tree. I am
>> experiencing a memory leak with root when I try to open the file containing
>> the generated TH3 histograms and plot them (essentially root tries to use
>> all the available memory on the machine up to 7-8 GB).
>>
>> In the beginning I thought it was connected to the number of channels and
>> so I reduced the dimensions to 100*100*100 channels. The problem remained.
>>
>> I noticed that everything works well if I use a reduced statistics (1/10).
>> So I started to experiment with the TH3 class and I believe I found a
>> problem when a channel is filled more than 2**31 times. I tried to use a
>> TH1 and it works without problems. I attach a small simple macro I used to
>> do my checks. I have used root 5.22 and 5.26, both have the problem. (Note
>> that the file is written, root only stalls after).
>>
>> Is this a known limitation ? Can it be removed or avoided somehow? If not,
>> the limit is in the number of fills for a single channel or for all the
>> histogram (then I could add a check in my program)?
>>
>> Thank you for any assistance,
>> Alessio Mangiarotti.
>
>
Received on Thu Jan 21 2010 - 08:17:36 CET

This archive was generated by hypermail 2.2.0 : Thu Jan 21 2010 - 11:50:01 CET