Set the pseudo-random number generator seed
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | S |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine setRandomSeed(S)
!! Set the pseudo-random number generator seed
integer::S
integer::k,N
call random_seed(size=N)
call random_seed(put=[(k-1,k=1,N)]*S)
end subroutine setRandomSeed