Dear FLUKA experts and users,
First of all, I would like to thank everyone who contributes to this forum by providing answers, explanations, and examples. The discussions here have helped me resolve many issues and misunderstandings that I would likely not have been able to solve on my own.
I have a question regarding the execution of FLUKA jobs in parallel on a computing cluster (a Slurm cluster in my case). Although I have read several related topics, there are still a few points that I would like to clarify.
-
I use a
bashscript that takes a template input file, for examplemodel.inp, and alters thewhat(2)parameter of theRANDOMIZecard usingsed. The template’s value of 1 is replaced by an integeri, wherei = 1, ..., n_runs. The modified input is then saved as a new file namedmodel_i.inp. As an example, when running on 100 CPU cores, the script generates the files with names:model_1.inp,model_2.inp, …,model_100.inpand correspondingRANDOMIZewhat(2)values:1,2, …,100.
Thewhat(1)parameter is left blank, so FLUKA uses its default value of1.
Is this a correct approach? -
To submit the jobs I use
srun /<path_to_fluka>/bin/rfluka -M n_cycles model_i.inp
command.
My understanding is that a run based on model_i.inp is repeated n_cycles times, with each cycle continuing from a different state of the random number generator (?)
I am not very familiar with the implementation details of random number generation in FLUKA, but I noticed that FLUKA (through its built-in RM64 generator, if I understand correctly) creates files such as ranmodel_ixxx . These files contain a header and a sequence of alphanumeric values. Interestingly, the first value in the header (for example 85020AD ) appears to match the first value reported in the NEXT SEEDS: line of the corresponding .err file.
For example:
85020AD 4 1 3039B66B065F
D 2E1CD082203FA03501
964CE6DE3FD864BF6EE241783FD35FF9CB4F66AB3FE3FCD ...
and
NEXT SEEDS: 85020AD 4 0 0 0 0 1 3039 0 0
Could someone explain what exactly is happening at this stage of the calculation? In particular, how is the seed specified in the RANDOMIZe card related to the values shown in the ranmodel_ixxx files and the NEXT SEEDS: entries reported in the .err file?
- Finally, I would like to confirm whether the procedure described above guarantees statistical independence among all cycles and all submitted jobs (All the
sedaction done to alter the random seed value in theRANDOMIZecard take place inside a loop scope. The jobs submitting process is also enclosed inside another bash loop body).
Cheers,
Ihor
FLUKA: 4-5.1
Operating system: Ubuntu 24.04 LTS (slurm cluster)