mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[svn-r27198] Set "entire_chunk" to false in H5D__chunk_write() for point selection as duplicate points are not checked to determine
that it is really an "entire chunk". The bug appears from running the mdset.c test. This is a short-term fix for the problem.
This commit is contained in:
parent
d92c74b4aa
commit
e29904660a
@ -722,7 +722,6 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
unsigned f_ndims; /* The number of dimensions of the file's dataspace */
|
||||
int sm_ndims; /* The number of dimensions of the memory buffer's dataspace (signed) */
|
||||
H5SL_node_t *curr_node; /* Current node in skip list */
|
||||
H5S_sel_type fsel_type; /* Selection type on disk */
|
||||
char bogus; /* "bogus" buffer to pass to selection iterator */
|
||||
unsigned u; /* Local index variable */
|
||||
herr_t ret_value = SUCCEED; /* Return value */
|
||||
@ -836,13 +835,13 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
|
||||
fm->use_single = FALSE;
|
||||
|
||||
/* Get type of selection on disk & in memory */
|
||||
if((fsel_type = H5S_GET_SELECT_TYPE(file_space)) < H5S_SEL_NONE)
|
||||
if((fm->fsel_type = H5S_GET_SELECT_TYPE(file_space)) < H5S_SEL_NONE)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection")
|
||||
if((fm->msel_type = H5S_GET_SELECT_TYPE(mem_space)) < H5S_SEL_NONE)
|
||||
HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to get type of selection")
|
||||
|
||||
/* If the selection is NONE or POINTS, set the flag to FALSE */
|
||||
if(fsel_type == H5S_SEL_POINTS || fsel_type == H5S_SEL_NONE)
|
||||
if(fm->fsel_type == H5S_SEL_POINTS || fm->fsel_type == H5S_SEL_NONE)
|
||||
sel_hyper_flag = FALSE;
|
||||
else
|
||||
sel_hyper_flag = TRUE;
|
||||
@ -2014,7 +2013,8 @@ H5D__chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info,
|
||||
|
||||
/* Determine if we will access all the data in the chunk */
|
||||
if(dst_accessed_bytes != ctg_store.contig.dset_size ||
|
||||
(chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size)
|
||||
(chunk_info->chunk_points * type_info->src_type_size) != ctg_store.contig.dset_size ||
|
||||
fm->fsel_type == H5S_SEL_POINTS)
|
||||
entire_chunk = FALSE;
|
||||
|
||||
/* Set chunk's [scaled] coordinates */
|
||||
|
@ -337,6 +337,7 @@ typedef struct H5D_chunk_map_t {
|
||||
H5S_sel_iter_t mem_iter; /* Iterator for elements in memory selection */
|
||||
unsigned m_ndims; /* Number of dimensions for memory dataspace */
|
||||
H5S_sel_type msel_type; /* Selection type in memory */
|
||||
H5S_sel_type fsel_type; /* Selection type in file */
|
||||
|
||||
H5SL_t *sel_chunks; /* Skip list containing information for each chunk selected */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user