(j3.2006) (SC22WG5.4108) [ukfortran] Standard intrinsics and coarrays

Aleksandar Donev adonev
Thu Oct 22 02:26:10 EDT 2009

Malcolm Cohen wrote:

> In a "shared" generator there is a single seed and a single sequence.  
> Images take values from that single sequence.
Presumably if two calls to RANDOM_NUMBER are unordered, what order they 
take from the sequence is undefined. These kinds of things would need to 
be spelled out explicitly.

> In a "separate" generator, each image has a seed and a sequence.  Each 
> image takes values from its own sequence.
Are the generators the same on each image (i.e., same sequence for the 
same seed)? Also needs to be spelled out explicitly.

> Perhaps we should require that it should be one or the other.
If we do the choice is obvious: separate generators on each image.

Isn't there some room in-between. One can have separate streams but that 
get initialized during a call to RANDOM_SEED together so that they are 
independent on each image. Perhap's we should allow for such cases? For 
example, the SPRNG library (http://sprng.cs.fsu.edu/sprng.html) has a 
Modified Lagged Fibonacci Generator generator that:

"The seed used during initialization for this generator does not move 
one to a different point in the sequence. Rather, it returns a different 
sequence. The seeding algorithms ensures that if the same seed is used 
for all the streams, then the streams obtained are independent. If a 
user initializes different streams with different seeds, then it is 
possible that the same sequence may be assigned to two different streams 
and hence we may no longer have independent streams. Thus it is 
important to use the same seed while initializing all the streams with 
this generator."


More information about the J3 mailing list