Fill on data sets

While trying to figure out what was causing the problems I'd posted about
before, I noticed that certain data sets were not always getting filled
properly when there size was being increased (mostly the new entries were
filled, but some in the first column had 0 instead). Attempting to perform
the same operations in isolation didn't reproduce the problem (of course
;-), but changing the fill time and alloc time (see below) made it go away
consistently. Is this something that is supposed to happen, or a further
sign of something deep being confused? Thanks very much.

The data set creation code looks more or less like the following (with
error checking and closing stripped out--everything except the data set
itself is closed at the end of the function and all function returns are
checked).
      ds=H5Screate_simple(D, dims, maxs);
     plist=H5Pcreate(H5P_DATASET_CREATE);

H5Pset_chunk(plist, D, cdims);

H5Pset_fill_value(plist, HDF5_NATIVE_DOUBLE,

&value_equal_to_double_max);

- H5Pset_fill_time(plist, H5D_FILL_TIME_IFSET);

- H5Pset_alloc_time(plist, H5D_ALLOC_TIME_LATE);

+ H5Pset_fill_time(plist, H5D_FILL_TIME_ALLOC));

+ H5Pset_alloc_time(plist, H5D_ALLOC_TIME_INCR);
      hid=H5Dcreate2(parent->get_hid(),
                                                      name.c_str(),
                                         H5T_IEEE_F64LE,
                                         ds, H5P_DEFAULT, plist,
H5P_DEFAULT);

Version 1.84.

Hi Dan,

While trying to figure out what was causing the problems I'd posted about before, I noticed that certain data sets were not always getting filled properly when there size was being increased (mostly the new entries were filled, but some in the first column had 0 instead). Attempting to perform the same operations in isolation didn't reproduce the problem (of course ;-), but changing the fill time and alloc time (see below) made it go away consistently. Is this something that is supposed to happen, or a further sign of something deep being confused? Thanks very much.

  I'm not certain, could you send a simple program that demonstrates behavior that you find confusing? Have you read the documentation for the routines you are using below?

  Quincey

···

On May 16, 2012, at 5:56 PM, Daniel Russel wrote:

The data set creation code looks more or less like the following (with error checking and closing stripped out--everything except the data set itself is closed at the end of the function and all function returns are checked).
      ds=H5Screate_simple(D, dims, maxs);
     plist=H5Pcreate(H5P_DATASET_CREATE);

H5Pset_chunk(plist, D, cdims);
H5Pset_fill_value(plist, HDF5_NATIVE_DOUBLE,
&value_equal_to_double_max);
- H5Pset_fill_time(plist, H5D_FILL_TIME_IFSET);
- H5Pset_alloc_time(plist, H5D_ALLOC_TIME_LATE);
+ H5Pset_fill_time(plist, H5D_FILL_TIME_ALLOC));
+ H5Pset_alloc_time(plist, H5D_ALLOC_TIME_INCR);
      hid=H5Dcreate2(parent->get_hid(),
                                                      name.c_str(),
                                         H5T_IEEE_F64LE,
                                         ds, H5P_DEFAULT, plist, H5P_DEFAULT);

Version 1.84.
_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

I'm not certain, could you send a simple program that demonstrates

behavior that you find confusing?
See <http://pastebin.com/pE7znUQJ>. Depending on the first argument you
pass to the program you either get the fill value or 0 in the first column
(after the element 0,0 which is set).

Have you read the documentation for the routines you are using below?

Yes. As far as I could tell, they both should end up with a filled chunk
before it can be touched from user code and that the differences should
just be in terms of how lazy hdf5 is about allocating the space. But I
might be missing some interaction between things.

Thanks.