Re: [PATCH] PR fortran/91414: Improved PRNG

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91414: Improved PRNG

Steve Kargl
On Sun, Aug 11, 2019 at 12:37:49PM +0300, Janne Blomqvist wrote:

> Update the PRNG from xorshift1024* to xoshiro256** by the same
> author. For details see
>
> http://prng.di.unimi.it/
>
> and the paper at
>
> https://arxiv.org/abs/1805.01407
>
> Also the seeding is slightly improved, by reading only 8 bytes from
> the operating system and using the simple splitmix64 PRNG to fill in
> the rest of the PRNG state (as recommended by the xoshiro author),
> instead of reading the entire state from the OS.
>
> Regtested on x86_64-pc-linux-gnu, Ok for trunk?
>

Looks good to me.

--
Steve
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91414: Improved PRNG

Janne Blomqvist-3
On Mon, Aug 12, 2019 at 11:23 PM Steve Kargl
<[hidden email]> wrote:

>
> On Sun, Aug 11, 2019 at 12:37:49PM +0300, Janne Blomqvist wrote:
> > Update the PRNG from xorshift1024* to xoshiro256** by the same
> > author. For details see
> >
> > http://prng.di.unimi.it/
> >
> > and the paper at
> >
> > https://arxiv.org/abs/1805.01407
> >
> > Also the seeding is slightly improved, by reading only 8 bytes from
> > the operating system and using the simple splitmix64 PRNG to fill in
> > the rest of the PRNG state (as recommended by the xoshiro author),
> > instead of reading the entire state from the OS.
> >
> > Regtested on x86_64-pc-linux-gnu, Ok for trunk?
> >
>
> Looks good to me.
Thanks, committed to trunk (with a minor bugfix I noticed). I
backported the initialization changes to the gcc9 and gcc8 branches as
well with the attached patch.



--
Janne Blomqvist

0001-PR-fortran-91414-Improve-initialization-of-PRNG.patch (5K) Download Attachment