[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SGI 64 bit options



> Glenn,
>
> Thanks for your response. I think we have decided that using "-i8" is
> too risky, but that using "-r8" is okay.

Okay, but why not just declare the variable as REAL*8 or DOUBLE PRECISION?

> It's difficult trying to
> decide what combination of -64, -32, -n32, -r8 we want to support!
>
> Mary

I know what you mean.

As far as the C options (64, -32, -n32) go, this is the way I look at it.
Almost always use -n32.

If the executable needs to run on an older (IRIX 5.x) system,
then you are forced to use -32.

I only use -64 (the default on R8000's and R100000's) for confirming
portability, for programs which would exceed 2^32 as an
address space (size_t) or file size (off_t) or for programs which might benefit
from use of a 64bit 'long' in calculations or bit fields.

All the vendors I've seen are providing binaries as -n32 by default.

If you look on an IRIX64 system, most of the executables are -n32:

(binnie) 79 % uname -a
IRIX64 binnie 6.2 03131016 IP26
(binnie) 80 %  file /sbin/csh
/sbin/csh:      ELF N32 MSB mips-3 executable MIPS - version 1

As far as the netcdf library per se is concerned, there is no advantage to
using -64. The netcdf on disk representation of integers, 'sizes', and
file offsets is 32 bits. Using -64 introduces an additional conversion
in the netcdf library for these types. Of course, if you have a program
which needs -64 for other reasons, there is no harm in using a
version of the netcdf library which was configured and built using -64.

Our recommendation for SGI's for netcdf in most circumstances is to use
'cc -n32' for the C compiles and unadorned 'f77' for fortran.

Regards.

-glenn