[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #HNO-635604]: 64bit BE problem in netcdf-4.1.1-rc1
- Subject: [netCDF #HNO-635604]: 64bit BE problem in netcdf-4.1.1-rc1
- Date: Wed, 03 Mar 2010 09:08:54 -0700
Hi Mathis,
> We stumbled across a problem with netcdf-4.1.1-rc1 on our 64bit BE machine
> (Power6). The symptom was that ncdump showed corrupted dimensions for
> perfectly normal netcdf4 files. ncdump linked with netcdf-4.0.1 was okay.
>
> In 4.1 you changed the type of len in struct NC_DIM_INFO from int to
> size_t. This creates problems with sscanf in read_scale() on our machine. I
> attached a patch to fix this.
Thanks very much for bringing this to our attention. This looks like something
we must fix in the current 4.1.1 release candidate, and may be reason for
additional cross-platform testing before the 4.1.1 release.
--Russ
> Cheers,
> Mathis
>
> --
> Mathis Rosenhauer
> German Climate Computing Center
>
>
> --- ../netcdf-4.1.1-rc1_orig/libsrc4/nc4file.c 2010-02-04
> 18:17:38.000000000 +0100
> +++ libsrc4/nc4file.c 2010-03-03 13:38:49.000000000 +0100
> @@ -539,7 +539,11 @@
> else
> {
> start_of_len = dimscale_name_att + strlen(DIM_WITHOUT_VARIABLE);
> +#if (SIZEOF_SIZE_T < 8)
> sscanf(start_of_len, "%d", (int *)&grp->dim->len);
> +#else
> + sscanf(start_of_len, "%ld", (size_t *)&grp->dim->len);
> +#endif
> }
> (*dim_without_var)++;
> }
>
>
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: HNO-635604
Department: Support netCDF
Priority: Normal
Status: Closed