Problem 596 - Memory leak in LHEP_BERT
Summary: Memory leak in LHEP_BERT
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/hadronic (show other problems)
Version: 6.0
Hardware: PC Linux
: P2 normal
Assignee: Mika.Heikkinen
URL:
Depends on:
Blocks:
 
Reported: 2004-03-01 10:52 CET by azukov
Modified: 2004-11-25 15:11 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description azukov 2004-03-01 10:52:03 CET
Mandrake Linux 9.1, gcc 3.2.2, Intel Xeon PC, G4.6.0 (patched).
Test case:
exampleN01 with follownig changes:
copper cube 10cmX10cmX10cm as World volume, no other volumes.
All primaries start in the center.
Physics List - standard one:
__________________________________________________________________
PhysicsList::PhysicsList():  G4VModularPhysicsList()
{
  // default cut value  (1.0mm)
  // defaultCutValue = 1.0*mm;
  defaultCutValue = 0.7*mm;
  SetVerboseLevel(1);

  // General Physics
  RegisterPhysics( new GeneralPhysics("general") );

  // EM Physics
  RegisterPhysics( new EMPhysics("standard EM"));

  // Muon Physics
  RegisterPhysics(  new MuonPhysics("muon"));

   // Hadron Physics
  RegisterPhysics(  new HadronPhysicsLHEP_BERT("hadron"));

  // Ion Physics
  RegisterPhysics( new IonPhysics("ion"));

}
___________________________________________________________
First I ran 1e+6 of 1MeV gammas, then (in the same simulation) 1e+6 of 31.7
MeV protons 3 times (total 3e+6 of protons).
I did it for 2 types of hadronic physics LHEP_PRECO and LHEP_BERT.
The following table shows virtual memory usage obtained by "top" program.
                                       LHEP_PRECO    LHEP_BERT
at startup                                   8900k          8328k
1e+6 of 1 MeV gammas             8912k          8352k
1e+6 of 31.7 MeV protons         10748k         18380k
2e+6 of 31.7 MeV protons         10768k        28200k
3e+6 of 31.7 MeV protons         10768k        37996k

Obviously there is a memory leak in LHEP_BERT the "leakage speed" is about
10Mb/(1e+6 histories), it will give 1Gb of swap space for 1e+8 histories :(
Comment 1 Hans-Peter.Wellisch 2004-03-04 07:25:59 CET
ok. Aatos, can you have a look at this leak?

Many greetings,

Hans-Peter.
Comment 2 Hans-Peter.Wellisch 2004-04-28 07:00:59 CEST
Hi Aatos,

 it is at present not clear to me, if this was fixd for 6.1.
Can you please let me know what the status is?

Many greetings,

Hans-Peter.
Comment 3 Mika.Heikkinen 2004-05-19 06:44:59 CEST
cvs head fixed (only G4CascadeInterface.cc affected)
Comment 4 paganini 2004-11-25 15:11:59 CET
I don't execute geant4.6.2.p02 installation in a PC with Linux mandrake
it appears the following error message:Compiling G4NeutronHPPhotonDist.cc ...
g++: Internal error: Segmentation fault (program as)
Please submit a full bug report.
See <URL:https://qa.mandrakesoft.com/> for instructions.
gmake[2]: **
[/usr/local/geant4.6.2.p02/tmp/Linux-g++/G4had_neu_hp/G4NeutronHPPhotonDist.o]
Erro 1
Making dependency for file src/G4FTFParticipants.cc ...

Can somebody help me?
thanks