Skip to content
Prev 34379 / 63424 Next

rnorm.halton

Christophe,

you're looking at the wrong docs -- normally there is nothing you need  
to change FORTRAN code when switching between 32-bit and 64-bit. There  
is no separate "64-bit code" or "32-bit code". None of the scalar  
types used by R in interfaces changes (int, double and INTEGER, REAL*8  
are both the same). You only need to change your code if you make  
assumptions about the size of pointers which increases from 4 bytes to  
8 bytes (and normally you should not be making those assumptions). I  
don't think you should touch any Fortran code.

For the C code, the only thing that changes (beside pointer size) is  
"long" data types. If you use those in your code, you must be aware  
that the corresponding size change. I suspect that if you have a  
discrepancy in your 32/64-bit binaries then you either have a bug  
somewhere (Fortran or C) or your C code is not 64-bit clean (i.e.  
makes some 32-bit assumptions that are not true in 64-bit environment  
- check the use of "long" data types and pointers). Again, the  
solution is to fix the code to be clean, it will still be the same for  
both 32-bit and 64-bit.

Cheers,
Simon
On Oct 10, 2009, at 12:04 PM, Christophe Dutang wrote: