Memory Leak in MCStudy or fitTo with NumCPU(4)

Hi Wouter, experts,

I am running MCStudies (using both RooMCStudy and a homemade version). If I turn on NumCPU(4), I get a very bad memory leak and my jobs crash after a hundred or so studies. If I do not set NumCPU(), then there is no memory leak. I could send you my code, but it is probably rather obscure for this test. Ill see if I can set it up from one of the tutorial examples.



I finally got around to testing this using a the rf801_mcstudy.C macro in the roofit tutorial section.

Here is a log file running the macro as is:

If I change the macro to include NumCPU(4) in the FitOptions when RooMCStudy is declared we get this

If you scroll to the end of the logfile, you can see the usage summary. In the first case, the job
only requires 18 MB memory. In the second case, almost 2GB are required. Again, the only change
I made was to set NumCPU(4).

Hope this helps,
Chris S.

Hi Chris,

Thanks for reporting, that’s clearly a bug. Could you please file a Savannah bug report (if you haven’t already) and I will process this.


Sure Wouter,

Ill post the bug report today.