(j3.2006) Rationale for RANDOM_INIT?
Steve Lionel
steve
Wed Jan 3 18:37:30 EST 2018
On 1/3/2018 6:16 PM, Steven G. Kargl wrote:
> I'm trying to understand the rationale behind the
> new RANDOM_INIT subroutine, and in particular why
> is the second argument, IMAGE_DISTINCT, not an
> optional argument? It seems that its purpose is
> to be used in a program that uses co-arrays where
> multiple instances of the program will be executed.
> This then suggests that the argument is of no use
> with programs that will never use co-arrays.
>
> Is there a Nxxx.pdf document that I sould read?
>
The paper you want is J3 14-184r4
(http://j3-fortran.org/doc/year/14/14-184r4.txt) . N2013
(https://wg5-fortran.org/N2001-N2050/N2013.txt) is also relevant. Even
though I wrote the spec, I don't recall exactly why IMAGE_DISTINCT
wasn't optional. I think there was sentiment that there was no obvious
choice for a default behavior and there are only two arguments (at this
time.) This intrinsic arose from a UK country comment. We noted at the
time that implementations differed in how they interpreted a call to
RANDOM_SEED with no arguments (left unspecified by the standard), and
that there was a need to also allow specification of how the RNG
operated across images.
Steve
More information about the J3
mailing list