Initialized random seed with idx
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | idx |
subroutine init_random_seed( idx ) ! --------------------------------------------------------------------------- integer, intent(in) :: idx integer :: nSeeds integer, allocatable :: seed(:) integer :: i ! --------------------------------------------------------------------------- call random_seed(size = nSeeds) allocate(seed(nSeeds)) seed = 37 * [ (idx*nSeeds + i, i=1,nSeeds) ] call random_seed(put = seed) deallocate(seed) end subroutine init_random_seed