[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 991222: netcdf on O2K vs Cray j90
- Subject: Re: 991222: netcdf on O2K vs Cray j90
- Date: Wed, 22 Dec 1999 14:01:21 -0700
> Date: Wed, 22 Dec 1999 13:15:34 -0700 (MST)
> From: Ben Foster <address@hidden>
> To: address@hidden
> Subject: Re: 991222: netcdf on O2K vs Cray j90
> Organization: HAO
> Keywords: 199912222016.NAA02244
Hi Ben,
> Another question. If I should direct these (I suspect
> minor) questions elsewhere, please let me know.
If you send them to "address@hidden", they'll be directed to
someone who can handle them, even if I happen to be away from my email
or on vacation.
> I need to write 8-byte reals to netcdf output files
> from both SGI and Cray machines. On the Cray j90 ouray
> I call nf_def_var(..NF_FLOAT..) and nf_put_var_real(..),
> and everything is fine. Ncdump shows good numbers using
> same file on both machines.
Presumably your 8-byte reals are only stored externally in the netCDF
file as 4-byte reals though, since you defined the external type of
the variable to be NF_FLOAT.
> On the SGI (say o2k utefe), I compile with -r8 for 8-byte
> reals, and use the same nf_def_var and nf_put_var_real
> calls. But when I run ncdump from either platform on the
> file written from the SGI, the reals are incorrect. The
> source code types are all "real".
>
> I would like to avoid calling nf_def_var and nf_put_var_xx
> with different types (e.g., NF_FLOAT on Cray, NF_DOUBLE on
> SGI). I am linking /usr/local/lib32/r4i4 on utefe (and
> -I/usr/local/include). Is this the wrong lib? Thanks,
I think the problem is in trying to link your code, compiled with the
-r8 option with a netCDF library compiled without the -r8 option. If
you rebuild the netcdf library with the -r8 option and link against
that, things should work fine. I believe this is not just a netCDF
problem. I suspect you will encounter similar problems whenever you try
to link an object file compiled with the -r8 option with a library
compiled without the -r8 option, and vice versa.
--Russ
_____________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu