<div dir="ltr">Hello, <div><br></div><div>just a short comment: GATE is not validated at all with MT Geant4, and should not be used with Geant4 MT. </div><div><br></div><div>Modifying Gate to use Geant4 MT capabilities would require lot of work and is not currently planned. </div><div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 5:29 PM, David Boersma <span dir="ltr"><<a href="mailto:david.boersma@physics.uu.se" target="_blank">david.boersma@physics.uu.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<span class=""><br>
<br>
Den 01/02/2016 kl. 17:08, skrev Andrej:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A quick and dirty fix is to set the randomSeed to some run related<br>
number. I know that in geant people would sometimes start each event<br>
with a seed equal to that event number. Here you only have to do it<br>
run-wise.<br>
</blockquote>
<br></span>
Unfortunately when we try that we still get identical outputs for successive runs.<br>
<br>
I think that the problem is not in how Gate obtains a seed (from /dev/random with "auto" or reading a literal user-supplied value from the macro), but rather in how Gate communicates that seed to (a multithreaded version of) the geant4 library.<br>
<br>
David<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
Cheers<br>
<br>
Andrej<br>
<br>
surabhi balagopal nair je 2/1/2016 ob 4:40 PM napisal:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hello,<br>
<br>
Can anyone tell me whether the Virtual Gate is built on GEANT4<br>
multithread ON or OFF?<br>
<br>
Thank you,<br>
SN<br>
<br>
On 1 February 2016 at 10:14, David Boersma<br></span><div><div class="h5">
<<a href="mailto:david.boersma@physics.uu.se" target="_blank">david.boersma@physics.uu.se</a> <mailto:<a href="mailto:david.boersma@physics.uu.se" target="_blank">david.boersma@physics.uu.se</a>>> wrote:<br>
<br>
Hi,<br>
<br>
It looks like Thomas Deschler was right: random number seeding in<br>
Gate (current develop version, but I suspect the conclusions also<br>
hold for release 7.1) only works correctly if the Geant4 10.1<br>
libraries were compiled with multithreading OFF. By "correctly" we<br>
mean: with "auto" seeding you get a different seed every time you<br>
run it, and therefore statistically independent outputs. If you<br>
use a geant4 installation built with multithreading=ON, then<br>
successive Gate runs will give identical outputs.<br>
<br>
We verified this (on Linux and on MacOSX) by compiling Geant4 with<br>
and without multithreading, and then building Gate with it. We ran<br>
Hediye's minimal RT macro (shoot electrons on a target foil, and<br>
collect a phasespace of the particles after it, stored in a ROOT<br>
output file). We ran the macro twice (renaming the output<br>
directory in between). "Ekine" histograms of the two runs were<br>
numerically identical when we ran *with* multithreading and they<br>
were clearly different *without* multithreading.<br>
<br>
Short term action item: it would be good to document this clearly<br>
in the README file and/or the 7.1 installation guide on the wiki.<br>
<br>
Medium/long term action item: fix Gate to work correctly with<br>
multithreaded geant4.<br>
<br>
I have more comments, but they are more technical, will submit<br>
them as "issues" on GitHub.<br>
<br>
HTH,<br>
David B.<br>
<br>
<br>
Den 01/02/2016 kl. 11:18, skrev hediye acun:<br>
<br>
Hello Loic,<br>
<br>
We tried your recommendations with David Boersma. First we<br>
run main<br>
macro file for 20 particles and stored output in PhS_new.root<br>
file. We<br>
got particle's properties(location and energy) in root with<br>
Scan command<br>
and then we closed root to make sure root will not remember<br>
the first<br>
output file due to the same tree's name. We run main macro<br>
second time<br>
with same particle number(20) to get second output file which<br>
called<br>
PhS_try.root. In root with scan we obtained particle's<br>
properties again<br>
for second run. After that we compared two text files which<br>
include<br>
particle's location and energies and there was no difference<br>
between them.<br>
<br>
David Boersma run same macro file in his computer which has Geant4<br>
compiled with multithread OFF, and he obtained different<br>
results for<br>
same number of primaries. My Geant4 compiled with multithread<br>
ON. We<br>
are going to try to compile on my computer with multitherad<br>
OFF and on<br>
David's computer multithread ON to investigate whether it<br>
really depends<br>
on the multithreading.<br>
<br>
Best regards.<br>
<br>
Hediye acun<br>
<br>
PS. It looks like the mailing list not working today. David didn't<br>
receive your reply and we didn't see on the archive either.<br>
<br>
<br>
------------------------------------------------------------------------<br>
*From:* Grevillot Loic <<a href="mailto:loic.grevillot@medaustron.at" target="_blank">loic.grevillot@medaustron.at</a><br></div></div>
<mailto:<a href="mailto:loic.grevillot@medaustron.at" target="_blank">loic.grevillot@medaustron.at</a>>><span class=""><br>
*To:* hediye acun <<a href="mailto:acunhediye@yahoo.com" target="_blank">acunhediye@yahoo.com</a><br></span>
<mailto:<a href="mailto:acunhediye@yahoo.com" target="_blank">acunhediye@yahoo.com</a>>>;<br>
"<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<mailto:<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a>>"<br>
<<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br>
<mailto:<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a>>><div><div class="h5"><br>
*Sent:* Monday, February 1, 2016 9:20 AM<br>
*Subject:* RE: [Gate-users] problem with random number seed?<br>
<br>
Hello,<br>
In my experience the command"/gate/random/setEngineSeed<br>
auto"works.<br>
In your example you are looking at histograms, but to verify<br>
that issue<br>
I was thinking about something different:<br>
-If the seed did not change as you suspect, the physical<br>
properties from<br>
every single particle stored in your Phase Space one after the<br>
other<br>
shall be exactly the same (position, direction, energy, etc.)<br>
for 2<br>
simulations.<br>
-Could you check that on a particle basis for 10 or 20 particles?<br>
You could even try a very simple example where you could<br>
randomly sample<br>
10 particles and look if they are the same for 2 simulations.<br>
Let us know!<br>
Thanks<br>
Image:Uncle_Sam_pointing_finger_small.jpgImage:We-Need-You1-324x500.jpgImage:superdupont-we-need-you.jpgImage:gsam_want_gnu_small.jpg<br>
*//**/GATE is a /**/research community/**/, /**/ please<br>
contribute!/*//<br>
*You just started? You found some errors in the examples and the<br>
documentation?*<br>
§ You can correct the documentation<br>
<<a href="http://wiki.opengatecollaboration.org/index.php/Main_Page" rel="noreferrer" target="_blank">http://wiki.opengatecollaboration.org/index.php/Main_Page</a>> on<br>
the wiki<br>
web site<br>
§ You can share your experience on the user mailing-list<br>
<<a href="http://www.opengatecollaboration.org/mailinglist" rel="noreferrer" target="_blank">http://www.opengatecollaboration.org/mailinglist</a>><br>
**<br>
*You have a few months of experience or more?*<br>
§ You can correct or even propose new examples<br>
<<a href="http://www.opengatecollaboration.org/Examples" rel="noreferrer" target="_blank">http://www.opengatecollaboration.org/Examples</a>><br>
§ You can propose a new gate actor, it is as easy as a plug-in!<br>
<<a href="http://wiki.opengatecollaboration.org/index.php/GateActor" rel="noreferrer" target="_blank">http://wiki.opengatecollaboration.org/index.php/GateActor</a>><br>
*You are now an official Gate addict and you need more?*<br>
§ You can participate in Gate C++ source code development:<br>
debugging,<br>
propose new classes, etc.<br>
ðFor new developments, use git<br>
<<a href="http://www.opengatecollaboration.org/Git" rel="noreferrer" target="_blank">http://www.opengatecollaboration.org/Git</a>> and contact the<br>
gate-devel-mailing-list<br>
<<a href="http://www.opengatecollaboration.org/mailinglist" rel="noreferrer" target="_blank">http://www.opengatecollaboration.org/mailinglist</a>> to be guided.<br>
*//**/Thanks for your contribution, the OpenGate collaboration!/*<br>
*From:*<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a><br>
<mailto:<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>><br></div></div>
[mailto:<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a><span class=""><br>
<mailto:<a href="mailto:gate-users-bounces@lists.opengatecollaboration.org" target="_blank">gate-users-bounces@lists.opengatecollaboration.org</a>>]<br>
*On Behalf<br>
Of *hediye acun<br>
*Sent:* Friday, January 29, 2016 3:46 PM<br>
*To:* <a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a><br></span>
<mailto:<a href="mailto:gate-users@lists.opengatecollaboration.org" target="_blank">gate-users@lists.opengatecollaboration.org</a>><div><div class="h5"><br>
*Subject:* [Gate-users] problem with random number seed?<br>
Hello All,<br>
I have Gate "develop" version and at the same time<br>
geant4.10.1.0 and<br>
root_v5.34.32 on the GPU. My operating system is Linux Mint 17.2 .<br>
I am triying to simulate a linac head to get Phase Space of<br>
photons.<br>
Just for an example I run Gate for a basic geometry which<br>
include only<br>
electron beam, target filter and Phase space plane inside a linac<br>
geometry. When I run Gate two or more times for same "number of<br>
primaries" I got the exactly the same Phase Space distributions<br>
(histogram of Ekine completely identical). But I am using<br>
"/gate/random/setEngineSeed auto" command and according to the<br>
documentation that should give me the different seed every<br>
time when I<br>
run it. I would expect some random differences between PhS's from<br>
different runs.<br>
Does anyone have any idea about this issue? Thank you in advance.<br>
Hediye Acun<br>
*Disclaimer:*<br>
Please notice our E-Mail Disclaimer<br>
<a href="http://www.medaustron.at/email-disclaimer/" rel="noreferrer" target="_blank">http://www.medaustron.at/email-disclaimer/</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br></div></div>
<mailto:<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a>><span class=""><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
</span></blockquote><span class="">
<br>
<br>
<br>
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a><br>
<br>
</span></blockquote><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
Gate-users mailing list<br>
<a href="mailto:Gate-users@lists.opengatecollaboration.org" target="_blank">Gate-users@lists.opengatecollaboration.org</a><br>
<a href="http://lists.opengatecollaboration.org/mailman/listinfo/gate-users" rel="noreferrer" target="_blank">http://lists.opengatecollaboration.org/mailman/listinfo/gate-users</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">David Sarrut, Phd<br>Directeur de recherche CNRS<br>CREATIS, UMR CNRS 5220, Inserm U1206<div>Centre de lutte contre le cancer Léon Bérard<br>28 rue Laënnec, 69373 Lyon cedex 08<br>Tel : 04 78 78 51 51 / 06 74 72 05 42<br><a href="http://www.creatis.insa-lyon.fr/~dsarrut" target="_blank">http://www.creatis.insa-lyon.fr/~dsarrut</a><br>_________________________________</div><div> "2 + 2 = 5, for extremely large values of 2"<br>_________________________________</div></div></div></div></div>
</div>