Message: Re: Too many particles causing Segmentation Error Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: Too many particles causing Segmentation Error 

Forum: Particles
Re: Question Too many particles causing Segmentation Error (Daniel O'Brien)
Date: 19 Mar, 2009
From: Juan <Juan>

Hi Daniel,

I have tried your code.

I think the problem is from your LINACPrimaryGenerator.cc

you are creating to much particles in a event.

      G4int n_particle = 300000;
      particleGun = new G4ParticleGun(n_particle);

Running this, I see my memory usage is 30%

When I put n_particle = 1 in LINACPrimaryGenerator.cc and in the main LINACModel.cc I set

  runManager->BeamOn(300000);

The program runs good an uses only 4% of the memory

Juan

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Too many particles causing Segmentation Error   (Paul Nicholas Colin Gloster - 19 Mar, 2009)
(_ None: Re: Too many particles causing Segmentation Error   (Daniel O'Brien - 19 Mar, 2009)
(_ Feedback: Re: Too many particles causing Segmentation Error   (Gumplinger Peter - 19 Mar, 2009)
(_ Agree: Re: Too many particles causing Segmentation Error   (Daniel O'Brien - 20 Mar, 2009)
 Add Message Add Message
to: "Re: Too many particles causing Segmentation Error"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]