[Gate-users] The seed generator takes no effect?
Jon Moody
jbmoody at umich.edu
Mon May 20 19:17:17 CEST 2013
This problem was mentioned in a previous post:
http://permalink.gmane.org/gmane.comp.science.opengate.user/1133.
It happens because the job splitter (gjs) creates seeds as unsigned long
integers (as you can see in the cluster mac files) but then the
GateRandomEngine uses the C function atoi() to read these seeds.
Depending on your computer hardware and compiler, If the seed in the mac
file happens to be greater than INT_MAX then atoi() will return
INT_MAX. Thus all cluster nodes that have this overflow condition will
end up with the same seed INT_MAX.
Check the cluster *.out files and look for the random engine status.
You should see a line like "Initial seed = ###" (you might need to add
"/gate/random/verbose 1" to see this output). The overflow problem is
indicated If the initial seed equals INT_MAX and does not match the
input seed in the corresponding mac file.
To fix it you either have to change the job splitter to ensure that the
seeds it writes out are less than INT_MAX, or change the
GateRandomEngine to use a different conversion function instead of
atoi(). HTH.
--
Jon
On 5/19/2013 11:41 PM, Janus wrote:
> Dear gate-users,
>
> I have run gate with jobsplitter. Definitely it has divided the job to
> 20 subjobs. However, I got the same imaging (i compared the 20 images
> bit by bit)! The setEngineSeed did work in the splitted *.mac files
> (bold text). The following codes show the contents of the two splitted
> files:
>
> ClusterTestImaging1.mac
> ......
> ......
> /gate/output/root/setFileName /home/usr/ClusterTestImaging/output/RT_IBL1
> /gate/output/root/setRootHitFlag 0
> /gate/output/root/setRootSinglesFlag 1
> /gate/output/root/setRootNtupleFlag 0
> /gate/output/verbose 2
> /gate/output/imageCT/verbose 0
> /gate/output/imageCT/setFileName /home/usr/ClusterTestImaging/RT_IBL1
> /gate/output/imageCT/vrtFactor 10
> /control/verbose 0
> /run/verbose 0
> /run/particle/verbose 0
> /run/particle/dumpCutValues
> /event/verbose 0
> /tracking/verbose 0
> /tracking/verbose 0
> /gate/generator/verbose 0
> /gate/source/verbose 0
> /run/particle/verbose 0
> /gate/run/initialize
> /gate/application/setTimeSlice 1. s
> /gate/application/setTimeStart 0. s
> /gate/application/setTimeStop 20. s
> */gate/random/setEngineSeed 2231298888450829131*
> /gate/output/root/enable
> /gate/output/imageCT/enable
> /gate/application/startDAQCluster 0 1 0 s
> exit
>
>
> ClusterTestImaging2.mac
> ......
> ......
> /gate/output/root/setFileName /home/usr/ClusterTestImaging/RT_IBL2
> /gate/output/root/setRootHitFlag 0
> /gate/output/root/setRootSinglesFlag 1
> /gate/output/root/setRootNtupleFlag 0
> /gate/output/verbose 2
> /gate/output/imageCT/verbose 0
> /gate/output/imageCT/setFileName /home/usr/ClusterTestImaging/output/RT_IBL2
> /gate/output/imageCT/vrtFactor 10
> /control/verbose 0
> /run/verbose 0
> /run/particle/verbose 0
> /run/particle/dumpCutValues
> /event/verbose 0
> /tracking/verbose 0
> /tracking/verbose 0
> /gate/generator/verbose 0
> /gate/source/verbose 0
> /run/particle/verbose 0
> /gate/run/initialize
> /gate/application/setTimeSlice 1. s
> /gate/application/setTimeStart 0. s
> /gate/application/setTimeStop 20. s
> */gate/random/setEngineSeed 2066136114380675524*
> /gate/output/root/enable
> /gate/output/imageCT/enable
> /gate/application/startDAQCluster 1 2 0 s
> exit
>
> Any comments will be gratefully appreciated. Thanks in advance.
> d
> Regards,
> ------------------------------------------------------------------------
> Janus
>
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20130520/1a943674/attachment.html>
More information about the Gate-users
mailing list