[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
960717: netcdf on SGI/PC: problem with ncattput()
- Subject: 960717: netcdf on SGI/PC: problem with ncattput()
- Date: Wed, 17 Jul 96 12:15:08 -0600
Christi,
>Date: Wed, 17 Jul 1996 11:30:20 -0600 (MDT)
>From: Christi Forsythe <address@hidden>
>Organization: Sandia National Laboratory
>To: address@hidden
>Subject: netcdf on SGI/PC
>Keywords: 199607171731.AA13487
In the above message you wrote:
> The floating_point_word_size should be 4. Also, the return value of
> ncattput is 2. Is this a warning?
No. The value returned from ncattput() is meaningful only if it's -1
(which indicates an error).
> Is there something wrong with the way we are using the netcdf interface?
Yup. See below.
> #include "netcdf.h"
>
> /* EXODUS II version number */
>
> /* ExodusII file version */
> #define EX_VERS 2.02
> /* ExodusII access library version */
> #define EX_API_VERS 2.05
> #define ATT_FLT_WORDSIZE "floating_point_word_size"
> #define ATT_API_VERSION "api_version"
> #define ATT_VERSION "version"
>
> main()
> {
> int comp_ws;
> int io_ws;
> int exoid;
> long lio_ws;
The above variable (lio_ws) should be type `nclong' and not `long'.
An `nclong' is a `long' on 32-bit systems and an `int' on most 64-bit
systems. Your program is writing out the high-order 32 bits of `lio_ws'
-- which are all zero.
Please let me know if this helps.
--------
Steve Emmerson <address@hidden>