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

[netCDF #QCX-463169]: possible bug in 4.3.3.1 with unlimited dimensions in NetCDF-4 format?



Ellen,

> Thank you so much!
> So is this considered a patch, and there won't be a special release for this 
> bug fix?  Meaning the fix is still in 4.3.3.1?

It is committed to the master branch on GitHub, which means it is now 
the default "developer snapshot" and will be in the next release,
whenever that is. There's enough effort that goes into a new release
that we batch up enhancements and bug fixes, rather than creating a new 
release for every commit (of which there have been over 2,500).

But you can consider the current GitHub snapshot reliable and usable,
as we require updates to the master branch to pass all the tests in
"make check" on about 30 platforms. If you need to use it in MATLAB,
you could call it version "4.3.3.1+" indicating it derives from that
official release, or you could just use the first few characters of
the GitHub SHA1 hash.

If you want to get your bug fixes into a release soon after they're,
fixed, try to run your tests on the "release candidate" versions, such
as 4.3.3-rc3, as anything we fix in the release candidate will appear
in the actual release. We announce new release candidates on the
address@hidden mailing list.

--Russ

> I will let you know if I encounter more problems.
> Thank you again!
> ellen
> 
> 
> -----Original Message-----
> From: Unidata netCDF Support [mailto:address@hidden
> Sent: Tuesday, March 10, 2015 8:34 AM
> To: Ellen Johnson
> Cc: address@hidden
> Subject: [netCDF #QCX-463169]: possible bug in 4.3.3.1 with unlimited 
> dimensions in NetCDF-4 format?
> 
> Hi Ellen,
> 
> I just committed a fix for this problem on GitHub, so you could get the 
> latest sources there and build from them. Here's the diffs:
> 
> https://github.com/Unidata/netcdf-c/commit/67ad8d89a83d13a63a214157b94c2caae9edb7f4
> 
> and you'll see your fine test case added to the nc_test directory.
> 
> If you build with autoconf tools, you'll need to generate the configure 
> script from the GitHub snapshot by running "autoconf -if" first.
> 
> It turns out that we don't have very good test coverage for writing and 
> reading record variables that have the unlimited dimension in a position 
> other than the first, so you may encounter other similar bugs with mapped 
> access or even strided reads. If so, please let us know!
> 
> Thanks for reporting the bug!
> 
> --Russ
> 
> > address@hidden> wrote:
> >
> > > New Client Reply: possible bug in 4.3.3.1 with unlimited dimensions
> > > in
> > > NetCDF-4 format?
> > >
> > > Hi Ward,
> > >   Thank you for letting me know the status.  I'm trying to figure
> > > out a workaround, as I'm really hoping to upgrade to your latest
> > > NetCDF version (the version we currently have is 4.1.3).
> > >   If you know of a workaround, or if you think a patch might be
> > > issued, please let me know.
> > >   Thank you!
> > >      ellen
> > >
> > > -----Original Message-----
> > > From: Unidata netCDF Support
> > > [mailto:address@hidden
> > > Sent: Thursday, March 05, 2015 1:26 PM
> > > To: Ellen Johnson
> > > Cc: address@hidden
> > > Subject: [netCDF #QCX-463169]: possible bug in 4.3.3.1 with
> > > unlimited dimensions in NetCDF-4 format?
> > >
> > > Hello Ellen,
> > >
> > > Thank you very much for the test program! I've duplicated your
> > > error, and am currently working on narrowing down when the bug was
> > > introduced.  I've created a ticket in our JIRA system, which can be
> > > viewed at https://bugtracking.unidata.ucar.edu/browse/NCF-326, if
> > > you are interested.
> > >
> > > I will follow up with you once we know more, thanks again!
> > >
> > > -Ward
> > >
> > >
> > > > Hello,
> > > >
> > > > I just upgraded from NetCDF 4.1.3 to NetCDF 4.3.3.1 and am seeing
> > > > a problem in our regression test when writing unlimited dimensions
> > > > to a
> > > > NetCDF-4 format file.  Specifically, if the unlimited dimension is
> > > > last instead of the first in the dimension list, or if I declare
> > > > more than one unlimited dimension, the program errors with the NC_EEDGE 
> > > > error:
> > > >
> > > > Error: NetCDF: Start+count exceeds dimension bound
> > > >
> > > > This does not occur in our current NetCDF version 4.1.3.
> > > >
> > > > To isolate the issue, I built NetCDF 4.3.3.1 outside of our build
> > > > infrastructure and wrote a standalone C program to write to a
> > > > NetCDF-4 file, so I am bypassing MATLAB completely.
> > > >
> > > > Can you please help me determine if this is a bug in the NetCDF
> > > > code, specifically in dvarput.c?
> > > >
> > > > Below is the standalone C program that will throw the error above
> > > > when
> > > >
> > > > Thank you!
> > > >
> > > > Ellen Johnson
> > > > Software Engineer
> > > > Image and Scientific File Formats
> > > > MathWorks
> > > >
> > > >
> > > >
> > > > #include <stdio.h>
> > > > #include <string.h>
> > > > #include <netcdf.h>
> > > >
> > > > #define FILE_NAME "unlim.nc"
> > > >
> > > > /* 3D matrix, 6 x 4 x 3 */
> > > >
> > > > #define NDIMS 3
> > > > #define X_LEN 6
> > > > #define Y_LEN 4
> > > > #define Z_LEN 3
> > > >
> > > > /* Handle errors by printing an error message */
> > > >
> > > > #define ERR(e) {printf("Error: %s\n", nc_strerror(e)); return 2;}
> > > >
> > > > int
> > > > main()
> > > >
> > > > {
> > > > size_t start[NDIMS] = {0, 0, 0};
> > > > size_t count[NDIMS] = {X_LEN, Y_LEN, Z_LEN}; ptrdiff_t
> > > > stride[NDIMS] = {1, 1, 1}; float mydata[X_LEN * Y_LEN * Z_LEN];
> > > > int i; int retval;
> > > >
> > > > int ncid, varid;
> > > > int dimids[NDIMS];
> > > >
> > > > for (i = 0; i < (X_LEN * Y_LEN * Z_LEN); i++) mydata[i] = i;
> > > >
> > > >
> > > > /* create the file in NetCDF-4 format */ if ((retval =
> > > > nc_create(FILE_NAME, NC_NETCDF4, &ncid))) ERR(retval);
> > > >
> > > >
> > > > /* define dimensions */
> > > > if ((retval = nc_def_dim(ncid, "time", X_LEN, &dimids[0])))
> > > > ERR(retval);
> > > >
> > > > if ((retval = nc_def_dim(ncid, "lat", Y_LEN, &dimids[1])))
> > > > ERR(retval);
> > > >
> > > > if ((retval = nc_def_dim(ncid, "lon", NC_UNLIMITED, &dimids[2])))
> > > > ERR(retval);
> > > >
> > > > /* define the variable */
> > > > if ((retval = nc_def_var(ncid, "data", NC_FLOAT, NDIMS, dimids,
> > > > &varid))) ERR(retval);
> > > >
> > > >
> > > > /* end define mode */
> > > > if ((retval = nc_enddef(ncid)))
> > > > ERR(retval);
> > > >
> > > >
> > > > /* write data */
> > > > if ((retval = nc_put_vars_float(ncid, varid, start, count, stride,
> > > > mydata)))
> > > > ERR(retval);
> > > >
> > > >
> > > > /* close the file */
> > > > if ((retval = nc_close(ncid)))
> > > > ERR(retval);
> > > >
> > > > printf("\n\n*** SUCCESS writing example file %s!\n", FILE_NAME);
> > > >
> > > > return 0;
> > > >
> > > > }
> > > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: QCX-463169
> > > Department: Support netCDF
> > > Priority: Normal
> > > Status: Closed
> > >
> > >
> > >
> > > Ticket Details
> > > ===================
> > > Ticket ID: QCX-463169
> > > Department: Support netCDF
> > > Priority: Normal
> > > Status: Open
> > > Link:
> > > https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=
> > > viewticket&ticketid=25271
> > >
> > >
> >
> >
> Russ Rew                                         UCAR Unidata Program
> address@hidden                      http://www.unidata.ucar.edu
> 
> 
> 
> Ticket Details
> ===================
> Ticket ID: QCX-463169
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: QCX-463169
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.