(j3.2006) (SC22WG5.4119) [ukfortran] Parallel random numbers

Bill Long longb
Thu Oct 22 17:22:08 EDT 2009



N.M. Maclaren wrote:
> Here is some alternative wording.  It says as little as possible, and most
> of that is in a NOTE.  I really do think that being too specific is a bad
> mistake, as this is not an area that is easy to make proof against future
> developments.
> 
>     It is processor dependent whether RANDOM_SEED and RANDOM_NUMBER use
>     a common generator for all images or whether each image uses a
>     separate one.

The word "common" might be misinterpreted as "same algorithm" or even 
"ordinary". Maybe "shared" would be better.

This seems sufficiently vague to be backward compatible with F03 and any 
current implementation.

We typically discuss in normative text results of execution, rather than 
the method of computing the results. Maybe the whole bit should be a 
NOTE in the RANDOM_NUMBER subclause. Or maybe word this as

  "It is processor dependent whether the sequence of values returned by 
RANDOM_NUMBER is separate for each image, or is taken from a shared 
sequence.  If separate, then calls to RANDOM_SEED affect only the 
sequence on the same image."

[Wording could use some polish, but you get the idea...]

Cheers,
Bill




> 
>     NOTE 13.x
>     The range of possible implementations includes:
>         * All images use a common generator, and those procedures are
>     properly interlocked to make multiple calls in unordered segments
>     work correctly.
>         * Each image uses a separate copy of the same generator, with
>     the same or a different default seed for all images.
>         * Each image uses a different generator, possibly with true or
>     quasi-independence of those generators.
> 
> [ And, yes, if you have suitable hardware support, true independence
> is possible. ]
> 
> Plus edits to A2.
> 
> Regards,
> Nick.
> 
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3

-- 
Bill Long                                   longb at cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120





More information about the J3 mailing list