Message: Re: Clear the memory allocated for G4VPrimitiveScorer? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Clear the memory allocated for G4VPrimitiveScorer? 

Forum: Biasing and Scoring
Re: Question Clear the memory allocated for G4VPrimitiveScorer? (Clare Huang)
Re: None Re: Clear the memory allocated for G4VPrimitiveScorer? (Tsukasa Aso)
Re: None Re: Clear the memory allocated for G4VPrimitiveScorer? (Clare Huang)
Re: Question Re: Clear the memory allocated for G4VPrimitiveScorer? (Philipp Roser)
Date: 08 May, 2018
From: Makoto Asai <Makoto Asai>

If you are running your code in multithreaded mode, for the sake of avoiding the massive communications over the threads, each thread has its own map, and they are merged into one at the end of the event loop.

The size of the map does not linearly depend on number of events. It's just proportional to the number of bins that have non-zero entries. But the more events you have, the more voxels would have energy depositions. If memory size is your concern, please reduce number of voxels. Also, if you don't need to get the statistical errors, you may want to use std::map<int,double> instead of std::map<int,G4StatDouble>, but you have to edit the Geant4 source code as we do not have a convenient option flags for this (sorry for that!). Given the number of events you want to simulate is huge, I believe you need to use double anyway to avoid the truncation errors.

Hope this helps,
Makoto

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

1 Question: Re: Clear the memory allocated for G4VPrimitiveScorer?   (Philipp Roser - 30 Jul, 2018)
(_ Feedback: Re: Clear the memory allocated for G4VPrimitiveScorer?   (Jonathan Madsen - 30 Jul, 2018)
(_ Agree: Re: Clear the memory allocated for G4VPrimitiveScorer?   (Philipp Roser - 30 Jul, 2018)
 Add Message Add Message
to: "Re: Clear the memory allocated for G4VPrimitiveScorer?"

 Subscribe Subscribe

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