0

I am trying to migrate simulation code written in R-3.0.3 32 bit from Windows to Linux. But I am not getting matching results even though I used same R version on Linux (Redhat). I am seeing differences in the floating point results in each of the steps

I have used the below command to build R binary in Linux from the source code

./configure --with-readline=no --with-x=no CC="gcc -m32 -mfpmath=387 -ffloat-store" CXX="g++ -m32 -mfpmath=387 -ffloat-store" F77="gfortran -m32 -mfpmath=387 -ffloat-store" FC=${F77} OBJC=${CC} LDFLAGS="-L/usr/local/lib" LIBnn=lib r_arch=i686

I have also tried with the sse compilation options. Even those results were also not matching.

Below are the R configurations on Windows and Linux. In Windows I directly used the exe available.

Linux

R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-unknown-linux-gnu/i686 (32-bit)

Windows

R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: i386-w64-mingw32/i386 (32-bit)

I have kept all the version of R libraries used by both Windows and Linux same. Please let me know if anyone has faced this issue. Wondering if any of the compilation option that I would have not tried would fix the issue

Rui Barradas
  • 70,273
  • 8
  • 34
  • 66
Hari
  • 1
  • 4
    did you use the same seed for your simulations? – august Jun 21 '18 at 13:44
  • Welcome to Stack Overflow! Please read the info about [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](https://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – Ralf Stubner Jun 21 '18 at 14:31
  • Yes. I used the same seed. I ran the same program in both Windows and Linux – Hari Jun 21 '18 at 16:00
  • Please [edit] your question to inslude the output of `sessionInfo()`on Windows and Linux after running the code in a fresh session. And please try to reduce your code to a [mcve] that you can post. – Ralf Stubner Jun 21 '18 at 16:34

0 Answers0