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

[netCDF #LBV-326209]: bug with creating variable with an unlimited dimension.



Ben,

> I had sent a message to the netcdf-group about a crash we were seeing
> with versions of netcdf past 4.2.1
> 
> The original title of the message I sent was "unlimited dimension and
> chunking breaking in 4.3.1.1"
> 
> Russ suggested I send the output of an ncdump -sh command on a file we
> were able to create with 4.2.1 as that might be helpful.
> 
> In any case I am attaching such output.

Looking back at your 5 March netcdfgroup posting, I see you are getting a
crash in nc4var.c when trying to define some variable (it's not clear
which one).  From your ncdump output, ncgen has no problems creating a
netcdf file with 0 times, but all the other variables get defined OK.  I
just used the ncgen in the GitHub master of 4.3.2-rc2:

   $ ncgen -k4 -o tmp.nc bug.cdl

where bug.cdl is the ncdump -sh output you sent, and the resulting tmp.nc
looks like it matches the file you're trying to create, except it has no
data yet.

So my idea that we could reproduce the bug just by using ncgen didn't 
work.  Could you use a debugger such as gdb to print the values of the 
variables used in the statement

  suggested_size = (pow((double)DEFAULT_CHUNK_SIZE/(num_values * type_size), 
                        1/(double)(var->ndims - num_set)) * var->dim[d]->len - 
.5);

where you say the crash occurs?  For example, if the index "d" has a value
other than 0, 1, 2, or 3, that might give us a clue as to what is happening.

Thanks!

--Russ

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



Ticket Details
===================
Ticket ID: LBV-326209
Department: Support netCDF
Priority: Normal
Status: Closed