Presentation is loading. Please wait.

Presentation is loading. Please wait.

NOVA art. memory leaking Alexey Naumov Lebedev Physical Institute Moscow 1.

Similar presentations


Presentation on theme: "NOVA art. memory leaking Alexey Naumov Lebedev Physical Institute Moscow 1."— Presentation transcript:

1 NOVA art. memory leaking Alexey Naumov Lebedev Physical Institute Moscow 1

2 Leaking? Running $nova –n -500 –c prodgenie.fcl prodgenie.fcl: >> #list the modules for this path, order matters, filters reject all following items >>simulate: [ generator, geantgen, photrans, daq ] Events Memory usage (mb) 10 1881 20 1887 50 1890 100 1895 500 2157 1000 2287 5000 3601 (3.6GB) ~ 400kb losses per event! 2

3 How detect source of leaking? - ‘top’ command [ display top CPU processes ] output: - ‘Valgrind’ [ tool for detect memory usage ] output: ==7158== 81,500 (80 direct, 81,420 indirect) bytes in 1 blocks are definitely lost in loss record 57,587 of 57,672 ==7158== at 0x4A07F61: malloc (vg_replace_malloc.c:236) ==7158== by 0x4F79D73: operator new(unsigned long) (in /grid/fermiapp/nova/novaart/externals- 0.2.0/art/v0_06_01/slf5.x86_$ ==7158== by 0x2E1C87D9: G4GeneratorPrecompoundInterface::G4GeneratorPrecompoundInterface(G4VPreCompoundModel*) (in /grid/$ ==7158== by 0x3A7CE497: G4QGSPProtonBuilder::G4QGSPProtonBuilder(bool, bool) (in /grid/fermiapp/nova/novaart/externals-0.$ ==7158== by 0x3AB4DDD9: HadronPhysicsQGSP_BERT::CreateModels() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/v4_$ ==7158== by 0x3AB4E158: HadronPhysicsQGSP_BERT::ConstructProcess() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4$ ==7158== by 0x3B8083D4: G4VModularPhysicsList::ConstructProcess() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/$ ==7158== by 0x3B7F7F7F: G4RunManagerKernel::InitializePhysics() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/v4$ ==7158== by 0x3B7F9724: G4RunManager::InitializePhysics() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/v4_9_4_p$ ==7158== by 0x3B7F9A8F: G4RunManager::Initialize() (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/v4_9_4_p01/Linu$ ==7158== by 0x3B7FF79E: G4RunMessenger::SetNewValue(G4UIcommand*, G4String) (in /grid/fermiapp/nova/novaart/externals-0.2$ ==7158== by 0x35F1EBDF: G4UIcommand::DoIt(G4String) (in /grid/fermiapp/nova/novaart/externals-0.2.0/geant4/v4_9_4_p01/Lin$ ==7158== ==7158== 81,500 (80 direct, 81,420 indirect) bytes in 1 blocks are definitely lost in loss record 57,588 of 57,672 ==7158== at 0x4A07F61: malloc (vg_replace_malloc.c:236) ==7158== by 0x4F79D73: operator new(unsigned long) (in /grid/fermiapp/nova/novaart/externals-0.2.0/art/v0_06_01/slf5.x86_$ 16560 anaumov 17 0 249m 44m 36m R 64.7 1.1 0:00.34 nova 15634 st3mag 15 0 675m 184m 79m S 13.7 4.7 0:04.38 nova 10828 xbhuang 15 0 691m 166m 77m S 0.0 4.2 0:10.98 nova 16560 anaumov 17 0 468m 86m 64m R 67.7 2.2 0:01.59 nova 15634 st3mag 15 0 675m 184m 79m S 3.9 4.7 0:04.45 nova 10828 xbhuang 15 0 691m 166m 77m S 0.0 4.2 0:10.98 nova 16560 anaumov 16 0 605m 119m 66m S 5.9 3.0 0:02.20 nova 10828 xbhuang 15 0 691m 166m 77m S 0.0 4.2 0:10.98 nova 15634 st3mag 15 0 675m 184m 79m S 0.0 4.7 0:04.45 nova 10828 xbhuang 15 0 691m 166m 77m S 0.0 4.2 0:10.98 nova 3

4 Memory usage during generation by ‘top’ command prodgenie.fcl (line 48): >> #list the modules for this path, order matters, filters reject all following items >>simulate: [ generator, geantgen, photrans, daq ] 4

5 Valgrind output output: ==7158== 171,304 bytes in 2,343 blocks are possibly lost in loss record 57,660 of 57,672 ==7158== at 0x4A07F61: malloc (vg_replace_malloc.c:236) ==7158== by 0x4F79D73: operator new(unsigned long) ( in /grid/fermiapp/nova/novaart/externals-0.2.0/art/v0_06_01/slf5.x86_$ ==7158== by 0x4F79E1F: operator new[](unsigned long) ( in /grid/fermiapp/nova/novaart/externals-0.2.0/art/v0_06_01/slf5.x8$ ==7158== by 0x9C415A6: TStringRef::GetRep(int, int) (TString.cxx:145) ==7158== by 0x9C42C57: TString::Replace(int, int, char const*, int) (TString.cxx:775) ==7158== LEAK SUMMARY: ==7158== definitely lost: 6,253 bytes in 65 blocks ==7158== indirectly lost: 418,233 bytes in 2,693 blocks ==7158== possibly lost: 881,436 bytes in 16,114 blocks ==7158== still reachable: 22,613,092 bytes in 101,826 blocks ==7158== suppressed: 0 bytes in 0 blocks ==7158== Reachable blocks (those to which a pointer was found) are not shown. ==7158== To see them, rerun with: --leak-check=full --show-reachable=yes ==7158== ==7158== For counts of detected and suppressed errors, rerun with: -v ==7158== ERROR SUMMARY: 1821 errors from 1821 contexts (suppressed: 2330 from 23) Leak 171kb possibly malloc funktion in file vg_replace_malloc.c on line 236 in /grid/fermiapp/nova/novaart/externals-0.2.0/art/v0_06_01/slf5.x86_$ Need to check? grid/fermiapp/nova/novaart/externals-0.2.0/art/v0_06_01/slf5.x86_$ 5

6 Memory leaking: correcting After first report main source of leaking has been identified and corrected (g4nova package). 6


Download ppt "NOVA art. memory leaking Alexey Naumov Lebedev Physical Institute Moscow 1."

Similar presentations


Ads by Google