diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-25 03:30:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-07-25 03:30:19 (GMT) |
commit | 21f8fa203a153bb9d3d26f73c9e56d22fd9671f2 (patch) | |
tree | 2076af8e57763501f48faaa361ba666b3444fdad | |
parent | acd5a4278a1e2323fede8289d9eaa567de545eac (diff) | |
download | hdf5-21f8fa203a153bb9d3d26f73c9e56d22fd9671f2.zip hdf5-21f8fa203a153bb9d3d26f73c9e56d22fd9671f2.tar.gz hdf5-21f8fa203a153bb9d3d26f73c9e56d22fd9671f2.tar.bz2 |
[svn-r17236] Description:
Add full support for any [single] dimension being unlimited when using
extensible arrays as a chunk index.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.7 (amazon) in debug mode
Mac OS X/32 10.5.7 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
-rw-r--r-- | src/H5Dchunk.c | 2 | ||||
-rw-r--r-- | src/H5Dearray.c | 186 | ||||
-rw-r--r-- | src/H5Olayout.c | 8 | ||||
-rw-r--r-- | src/H5Oprivate.h | 2 | ||||
-rw-r--r-- | src/H5V.c | 69 | ||||
-rw-r--r-- | src/H5Vprivate.h | 2 | ||||
-rw-r--r-- | test/Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.in | 2 | ||||
-rw-r--r-- | test/dsets.c | 340 | ||||
-rw-r--r-- | test/swmr_common.c | 4 | ||||
-rw-r--r-- | test/swmr_reader.c | 2 |
11 files changed, 432 insertions, 188 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 794d678..f0c720e 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -513,7 +513,7 @@ H5D_chunk_init(H5F_t *f, hid_t dxpl_id, const H5D_t *dset, hid_t dapl_id) if(dset->shared->layout.u.chunk.ops->init && (dset->shared->layout.u.chunk.ops->init)(&idx_info, dset->shared->space, dset->oloc.addr) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "can't initialize indexing information") - /* Set the number of chunks in dataset */ + /* Set the number of chunks in dataset, etc. */ if(H5D_chunk_set_info(dset) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to set # of chunks for dataset") diff --git a/src/H5Dearray.c b/src/H5Dearray.c index f859c1c..76e0775 100644 --- a/src/H5Dearray.c +++ b/src/H5Dearray.c @@ -122,6 +122,7 @@ static herr_t H5D_earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); static herr_t H5D_earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata); +static herr_t H5D_earray_idx_resize(H5O_layout_t *layout); static int H5D_earray_idx_iterate(const H5D_chk_idx_info_t *idx_info, H5D_chunk_cb_func_t chunk_cb, void *chunk_udata); static herr_t H5D_earray_idx_remove(const H5D_chk_idx_info_t *idx_info, @@ -155,7 +156,7 @@ const H5D_chunk_ops_t H5D_COPS_EARRAY[1] = {{ H5D_earray_idx_is_space_alloc, H5D_earray_idx_insert, H5D_earray_idx_get_addr, - NULL, + H5D_earray_idx_resize, H5D_earray_idx_iterate, H5D_earray_idx_remove, H5D_earray_idx_delete, @@ -780,7 +781,14 @@ static herr_t H5D_earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, haddr_t dset_ohdr_addr) { - FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_earray_idx_init) + hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Max. size of dataset dimensions */ + int unlim_dim; /* Rank of the dataset's unlimited dimension */ + int sndims; /* Rank of dataspace */ + unsigned ndims; /* Rank of dataspace */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_init) /* Check args */ HDassert(idx_info); @@ -790,10 +798,37 @@ H5D_earray_idx_init(const H5D_chk_idx_info_t *idx_info, const H5S_t *space, HDassert(space); HDassert(H5F_addr_defined(dset_ohdr_addr)); + /* Get the dim info for dataset */ + if((sndims = H5S_get_simple_extent_dims(space, NULL, max_dims)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataspace dimensions") + H5_ASSIGN_OVERFLOW(ndims, sndims, int, unsigned); + + /* Find the rank of the unlimited dimension */ + unlim_dim = (-1); + for(u = 0; u < ndims; u++) { + /* Check for unlimited dimension */ + if(H5S_UNLIMITED == max_dims[u]) { + /* Check if we've already found an unlimited dimension */ + if(unlim_dim >= 0) + HGOTO_ERROR(H5E_DATASET, H5E_ALREADYINIT, FAIL, "already found unlimited dimension") + + /* Set the unlimited dimension */ + unlim_dim = (int)u; + } /* end if */ + } /* end for */ + + /* Check if we didn't find an unlimited dimension */ + if(unlim_dim < 0) + HGOTO_ERROR(H5E_DATASET, H5E_UNINITIALIZED, FAIL, "didn't find unlimited dimension") + + /* Set the unlimited dimension for the layout's future use */ + idx_info->layout->u.chunk.u.earray.unlim_dim = (unsigned)unlim_dim; + /* Store the dataset's object header address for later */ idx_info->layout->u.chunk.u.earray.dset_ohdr_addr = dset_ohdr_addr; - FUNC_LEAVE_NOAPI(SUCCEED) +done: + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D_earray_idx_init() */ @@ -947,9 +982,24 @@ H5D_earray_idx_insert(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udata) /* Set convenience pointer to extensible array structure */ ea = idx_info->layout->u.chunk.u.earray.ea; - /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->common.offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + /* Check for unlimited dim. not being the slowest-changing dim. */ + if(idx_info->layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */ + unsigned ndims = (idx_info->layout->u.chunk.ndims - 1); /* Number of dimensions */ + + /* Set up the swizzled chunk coordinates */ + HDmemcpy(swizzled_coords, udata->common.offset, ndims * sizeof(udata->common.offset[0])); + H5V_swizzle_coords(swizzled_coords, idx_info->layout->u.chunk.u.earray.unlim_dim); + + /* Calculate the index of this chunk */ + if(H5V_chunk_index(ndims, swizzled_coords, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.u.earray.swizzled_down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end if */ + else { + /* Calculate the index of this chunk */ + if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->common.offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end else */ /* Check for filters on chunks */ if(idx_info->pline->nused > 0) { @@ -1092,9 +1142,24 @@ H5D_earray_idx_get_addr(const H5D_chk_idx_info_t *idx_info, H5D_chunk_ud_t *udat /* Set convenience pointer to extensible array structure */ ea = idx_info->layout->u.chunk.u.earray.ea; - /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->common.offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + /* Check for unlimited dim. not being the slowest-changing dim. */ + if(idx_info->layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */ + unsigned ndims = (idx_info->layout->u.chunk.ndims - 1); /* Number of dimensions */ + + /* Set up the swizzled chunk coordinates */ + HDmemcpy(swizzled_coords, udata->common.offset, ndims * sizeof(udata->common.offset[0])); + H5V_swizzle_coords(swizzled_coords, idx_info->layout->u.chunk.u.earray.unlim_dim); + + /* Calculate the index of this chunk */ + if(H5V_chunk_index(ndims, swizzled_coords, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.u.earray.swizzled_down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end if */ + else { + /* Calculate the index of this chunk */ + if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->common.offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end else */ /* Check for filters on chunks */ if(idx_info->pline->nused > 0) { @@ -1125,6 +1190,46 @@ done: /*------------------------------------------------------------------------- + * Function: H5D_earray_idx_resize + * + * Purpose: Calculate/setup the swizzled down chunk array, used for chunk + * index calculations. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Thursday, July 23, 2009 + * + *------------------------------------------------------------------------- + */ +static herr_t +H5D_earray_idx_resize(H5O_layout_t *layout) +{ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT(H5D_earray_idx_resize) + + /* Check args */ + HDassert(layout); + + /* Set up the swizzled "down" chunk information */ + if(layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_chunks[H5O_LAYOUT_NDIMS]; /* Swizzled form of # of chunks in each dimension */ + + HDmemcpy(swizzled_chunks, layout->u.chunk.chunks, (layout->u.chunk.ndims - 1) * sizeof(swizzled_chunks[0])); + H5V_swizzle_coords(swizzled_chunks, layout->u.chunk.u.earray.unlim_dim); + + /* Get the swizzled "down" sizes for each dimension */ + if(H5V_array_down((layout->u.chunk.ndims - 1), swizzled_chunks, layout->u.chunk.u.earray.swizzled_down_chunks) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't compute swizzled 'down' chunk size value") + } /* end if */ + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5D_earray_idx_resize() */ + + +/*------------------------------------------------------------------------- * Function: H5D_earray_idx_iterate * * Purpose: Iterate over the chunks in an index, making a callback @@ -1276,9 +1381,24 @@ H5D_earray_idx_remove(const H5D_chk_idx_info_t *idx_info, H5D_chunk_common_ud_t /* Set convenience pointer to extensible array structure */ ea = idx_info->layout->u.chunk.u.earray.ea; - /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + /* Check for unlimited dim. not being the slowest-changing dim. */ + if(idx_info->layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */ + unsigned ndims = (idx_info->layout->u.chunk.ndims - 1); /* Number of dimensions */ + + /* Set up the swizzled chunk coordinates */ + HDmemcpy(swizzled_coords, udata->offset, ndims * sizeof(udata->offset[0])); + H5V_swizzle_coords(swizzled_coords, idx_info->layout->u.chunk.u.earray.unlim_dim); + + /* Calculate the index of this chunk */ + if(H5V_chunk_index(ndims, swizzled_coords, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.u.earray.swizzled_down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end if */ + else { + /* Calculate the index of this chunk */ + if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end else */ /* Check for filters on chunks */ if(idx_info->pline->nused > 0) { @@ -1640,9 +1760,24 @@ H5D_earray_idx_support(const H5D_chk_idx_info_t *idx_info, /* Set convenience pointer to extensible array structure */ ea = idx_info->layout->u.chunk.u.earray.ea; - /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + /* Check for unlimited dim. not being the slowest-changing dim. */ + if(idx_info->layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */ + unsigned ndims = (idx_info->layout->u.chunk.ndims - 1); /* Number of dimensions */ + + /* Set up the swizzled chunk coordinates */ + HDmemcpy(swizzled_coords, udata->offset, ndims * sizeof(udata->offset[0])); + H5V_swizzle_coords(swizzled_coords, idx_info->layout->u.chunk.u.earray.unlim_dim); + + /* Calculate the index of this chunk */ + if(H5V_chunk_index(ndims, swizzled_coords, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.u.earray.swizzled_down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end if */ + else { + /* Calculate the index of this chunk */ + if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end else */ /* Create flush dependency between the child_entry and the piece of metadata * in the extensible array that contains the entry for this chunk. @@ -1693,9 +1828,24 @@ H5D_earray_idx_unsupport(const H5D_chk_idx_info_t *idx_info, /* Set convenience pointer to extensible array structure */ ea = idx_info->layout->u.chunk.u.earray.ea; - /* Calculate the index of this chunk */ - if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + /* Check for unlimited dim. not being the slowest-changing dim. */ + if(idx_info->layout->u.chunk.u.earray.unlim_dim > 0) { + hsize_t swizzled_coords[H5O_LAYOUT_NDIMS]; /* swizzled chunk coordinates */ + unsigned ndims = (idx_info->layout->u.chunk.ndims - 1); /* Number of dimensions */ + + /* Set up the swizzled chunk coordinates */ + HDmemcpy(swizzled_coords, udata->offset, ndims * sizeof(udata->offset[0])); + H5V_swizzle_coords(swizzled_coords, idx_info->layout->u.chunk.u.earray.unlim_dim); + + /* Calculate the index of this chunk */ + if(H5V_chunk_index(ndims, swizzled_coords, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.u.earray.swizzled_down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end if */ + else { + /* Calculate the index of this chunk */ + if(H5V_chunk_index((idx_info->layout->u.chunk.ndims - 1), udata->offset, idx_info->layout->u.chunk.dim, idx_info->layout->u.chunk.down_chunks, &idx) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "can't get chunk index") + } /* end else */ /* Remove flush dependency between the child_entry and the piece of metadata * in the extensible array that contains the entry for this chunk. diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 1c7f3f7..96cb9b9 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -1027,12 +1027,8 @@ H5O_layout_set_latest_version(H5O_layout_t *layout, const H5S_t *space) /* If we have only 1 unlimited dimension, we can use extensible array index */ if(1 == unlim_count) { - /* Check for slowest changing dimension being unlimited */ - /* (non-slowest-changing dim. not supported yet) */ - if(max_dims[0] == H5S_UNLIMITED) { - /* Set the chunk index type */ - layout->u.chunk.idx_type = H5D_CHUNK_IDX_EARRAY; - } /* end if */ + /* Set the chunk index type */ + layout->u.chunk.idx_type = H5D_CHUNK_IDX_EARRAY; } /* end if */ /* Chunked datasets with fixed dimensions */ else if(layout->type == H5D_CHUNKED && fixed) { diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index c2b7cca..408a490 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -368,6 +368,8 @@ struct H5EA_t; /* Defined in H5EAprivate.h */ typedef struct H5O_layout_chunk_earray_t { haddr_t addr; /* File address of extensible array */ haddr_t dset_ohdr_addr; /* File address dataset's object header */ + unsigned unlim_dim; /* Rank of unlimited dimension for dataset */ + hsize_t swizzled_down_chunks[H5O_LAYOUT_NDIMS]; /* swizzled "down" size of number of chunks in each dimension */ struct H5EA_t *ea; /* Pointer to extensible array struct */ } H5O_layout_chunk_earray_t; @@ -1287,6 +1287,75 @@ H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, /*------------------------------------------------------------------------- + * Function: H5V_swizzle_coords + * + * Purpose: Given a coordinate offset array (COORDS), move the unlimited + * dimension (UNLIM_DIM) value to offset 0, sliding any + * intermediate values down one position. + * + * Return: None + * + * Programmer: Quincey Koziol + * Tuesday, July 21, 2009 + * + *------------------------------------------------------------------------- + */ +void +H5V_swizzle_coords(hsize_t *coords, unsigned unlim_dim) +{ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_swizzle_coords) + + /* Sanity check */ + HDassert(coords); + + /* Nothing to do when unlimited dimension is at position 0 */ + if(0 != unlim_dim) { + hsize_t tmp = coords[unlim_dim]; + + HDmemmove(&coords[1], &coords[0], sizeof(coords[0]) * unlim_dim); + coords[0] = tmp; + } /* end if */ + + FUNC_LEAVE_NOAPI_VOID +} /* end H5V_swizzle_coords() */ + + +/*------------------------------------------------------------------------- + * Function: H5V_unswizzle_coords + * + * Purpose: Given a coordinate offset array (COORDS), move the value at + * offset 0 to offset of the unlimied dimension (UNLIM_DIM), + * sliding any intermediate values up one position. Undoes the + * "swizzle_coords" operation. + * + * Return: None + * + * Programmer: Quincey Koziol + * Tuesday, July 21, 2009 + * + *------------------------------------------------------------------------- + */ +void +H5V_unswizzle_coords(hsize_t *coords, unsigned unlim_dim) +{ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_unswizzle_coords) + + /* Sanity check */ + HDassert(coords); + + /* Nothing to do when unlimited dimension is at position 0 */ + if(0 != unlim_dim) { + hsize_t tmp = coords[0]; + + HDmemmove(&coords[0], &coords[1], sizeof(coords[0]) * unlim_dim); + coords[unlim_dim] = tmp; + } /* end if */ + + FUNC_LEAVE_NOAPI_VOID +} /* end H5V_unswizzle_coords() */ + + +/*------------------------------------------------------------------------- * Function: H5V_memcpyvv * * Purpose: Given source and destination buffers in memory (SRC & DST) diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index e351f86..faa2505 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -89,6 +89,8 @@ H5_DLL herr_t H5V_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hsize_t *coords); H5_DLL herr_t H5V_chunk_index(unsigned ndims, const hsize_t *coord, const uint32_t *chunk, const hsize_t *down_nchunks, hsize_t *chunk_idx); +H5_DLL void H5V_swizzle_coords(hsize_t *coords, unsigned unlim_dim); +H5_DLL void H5V_unswizzle_coords(hsize_t *coords, unsigned unlim_dim); H5_DLL ssize_t H5V_memcpyvv(void *_dst, size_t dst_max_nseq, size_t *dst_curr_seq, size_t dst_len_arr[], hsize_t dst_off_arr[], const void *_src, diff --git a/test/Makefile.am b/test/Makefile.am index ec6df85..81c7362 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -124,7 +124,8 @@ CHECK_CLEANFILES+=cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offset.h5 \ new_move_[ab].h5 ntypes.h5 dangle.h5 error_test.h5 err_compat.h5 \ dtransform.h5 test_filters.h5 get_file_name.h5 tstint[1-2].h5 \ unlink_chunked.h5 btree2.h5 objcopy_src.h5 objcopy_dst.h5 \ - objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 earray.h5 + objcopy_ext.dat trefer1.h5 trefer2.h5 app_ref.h5 earray.h5 \ + swmr_data.h5 # Sources for testhdf5 executable testhdf5_SOURCES=testhdf5.c tarray.c tattr.c tchecksum.c tconfig.c tfile.c \ diff --git a/test/Makefile.in b/test/Makefile.in index 130cd44..3d1468d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -668,7 +668,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog cmpd_dset.h5 \ err_compat.h5 dtransform.h5 test_filters.h5 get_file_name.h5 \ tstint[1-2].h5 unlink_chunked.h5 btree2.h5 objcopy_src.h5 \ objcopy_dst.h5 objcopy_ext.dat trefer1.h5 trefer2.h5 \ - app_ref.h5 earray.h5 + app_ref.h5 earray.h5 swmr_data.h5 INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src # Test script for error_test and err_compat diff --git a/test/dsets.c b/test/dsets.c index 454d4a2..c45b2c1 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -197,10 +197,10 @@ const char *FILENAME[] = { /* Parameters for testing extensible array chunk indices */ #define EARRAY_MAX_RANK 3 -#define EARRAY_DSET_DIM 30 +#define EARRAY_DSET_DIM 15 #define EARRAY_CHUNK_DIM 3 -#define EARRAY_EXTEND_INCR 30 -#define EARRAY_MAX_EXTEND 150 +#define EARRAY_EXTEND_INCR 15 +#define EARRAY_MAX_EXTEND 75 /* Shared global arrays */ #define DSET_DIM1 100 @@ -6944,6 +6944,9 @@ test_chunk_fast(hid_t fapl) hid_t sid = -1; /* Dataspace ID */ hid_t scalar_sid = -1;/* Scalar dataspace ID */ hid_t dsid = -1; /* Dataset ID */ + hsize_t fill; /* Temporary value, for filling arrays */ + hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */ + hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */ H5F_libver_t low; /* File format low bound */ hbool_t swmr; /* Whether file should be written with SWMR access enabled */ @@ -6972,6 +6975,14 @@ test_chunk_fast(hid_t fapl) /* Create scalar dataspace */ if((scalar_sid = H5Screate(H5S_SCALAR)) < 0) FAIL_STACK_ERROR + /* Initialize chunk dimensions */ + fill = EARRAY_CHUNK_DIM; + H5V_array_fill(chunk_dim, &fill, sizeof(fill), EARRAY_MAX_RANK); + + /* Initialize hyperslab size */ + fill = 1; + H5V_array_fill(hs_size, &fill, sizeof(fill), EARRAY_MAX_RANK); + /* Loop over using SWMR access to write */ for(swmr = FALSE; swmr <= TRUE; swmr++) { #ifdef H5_HAVE_FILTER_DEFLATE @@ -6988,27 +6999,12 @@ test_chunk_fast(hid_t fapl) /* Loop over dataspace ranks to test */ for(ndims = 1; ndims < (EARRAY_MAX_RANK + 1); ndims++) { - H5D_chunk_index_t idx_type; /* Dataset chunk index type */ - hsize_t fill; /* Temporary value, for filling arrays */ - hsize_t chunk_dim[EARRAY_MAX_RANK]; /* Chunk dimensions */ - hsize_t dim[EARRAY_MAX_RANK], max_dim[EARRAY_MAX_RANK]; /* Dataset dimensions */ - hsize_t down[EARRAY_MAX_RANK]; /* 'down' sizes, for computing array index */ - hsize_t hs_offset[EARRAY_MAX_RANK]; /* Hyperslab offset */ - hsize_t hs_size[EARRAY_MAX_RANK]; /* Hyperslab size */ - hssize_t snpoints; /* # of points in dataspace extent (signed) */ - hsize_t npoints; /* # of points in dataspace extent */ - unsigned write_elem, read_elem; /* Element written/read */ - hsize_t u; /* Local index variable */ - - /* Create file */ - if((fid = H5Fcreate(filename, H5F_ACC_TRUNC | (swmr ? H5F_ACC_SWMR_WRITE : 0), H5P_DEFAULT, my_fapl)) < 0) FAIL_STACK_ERROR + unsigned unlim_dim; /* Create dataset creation property list */ if((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR /* Set chunking & chunk dims */ - fill = EARRAY_CHUNK_DIM; - H5V_array_fill(chunk_dim, &fill, sizeof(fill), EARRAY_MAX_RANK); if(H5Pset_chunk(dcpl, (int)ndims, chunk_dim) < 0) FAIL_STACK_ERROR #ifdef H5_HAVE_FILTER_DEFLATE @@ -7023,90 +7019,62 @@ test_chunk_fast(hid_t fapl) /* Set allocation time */ if(H5Pset_alloc_time(dcpl, alloc_time) < 0) FAIL_STACK_ERROR - /* Create n-D dataspace */ - fill = EARRAY_DSET_DIM; - H5V_array_fill(dim, &fill, sizeof(fill), EARRAY_MAX_RANK); - fill = EARRAY_DSET_DIM; - H5V_array_fill(max_dim, &fill, sizeof(fill), EARRAY_MAX_RANK); - max_dim[0] = H5S_UNLIMITED; - if((sid = H5Screate_simple((int)ndims, dim, max_dim)) < 0) FAIL_STACK_ERROR - - /* Get the number of points in the dataspace */ - if((snpoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR - npoints = (hsize_t)snpoints; - - /* Compute the "down" dimension values */ - if(H5V_array_down(ndims, dim, down) < 0) FAIL_STACK_ERROR - - /* Create chunked dataset */ - if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) - FAIL_STACK_ERROR - - /* Get the chunk index type */ - if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR - - /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); - } /* end if */ - else { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ - - /* Fill existing elements */ - fill = 1; - H5V_array_fill(hs_size, &fill, sizeof(fill), EARRAY_MAX_RANK); - for(u = 0; u < npoints; u++) { - /* Compute the coordinate from the linear offset */ - if(H5V_array_calc_pre(u, ndims, dim, down, hs_offset) < 0) FAIL_STACK_ERROR - - /* Select a single element in the dataset */ - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR - - /* Read (unwritten) element from dataset */ - read_elem = 1; - if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR - - /* Verify unwritten element is fill value (0) */ - if(read_elem != 0) FAIL_PUTS_ERROR("invalid unwritten element read"); - - /* Write element to dataset */ - write_elem = (unsigned)u; - if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0) FAIL_STACK_ERROR - - /* Read element from dataset */ - read_elem = write_elem + 1; - if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR - - /* Verify written element is read in */ - if(read_elem != write_elem) FAIL_PUTS_ERROR("invalid written element read"); - } /* end for */ - - /* Incrementally extend dataset and verify write/reads */ - while(dim[0] < EARRAY_MAX_EXTEND) { - hssize_t snew_npoints; /* # of points in dataspace extent (signed) */ - hsize_t new_npoints; /* # of points in dataspace extent */ - - /* Extend dataset */ - dim[0] += EARRAY_EXTEND_INCR; - if(H5Dset_extent(dsid, dim) < 0) FAIL_STACK_ERROR - - /* Close old dataspace */ - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - - /* Get dataspace for dataset now */ - if((sid = H5Dget_space(dsid)) < 0) FAIL_STACK_ERROR - - /* Get the new number of points in the dataspace */ - if((snew_npoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR - new_npoints = (hsize_t)snew_npoints; - - /* Fill new elements */ - for(u = npoints; u < new_npoints; u++) { + /* Loop over which dimension is unlimited */ + for(unlim_dim = 0; unlim_dim < ndims; unlim_dim++) { + H5D_chunk_index_t idx_type; /* Dataset chunk index type */ + hsize_t dim[EARRAY_MAX_RANK], max_dim[EARRAY_MAX_RANK]; /* Dataset dimensions */ + hsize_t swizzled_dim[EARRAY_MAX_RANK]; /* Dimensions, with unlimited dimension moved to rank 0 */ + hsize_t down[EARRAY_MAX_RANK]; /* 'down' sizes, for computing array index */ + hsize_t hs_offset[EARRAY_MAX_RANK]; /* Hyperslab offset */ + hssize_t snpoints; /* # of points in dataspace extent (signed) */ + hsize_t npoints; /* # of points in dataspace extent */ + unsigned write_elem, read_elem; /* Element written/read */ + hsize_t u; /* Local index variable */ + + /* Create file */ + if((fid = H5Fcreate(filename, H5F_ACC_TRUNC | (swmr ? H5F_ACC_SWMR_WRITE : 0), H5P_DEFAULT, my_fapl)) < 0) FAIL_STACK_ERROR + + /* Create n-D dataspace */ + fill = EARRAY_DSET_DIM; + H5V_array_fill(dim, &fill, sizeof(fill), EARRAY_MAX_RANK); + fill = EARRAY_DSET_DIM; + H5V_array_fill(max_dim, &fill, sizeof(fill), EARRAY_MAX_RANK); + max_dim[unlim_dim] = H5S_UNLIMITED; + fill = EARRAY_DSET_DIM; + H5V_array_fill(swizzled_dim, &fill, sizeof(fill), EARRAY_MAX_RANK); + if((sid = H5Screate_simple((int)ndims, dim, max_dim)) < 0) FAIL_STACK_ERROR + + /* Get the number of points in the dataspace */ + if((snpoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR + npoints = (hsize_t)snpoints; + + /* Compute the "down" dimension values */ + if(H5V_array_down(ndims, dim, down) < 0) FAIL_STACK_ERROR + + /* Create chunked dataset */ + if((dsid = H5Dcreate2(fid, "dset", H5T_NATIVE_UINT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + FAIL_STACK_ERROR + + /* Get the chunk index type */ + if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR + + /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); + } /* end if */ + else { + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ + + /* Fill existing elements */ + for(u = 0; u < npoints; u++) { /* Compute the coordinate from the linear offset */ - if(H5V_array_calc(u, ndims, dim, hs_offset) < 0) FAIL_STACK_ERROR + if(H5V_array_calc_pre(u, ndims, dim, down, hs_offset) < 0) FAIL_STACK_ERROR + + /* Un-swizzle hyperslab offset in same way as swizzled dimensions */ + H5V_unswizzle_coords(hs_offset, unlim_dim); /* Select a single element in the dataset */ if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR @@ -7130,83 +7098,139 @@ test_chunk_fast(hid_t fapl) if(read_elem != write_elem) FAIL_PUTS_ERROR("invalid written element read"); } /* end for */ - /* Update the number of points in the dataspace */ - npoints = new_npoints; - } /* end while */ + /* Incrementally extend dataset and verify write/reads */ + while(dim[unlim_dim] < EARRAY_MAX_EXTEND) { + hssize_t snew_npoints; /* # of points in dataspace extent (signed) */ + hsize_t new_npoints; /* # of points in dataspace extent */ - /* Close everything */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Extend dataset */ + dim[unlim_dim] += EARRAY_EXTEND_INCR; + swizzled_dim[0] += EARRAY_EXTEND_INCR; + if(H5Dset_extent(dsid, dim) < 0) FAIL_STACK_ERROR + /* Close old dataspace */ + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - /* Re-open file & dataset */ - if((fid = H5Fopen(filename, H5F_ACC_RDONLY | (swmr ? H5F_ACC_SWMR_READ : 0), my_fapl)) < 0) FAIL_STACK_ERROR + /* Get dataspace for dataset now */ + if((sid = H5Dget_space(dsid)) < 0) FAIL_STACK_ERROR - /* Open dataset */ - if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR + /* Get the new number of points in the dataspace */ + if((snew_npoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR + new_npoints = (hsize_t)snew_npoints; - /* Get the chunk index type */ - if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR + /* Fill new elements */ + for(u = npoints; u < new_npoints; u++) { + /* Compute the coordinate from the linear offset */ + if(H5V_array_calc(u, ndims, swizzled_dim, hs_offset) < 0) FAIL_STACK_ERROR - /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ - if(low == H5F_LIBVER_LATEST) { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); - } /* end if */ - else { - /* Verify index type */ - if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); - } /* end else */ + /* Un-swizzle hyperslab offset in same way as swizzled dimensions */ + H5V_unswizzle_coords(hs_offset, unlim_dim); - /* Get dataspace for dataset now */ - if((sid = H5Dget_space(dsid)) < 0) FAIL_STACK_ERROR + /* Select a single element in the dataset */ + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR - /* Get the number of points in the dataspace */ - if((snpoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR - npoints = (hsize_t)snpoints; + /* Read (unwritten) element from dataset */ + read_elem = 1; + if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR - /* Get the current dimensions */ - if(H5Sget_simple_extent_dims(sid, dim, NULL) < 0) FAIL_STACK_ERROR + /* Verify unwritten element is fill value (0) */ + if(read_elem != 0) FAIL_PUTS_ERROR("invalid unwritten element read"); - /* Compute the "down" dimension values */ - if(H5V_array_down(ndims, dim, down) < 0) FAIL_STACK_ERROR + /* Write element to dataset */ + write_elem = (unsigned)u; + if(H5Dwrite(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &write_elem) < 0) FAIL_STACK_ERROR - /* Read elements */ - for(u = 0; u < npoints; u++) { - /* Compute the coordinate from the linear offset */ - if(H5V_array_calc_pre(u, ndims, dim, down, hs_offset) < 0) FAIL_STACK_ERROR + /* Read element from dataset */ + read_elem = write_elem + 1; + if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR - /* Select a single element in the dataset */ - if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR + /* Verify written element is read in */ + if(read_elem != write_elem) FAIL_PUTS_ERROR("invalid written element read"); + } /* end for */ - /* Read written element from dataset */ - read_elem = (unsigned)(u + 1); - if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR + /* Update the number of points in the dataspace */ + npoints = new_npoints; + } /* end while */ - /* Verify written element is correct */ - if(read_elem != u) FAIL_PUTS_ERROR("invalid element read"); - } /* end for */ + /* Close everything */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR - /* Close everything */ - if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR - if(H5Sclose(sid) < 0) FAIL_STACK_ERROR - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Re-open file & dataset */ + if((fid = H5Fopen(filename, H5F_ACC_RDONLY | (swmr ? H5F_ACC_SWMR_READ : 0), my_fapl)) < 0) FAIL_STACK_ERROR - /* Re-open file */ - if((fid = H5Fopen(filename, H5F_ACC_RDWR, my_fapl)) < 0) FAIL_STACK_ERROR + /* Open dataset */ + if((dsid = H5Dopen2(fid, "dset", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR - /* Delete dataset */ - if(H5Ldelete(fid, "dset", H5P_DEFAULT) < 0) FAIL_STACK_ERROR + /* Get the chunk index type */ + if(H5D_layout_idx_type_test(dsid, &idx_type) < 0) FAIL_STACK_ERROR - /* Close everything */ - if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + /* Chunk index tyepe expected depends on whether we are using the latest version of the format */ + if(low == H5F_LIBVER_LATEST) { + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_EARRAY) FAIL_PUTS_ERROR("should be using extensible array as index"); + } /* end if */ + else { + /* Verify index type */ + if(idx_type != H5D_CHUNK_IDX_BTREE) FAIL_PUTS_ERROR("should be using v1 B-tree as index"); + } /* end else */ - } /* end for */ + /* Get dataspace for dataset now */ + if((sid = H5Dget_space(dsid)) < 0) FAIL_STACK_ERROR - /* Close everything */ - if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR + /* Get the number of points in the dataspace */ + if((snpoints = H5Sget_simple_extent_npoints(sid)) < 0) FAIL_STACK_ERROR + npoints = (hsize_t)snpoints; + + /* Get the current dimensions into swizzled_dim array */ + if(H5Sget_simple_extent_dims(sid, swizzled_dim, NULL) < 0) FAIL_STACK_ERROR + + /* Generate the swizzled dimensions */ + H5V_swizzle_coords(swizzled_dim, unlim_dim); + + /* Compute the "down" dimension values */ + if(H5V_array_down(ndims, swizzled_dim, down) < 0) FAIL_STACK_ERROR + + /* Read elements */ + for(u = 0; u < npoints; u++) { + /* Compute the coordinate from the linear offset */ + if(H5V_array_calc_pre(u, ndims, swizzled_dim, down, hs_offset) < 0) FAIL_STACK_ERROR + + /* Unswizzle hyperslab offset in same way as swizzled dimensions */ + H5V_unswizzle_coords(hs_offset, unlim_dim); + + /* Select a single element in the dataset */ + if(H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) FAIL_STACK_ERROR + + /* Read written element from dataset */ + read_elem = (unsigned)(u + 1); + if(H5Dread(dsid, H5T_NATIVE_UINT, scalar_sid, sid, H5P_DEFAULT, &read_elem) < 0) FAIL_STACK_ERROR + + /* Verify written element is correct */ + if(read_elem != u) FAIL_PUTS_ERROR("invalid element read"); + } /* end for */ + + /* Close everything */ + if(H5Dclose(dsid) < 0) FAIL_STACK_ERROR + if(H5Sclose(sid) < 0) FAIL_STACK_ERROR + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + + + /* Re-open file */ + if((fid = H5Fopen(filename, H5F_ACC_RDWR, my_fapl)) < 0) FAIL_STACK_ERROR + + /* Delete dataset */ + if(H5Ldelete(fid, "dset", H5P_DEFAULT) < 0) FAIL_STACK_ERROR + + /* Close everything */ + if(H5Fclose(fid) < 0) FAIL_STACK_ERROR + } /* end for */ + + /* Close everything */ + if(H5Pclose(dcpl) < 0) FAIL_STACK_ERROR + } /* end for */ } /* end for */ #ifdef H5_HAVE_FILTER_DEFLATE } /* end for */ diff --git a/test/swmr_common.c b/test/swmr_common.c index bb75c0d..41a24ac 100644 --- a/test/swmr_common.c +++ b/test/swmr_common.c @@ -61,12 +61,12 @@ generate_symbols(void) unsigned u, v; /* Local index variables */
for(u = 0; u < NLEVELS; u++) {
- symbol_info[u] = malloc(symbol_count[u] * sizeof(symbol_info_t));
+ symbol_info[u] = (symbol_info_t *)malloc(symbol_count[u] * sizeof(symbol_info_t));
for(v = 0; v < symbol_count[u]; v++) {
char name_buf[64];
generate_name(name_buf, u, v);
- symbol_info[u][v].name = malloc(strlen(name_buf) + 1);
+ symbol_info[u][v].name = (char *)malloc(strlen(name_buf) + 1);
strcpy(symbol_info[u][v].name, name_buf);
symbol_info[u][v].dsid = -1;
symbol_info[u][v].nrecords = 0;
diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 7045954..9c9cd1e 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -13,7 +13,7 @@ check_dataset(hid_t fid, unsigned verbose, const char *sym_name, symbol_t *recor hsize_t start, count = 1; /* Hyperslab selection values */
/* Open dataset for symbol */
- if((dsid = H5Dopen(fid, sym_name, H5P_DEFAULT)) < 0)
+ if((dsid = H5Dopen2(fid, sym_name, H5P_DEFAULT)) < 0)
return(-1);
/* Get the dataset's dataspace */
|