(j3.2006) Rationale for RANDOM_INIT?
Steve Lionel
steve
Wed Jan 10 19:13:48 EST 2018
On 1/10/2018 4:06 PM, Steven G. Kargl wrote:
> Now, suppose that the executable instantiates two images, and for
> this discussion call them image0 and image1.
>
> 2) IMAGE_DISTINCT=.true. means *distinct* seeds are used to seed
> the PRNG in image0 and image1. This suggests that there is an
> implied assumption that the *distinct* seeds will lead to
> *distinct* sequences of RN. Is this the intent of the Standard?
> If yes, then the Standard should remove the assumption and state
> the expected behavior.
>
> Compilers likely use a PRNG with some long period. The seed
> initializes the PRNG by essentially pointing to a particular
> member in the sequence of all RN. It is then possible that
> *distinct* seeds lead to a sequence for image0 of [A B C D E ...]
> and for image1 of [C D E ...]. That is, the two sequences have
> a significant overlap. Here, a question of how much overlap
> should be permissable arises.
>
> So, what does *distinct* mean?
>
> 3) Given the requirement of *distinct* seeds, this eliminates a class
> of PRNG that can use a single seed to select a particular member in
> the sequence of all RN, and then use a transform to select independent
> subsequences. For example, internally, xform(0) would cause image0
> to select subsequence 0 and xform(1) causes image1 to select
> the subsequence 1. A description of this class of generator can
> be found at http://vigna.di.unimi.it/ftp/papers/xorshift.pdf.
>
> It seems to me that the Standard should not require *distinct* seeds
> when IMAGE_DISTINCT=.true., but rather require independent sequences.
> The level of independence can be some statistical metric.
The design of RANDOM_NUMBER and, in particular, RANDOM_SEED, has the
explicit assumption that a given seed will generate a given sequence.
There is no opportunity here for a RNG that can generate distinct
sequences from a given seed. Users who want such behavior would need to
look at supplying their own RNG.
The standard leaves unspecified the quality of the RNG used by
RANDOM_NUMBER and, yes, it would be permissible by the standard for the
sequences to overlap with different seeds, but I'd expect that users of
such an implementation would soon complain vociferously to the
implementor.? It is true that the intent of IMAGE_DISTINCT is to
generate distinct sequences, but I think that trying to specify that in
the standard would be a mistake.
At most, I think what you have here is an editorial suggestion, not a
technical change. If you still feel this is an issue that needs to be
addressed, given where we are in the process,? it could be made as a
"country comment" during the balloting. Better I think would be an
interp request, but not until the standard is published.
Steve Lionel
More information about the J3
mailing list