(j3.2006) What does "same image" mean?
Bill Long
longb
Mon Jan 22 14:19:39 EST 2018
Images exist only during a particular execution of a program. The images from one execution are unrelated to the images of a different execution.
The desire/request for ?reproducible? random number sequences is motivated by the desire that every time you run the program you get the same sequence. This is an important property of you are trying to debug a code, or example, or want to have a specific set of output for for purposes of validating the code after a compiler update. That can be accomplished by an explicit PUT of the seed value, though I think most people expect this as the default behavior if the random_init value is set to repeatable=.true. , or no call at all if this is the processor default already. The random_init routine was introduced because processors differed on their default behavior.
The ?called from the same image? text in the description for the repeatable argument to random_init is there mainly for the case of image_distinct=.true. to emphasize that the reset of the ?the same? seed value is independent for each image in that case. No matter what the argument values, calling random_init affects only the seed value on the image where it is called.
Cheers,
Bill
> On Jan 22, 2018, at 11:59 AM, Steven G. Kargl <kargl at troutmask.apl.washington.edu> wrote:
>
> On Mon, Jan 22, 2018 at 11:21:12AM +0000, Anton Shterenlikht wrote:
>> I think "same image" here means same image in a particular
>> execution of the program. Two different exections of
>> a program with RANDOM_INIT(.true., ... ) might initialise
>> the seed to different values. So the random number sequences
>> from 2 executions of such program might be distinct.
>>
>> I think RANDOM_SEED(PUT=...) is meant for cases
>> where sequences of random numbers must be repeatable
>> for every execution of a program.
>>
>> Or have I got this wrong?
>>
>
> Your interpretation coincides with mine. Thanks
> for the confirmation.
>
> --
> Steve
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
Bill Long longb at cray.com
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
More information about the J3
mailing list