GENIE-MC / Generator

The popular GENIE Generator product is used by nearly all accelerator neutrino experiments and it plays a key role in the exploitation of neutrino data. The Generator implements a modern software framework and it includes state-of-the-art physics modules. It captures the latest results of the GENIE global analysis of neutrino scattering data and includes several tunes that were produced using the proprietary Comparisons and Tuning products. The GENIE physics model is universal and comprehensive: It handles all neutrinos and targets, and all processes relevant from MeV to PeV energy scales. The Generator includes several tools (flux drivers, detector geometry navigators, specialized event generation apps, event reweighting engines) to simulate complex experimental setups in full detail and to support generator-related analysis tasks.
http://www.genie-mc.org
42 stars 92 forks source link

Possible memory leak? #327

Open pedrosimpas opened 11 months ago

pedrosimpas commented 11 months ago

Dear GENIE developers,

I tried to run GENIE version 3.02.02's gevgen_atmo and it used up all my ram memory (see image attached).

Screenshot from 2023-09-20 17-57-00

Is it possible that there is a memory leak? If so, is it an issue with the 3.02.02 version or I is present in other versions?

I run the gevgen_atmo with the following configuration:


FLUX=./kam-nu-20-12-mtn-n3650.d GEOMETRY=./HyperKamiokande.root XSECS=./O16_and_H1_xsec.xml TIME=315360000 ENERGIES=0.1,1.0 LENGTH=m DENSITY=g_cm3 OUTPUT=HK_atm_bkg DETECTORPART=Fiducial

gevgen_atmo -f HAKKM:$FLUX[14],$FLUX[12],$FLUX[-14],$FLUX[-12] -r 1 -g $GEOMETRY -t $DETECTORPART -L $LENGTH -D $DENSITY -T $TIME -E $ENERGIES -o $OUTPUT --cross-sections $XSECS --tune G18_10a_02_11a


The table kam-nu-20-12-mtn-n3650.d was obtained from Honda's website (SK with montain max solar cicle) and I obtained O16_and_H1_xsec.xml from the pre-computed xsec using the provided reduce_gxspl.awk file.

I constructed HyperKamiokande.root using a simple root script, which I can share if needed.

pedrosimpas commented 11 months ago

Hi!

A few updates on this issue.

I made some tests and I was able to reduce the options of were the leak is happening.

I tested version 3.02.00 and version 3.04.00. They all have the same memory leak. I also tested to see if the problem is only in gevgen_atmo or gevgen also has it. And yes, both have it.

Finally, I decided to test different xsection tunes. I found out that if I use the G18_02a_00_000 tune, there is no leak. So it seems the leak is in some function used to calculate the G18_10a_02_11a tune.

I reduced the command that the leak can be reproduced,

gevgen -n 100000 -p 12 -t 1000080160 -e 1.0 --cross-sections O16_xsec_G18_10a_02_11a.xml --tune G18_10a_02_11a


Some information that might be relevant and I didn't include in the previous message.


If you need more information, please let me know,

best,

candreop commented 11 months ago

Thanks Pedro. That's useful diagnostic information. We will try to follow up on this.