diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FF.c | 49 | ||||
-rw-r--r-- | src/H5VLiod.c | 23 | ||||
-rw-r--r-- | src/H5VLiod_server.c | 1 | ||||
-rw-r--r-- | src/H5VLnative.c | 1 |
4 files changed, 50 insertions, 24 deletions
@@ -2800,7 +2800,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Oclose_ff() */ -herr_t +herr_t H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, hid_t memtype, const void *buf) { @@ -2818,10 +2818,11 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) + H5TRACE6("e", "iiIuzi*x", dset_id, dxpl_id, axis, extension, memtype, buf); /* check arguments */ - if(!dset_id) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); + if(H5I_DATASET != H5I_get_type(dset_id)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); /* Get the default dataset transfer property list if the user didn't provide one */ if(H5P_DEFAULT == dxpl_id) @@ -2885,21 +2886,21 @@ H5DOappend(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extension, done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close new dataspace */ - if(new_space_id && H5Sclose(new_space_id) < 0) + if(new_space_id != FAIL && H5Sclose(new_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) }/* end H5DOappend */ -herr_t +herr_t H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, size_t sequence, hid_t memtype, void *buf) { @@ -2915,6 +2916,8 @@ H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) + H5TRACE7("e", "iiIuhzi*x", dset_id, dxpl_id, axis, start_off, sequence, memtype, + buf); /* check arguments */ if(!dset_id) @@ -2968,11 +2971,11 @@ H5DOsequence(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) @@ -3015,11 +3018,11 @@ herr_t H5DOset(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) @@ -3062,11 +3065,11 @@ herr_t H5DOget(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) @@ -3157,21 +3160,21 @@ herr_t H5DOappend_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, size_t extensi done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close new dataspace */ - if(new_space_id && H5Sclose(new_space_id) < 0) + if(new_space_id != FAIL && H5Sclose(new_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) }/* end H5DOappend_ff */ -herr_t +herr_t H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, size_t sequence, hid_t memtype, void *buf, uint64_t trans, hid_t eq_id) { @@ -3239,11 +3242,11 @@ H5DOsequence_ff(hid_t dset_id, hid_t dxpl_id, unsigned axis, hsize_t start_off, done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) @@ -3286,11 +3289,11 @@ herr_t H5DOset_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) @@ -3333,11 +3336,11 @@ herr_t H5DOget_ff(hid_t dset_id, hid_t dxpl_id, const hsize_t coord[], done: /* close old dataspace */ - if(space_id && H5Sclose(space_id) < 0) + if(space_id != FAIL && H5Sclose(space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") /* close memory dataspace */ - if(mem_space_id && H5Sclose(mem_space_id) < 0) + if(mem_space_id != FAIL && H5Sclose(mem_space_id) < 0) HDONE_ERROR(H5E_DATASPACE, H5E_CANTDEC, FAIL, "unable to close dataspace") FUNC_LEAVE_API(ret_value) diff --git a/src/H5VLiod.c b/src/H5VLiod.c index c3a001b..b35a100 100644 --- a/src/H5VLiod.c +++ b/src/H5VLiod.c @@ -645,6 +645,7 @@ H5Pset_dxpl_checksum_ptr(hid_t dxpl_id, uint32_t *cs) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE2("e", "i*Iu", dxpl_id, cs); if(dxpl_id == H5P_DEFAULT) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list") @@ -668,6 +669,7 @@ H5Pget_dxpl_checksum_ptr(hid_t dxpl_id, uint32_t **cs/*out*/) herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE2("e", "ix", dxpl_id, cs); if(NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl") @@ -2819,6 +2821,24 @@ H5VL_iod_dataset_set_extent(void *_dset, const hsize_t size[], hid_t dxpl_id, vo HDassert(request == &_request); } /* end else */ + /* modify the local dataspace of the dataset */ + { + int rank; /* Dataspace # of dimensions */ + H5S_t *space; /* Dataset's dataspace */ + hsize_t curr_dims[H5O_LAYOUT_NDIMS];/* Current dimension sizes */ + + if(NULL == (space = (H5S_t *)H5I_object_verify(dset->remote_dset.space_id, + H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data space"); + + /* Check if we are shrinking or expanding any of the dimensions */ + if((rank = H5S_get_simple_extent_dims(space, curr_dims, NULL)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset dimensions"); + + /* Modify the size of the data space */ + if(H5S_set_extent(space, size) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to modify size of data space"); + } done: axe_parents = (uint64_t *)H5MM_xfree(axe_parents); FUNC_LEAVE_NOAPI(ret_value) @@ -2883,7 +2903,8 @@ H5VL_iod_dataset_get(void *_dset, H5VL_dataset_get_t get_type, hid_t dxpl_id, hid_t *ret_id = va_arg (arguments, hid_t *); if((*ret_id = H5Scopy(dset->remote_dset.space_id)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get dataspace ID of dataset") + HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "can't get dataspace ID of dataset"); + break; } case H5VL_DATASET_GET_SPACE_STATUS: { diff --git a/src/H5VLiod_server.c b/src/H5VLiod_server.c index 3c0f913..d3141c1 100644 --- a/src/H5VLiod_server.c +++ b/src/H5VLiod_server.c @@ -3480,6 +3480,7 @@ H5VL_iod_server_dset_write_cb(AXE_engine_t UNUSED axe_engine, } else { buf_size = src_size * nelmts; + fprintf(stderr, "%d %d\n", buf_size, size); assert(buf_size == size); } diff --git a/src/H5VLnative.c b/src/H5VLnative.c index be62be2..346adc7 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -1084,6 +1084,7 @@ H5VL_native_datatype_open(void *obj, H5VL_loc_params_t loc_params, const char *n if(NULL == (type = H5T_open(&type_loc, dxpl_id))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype") + type->vol_obj = NULL; ret_value = (void *)type; done: if(NULL == type) |