diff options
author | Quincey Koziol <koziol@lbl.gov> | 2018-04-30 14:45:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@lbl.gov> | 2018-04-30 14:45:32 (GMT) |
commit | 1f8cb03e11a46f853881f45dac18eff2dd68401e (patch) | |
tree | e066c7165f9e5a400de3688fb1b53193da6b230f /src/H5Dchunk.c | |
parent | 5983bded19d8a33266cbce5625b72540c5208921 (diff) | |
parent | 4411bc27ac8842795c73d7a469273a8d831bb835 (diff) | |
download | hdf5-1f8cb03e11a46f853881f45dac18eff2dd68401e.zip hdf5-1f8cb03e11a46f853881f45dac18eff2dd68401e.tar.gz hdf5-1f8cb03e11a46f853881f45dac18eff2dd68401e.tar.bz2 |
Merge pull request #1041 in HDFFV/hdf5 from merge_hyperslab_updates to develop
* commit '4411bc27ac8842795c73d7a469273a8d831bb835':
Further minor cleanups
Checkpoint normalization against incoming hyperslab / selection / dataspace improvements.
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index c62f201..7216c49 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1063,7 +1063,7 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf * additions involving the offset and the hyperslab selection -QAK) */ if((file_space_normalized = H5S_hyper_normalize_offset((H5S_t *)file_space, old_offset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to normalize selection") /* Decide the number of chunks in each dimension*/ for(u = 0; u < f_ndims; u++) { @@ -1298,10 +1298,10 @@ done: HDONE_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release selection iterator") if(file_type && (H5T_close_real(file_type) < 0)) HDONE_ERROR(H5E_DATATYPE, H5E_CANTFREE, FAIL, "Can't free temporary datatype") - if(file_space_normalized) { + if(file_space_normalized == TRUE) { /* (Casting away const OK -QAK) */ if(H5S_hyper_denormalize_offset((H5S_t *)file_space, old_offset) < 0) - HDONE_ERROR(H5E_DATASET, H5E_BADSELECT, FAIL, "unable to normalize dataspace by offset") + HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't denormalize selection") } /* end if */ FUNC_LEAVE_NOAPI(ret_value) @@ -1501,8 +1501,7 @@ H5D__create_chunk_map_single(H5D_chunk_map_t *fm, const H5D_io_info_t HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy file selection") /* Move selection back to have correct offset in chunk */ - if(H5S_SELECT_ADJUST_U(fm->single_space, coords) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + H5S_SELECT_ADJUST_U(fm->single_space, coords); #ifdef H5_HAVE_PARALLEL /* store chunk selection information */ @@ -1614,10 +1613,7 @@ H5D__create_chunk_file_map_hyper(H5D_chunk_map_t *fm, const H5D_io_info_t } /* end if */ /* Move selection back to have correct offset in chunk */ - if(H5S_SELECT_ADJUST_U(tmp_fchunk, coords) < 0) { - (void)H5S_close(tmp_fchunk); - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") - } /* end if */ + H5S_SELECT_ADJUST_U(tmp_fchunk, coords); /* Add temporary chunk to the list of chunks */ @@ -1816,8 +1812,8 @@ H5D__create_chunk_mem_map_hyper(const H5D_chunk_map_t *fm) } /* end for */ /* Adjust the selection */ - if(H5S_hyper_adjust_s(chunk_info->mspace,chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */ - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't adjust chunk selection") + if(H5S_hyper_adjust_s(chunk_info->mspace, chunk_adjust) < 0) /*lint !e772 The chunk_adjust array will always be initialized */ + HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "unable to adjust selection") /* Get the next chunk node in the skip list */ curr_node=H5SL_next(curr_node); |