Re: [R-pkg-devel] For reproducibility issue

2020-01-20 Thread Martin Maechler
�2020 �06:30 �� > To: Ivan Krylov<mailto:krylov.r...@gmail.com> > Cc: ��� ���<mailto:wkmtie...@qu.edu.sa>; R Package Development<mailto:r-package-devel@r-project.org> > Subject: Re: [R-pkg-devel] For reproducibility issue > Hi. >

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread Ralf Stubner
On Fri, Jan 17, 2020 at 2:56 PM ‫وليد خلف معوض المطيرى‬‎ wrote:‬ > This might be because the RNG method used in random_number function is > different between the used version GCC 6 or less and the new ones GCC 8 or > greater. This is quite likely correct. The current gfortran docs [1] list

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread Avraham Adler
> > > > > > > Sent from Mail for Windows 10 > > > > From: Avraham Adler > Sent: ‏Friday,‏ ‏January ‏17,‏ ‏2020 ‏06:30 ‏م > To: Ivan Krylov > Cc: وليد خلف معوض المطيرى; R Package Development > Subject: Re: [R-pkg-devel] For reproducibility issue > > > &g

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread وليد خلف معوض المطيرى
; for Windows 10 From: Avraham Adler<mailto:avraham.ad...@gmail.com> Sent: �Friday,� �January �17,� �2020 �06:30 �� To: Ivan Krylov<mailto:krylov.r...@gmail.com> Cc: ��� ���<mailto:wkmtie...@qu.edu.sa>; R Package Development<mailto:r-package-devel@r-p

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread Jeff Newmiller
As an existing package I suspect that it already calls the R RNG, but the default RNG changed [1] so you need to call RNGkind(sample.kind = "Rounding") before calling set.seed in your test code to compare with old results. [1]

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread Avraham Adler
Hi. If it helps, I call the R RNG from Fortran in my Delaporte package [1], also using iso_c_bindings. Specifically, I have the following C code [2]: void F77_SUB(unifrnd) (int *n, double *x){ GetRNGstate(); for (int i = 0; i < *n; ++i){ *(x + i) = unif_rand(); } PutRNGstate(); } and call it in

Re: [R-pkg-devel] For reproducibility issue

2020-01-17 Thread Ivan Krylov
On Fri, 17 Jan 2020 13:55:39 + وليد خلف معوض المطيرى wrote: > So, does anyone have an idea of how to solve this issue. "Writing R Extensions", 1.6. Writing portable packages: >> Compiled code should not call the system random number generators >> such as rand, drand48 and random, but