Distributed parallel computing¶
Distributed parallel computing can be obtained by launching parallel runs on different machines. Correlations between the jobs should be avoided by forcing each job to start from different initial random seeds.
The initial seeds can be input into Geant4 via a text file. In the case of GRAS the random generator used is the “Ranecu Engine”, which only needs two long integers for the engine initialisation. An example random seed file content for the Ranecu Engine is the following:
0
1632641235 2127009234
The user has to provide a set of files for the job initialisation, one for each job, and insure the given seeds lead to uncorrelated simulation events. The file is then loaded into Geant4 with the UI Command:/random/resetEngineFrom
Script example:
/random/resetEngineFrom seeds.rndm
A second option is provided in GRAS to reset the random number generator. This implementation is based on the random seed generation in the “cosmic ray charging” Geant4 advanced example 11. In this case the random seeds are automatically internally generated at the beginning of each run based on the system clock. This option can be selected with the GRAS UI Command:/gras/analysis/autoSeed.
Script example:
/gras/analysis/autoSeed [true | false]
The advantage of this option is that, by specifying /gras/analysis/autoSeed true, the user does not need to provide to each job the file with the couple of random seeds for the engine initialisation. However, it is important to notice that the level of correlation of the runs is in this case not under the control of the user, and should be verified case by case.
The seeds are by default automatically appended to the analysis output
filename. This feature may be disabled with the UI command
/gras/analysis/seedsInFileName
:
/gras/analysis/seedsInFileName [true | false]
GRAS/trunk/r2242