(j3.2006) What does "same image" mean?

Steve Lionel steve
Tue Feb 20 15:13:13 EST 2018


I don't think that "same processor" is what we want here - perhaps "for
each execution of the program". So for a call to
RANDOM_INIT(.true.,.false.), the same processor-dependent seed is used
every time (like the way gfortran (still?) does it and ifort used to when
RANDOM_SEED was called with no arguments.

The current words are not incorrect, but could be better in how they
describe REPEATABLE=.true. behavior.

Steve

On Tue, Feb 20, 2018 at 2:50 PM, John Reid <John.Reid at stfc.ac.uk> wrote:

> Steven,
>
> I would say that this behaviour does not conform, but there does appear to
> be an ambiguity. Should we add "on the same processor" at the sentence end
> so that it reads "If it (the argument repeatable) has the value true, the
> seed accessed by the pseudorandom number generator is set to a
> processor-dependent value that is the same each time RANDOM_INIT is called
> from the same image on the same processor."?
>
> John Reid.
>
>
>
> Steven G. Kargl wrote:
>
>> Bill,
>>
>> I agree with your assessment with the observation that I'm
>> concern with what a mere mortal user thinks the standard
>> says.  As far as I know, the following conforms
>>
>> program foo
>>    real x(3)
>>    call random_init(.true., .false.)
>>    call random_number(x)
>>    write(*,'(3F15.7)') x
>> end program foo
>>
>> % gfcx -o z c.f90
>> % ./z
>>       0.9166497      0.0343677      0.9250018
>> % ./z
>>       0.3294057      0.3634282      0.6506106
>> % ./z
>>       0.8441532      0.5690981      0.7679952
>>
>> but, is this what a user expects and wants?  As the person that
>> made 'call RANDOM_SEED()' return the same sequence of RN with
>> gfortran, I am well aware that a number of users were unhappy
>> because other vendors choose a different behavior.
>>
>> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>



-- 
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.j3-fortran.org/pipermail/j3/attachments/20180220/87ecc361/attachment.html>



More information about the J3 mailing list