Generate a seed, randomly or not. More...
Functions/Subroutines | |
subroutine | generate_seed (is_random) |
This routine generates a seed, randomly or not. The seed is a global variable defined in the 'variables_random_number' module.
The seed may not be set randomly for verification or validation purpose. It is set by rank processor 0 and broadcasted to other MPI processes.
This is a first version that may be improved:
Note[Joris]: Passing a_seed as an argument would allow easier-unit testing, and would allow multiple random number series at the same time.
Note[Joris]: Using idioms like if (rank == 0) then z = get_random_number() end if will lead to offsets between MPI processes.