From 2dae07556928721290360fb2393bb928e2367527 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 25 Feb 2015 12:05:16 -0500 Subject: [svn-r26300] Description: Add H5Sis_regular_hyperslab() and H5Sget_regular_hyperslab() API routines, along with tests. Tested on: Mac OSX/64 10.10.2 (amazon) w/serial (h5committest forthcoming) --- src/H5Shyper.c | 105 ++++++++++++++++++++++++++++++++++++ src/H5Spublic.h | 3 ++ test/tselect.c | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 272 insertions(+) diff --git a/src/H5Shyper.c b/src/H5Shyper.c index c97c9b6..93a93b7 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8856,3 +8856,108 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_seq_list() */ + +/*-------------------------------------------------------------------------- + NAME + H5Sis_regular_hyperslab + PURPOSE + Determine if a hyperslab selection is regular + USAGE + htri_t H5Sis_regular_hyperslab(dsid) + hid_t dsid; IN: Dataspace ID of hyperslab selection to query + RETURNS + TRUE/FALSE for hyperslab selection, FAIL on error or when querying other + selection types. + DESCRIPTION + If a hyperslab can be represented as a single call to H5Sselect_hyperslab, + with the H5S_SELECT_SET option, it is regular. If the hyperslab selection + would require multiple calls to H5Sselect_hyperslab, it is irregular. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +htri_t +H5Sis_regular_hyperslab(hid_t spaceid) +{ + H5S_t *space; /* Dataspace to query */ + htri_t ret_value; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE1("Hs", "i", spaceid); + + /* Check args */ + if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + + ret_value = H5S_hyper_is_regular(space); + +done: + FUNC_LEAVE_API(ret_value) +} /* H5Sis_regular_hyperslab() */ + + +/*-------------------------------------------------------------------------- + NAME + H5Sgetregular_hyperslab + PURPOSE + Retrieve a regular hyperslab selection + USAGE + herr_t H5Sget_regular_hyperslab(dsid, start, stride, block, count) + hid_t dsid; IN: Dataspace ID of hyperslab selection to query + hsize_t start[]; OUT: Offset of start of hyperslab + hsize_t stride[]; OUT: Hyperslab stride + hsize_t count[]; OUT: Number of blocks included in hyperslab + hsize_t block[]; OUT: Size of block in hyperslab + RETURNS + Non-negative on success/Negative on failure. (It is an error to query + the regular hyperslab selections for non-regular hyperslab selections) + DESCRIPTION + Retrieve the start/stride/count/block for a regular hyperslab selection. + GLOBAL VARIABLES + COMMENTS, BUGS, ASSUMPTIONS + Note that if a hyperslab is originally regular, then becomes irregular + through selection operations, and then becomes regular again, the new + final regular selection may be equivalent but not identical to the + original regular selection. + EXAMPLES + REVISION LOG +--------------------------------------------------------------------------*/ +herr_t +H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], + hsize_t count[], hsize_t block[]) +{ + H5S_t *space; /* Dataspace to query */ + unsigned u; /* Local index variable */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + + /* Check args */ + if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + if(H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection") + if(TRUE != H5S_hyper_is_regular(space)) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection") + + /* Retrieve hyperslab parameters */ + if(start) + for(u = 0; u < space->extent.rank; u++) + start[u] = space->select.sel_info.hslab->app_diminfo[u].start; + if(stride) + for(u = 0; u < space->extent.rank; u++) + stride[u] = space->select.sel_info.hslab->app_diminfo[u].stride; + if(count) + for(u = 0; u < space->extent.rank; u++) + count[u] = space->select.sel_info.hslab->app_diminfo[u].count; + if(block) + for(u = 0; u < space->extent.rank; u++) + block[u] = space->select.sel_info.hslab->app_diminfo[u].block; + +done: + FUNC_LEAVE_API(ret_value) +} /* H5Sget_regular_hyperslab() */ + diff --git a/src/H5Spublic.h b/src/H5Spublic.h index 0a39ce1..37d3866 100644 --- a/src/H5Spublic.h +++ b/src/H5Spublic.h @@ -137,6 +137,9 @@ H5_DLL herr_t H5Sselect_all(hid_t spaceid); H5_DLL herr_t H5Sselect_none(hid_t spaceid); H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); H5_DLL htri_t H5Sselect_valid(hid_t spaceid); +H5_DLL htri_t H5Sis_regular_hyperslab(hid_t spaceid); +H5_DLL htri_t H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], + hsize_t stride[], hsize_t count[], hsize_t block[]); H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid); H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid); H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, diff --git a/test/tselect.c b/test/tselect.c index d5a1f4c..b34d095 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -162,6 +162,12 @@ /* #defines for shape same / different rank tests */ #define SS_DR_MAX_RANK 5 +/* Information for regular hyperslab query test */ +#define SPACE13_RANK 3 +#define SPACE13_DIM1 50 +#define SPACE13_DIM2 50 +#define SPACE13_DIM3 50 +#define SPACE13_NPOINTS 4 /* Location comparison function */ @@ -13069,6 +13075,161 @@ test_select_bounds(void) /**************************************************************** ** +** test_hyper_regular(): Tests query operations on regular hyperslabs +** +****************************************************************/ +static void +test_hyper_regular(void) +{ + hid_t sid; /* Dataspace ID */ + const hsize_t dims[SPACE13_RANK] = {SPACE13_DIM1, SPACE13_DIM2, SPACE13_DIM3}; /* Dataspace dimensions */ + hsize_t coord[SPACE13_NPOINTS][SPACE13_RANK]; /* Coordinates for point selection */ + hsize_t start[SPACE13_RANK]; /* The start of the hyperslab */ + hsize_t stride[SPACE13_RANK]; /* The stride between block starts for the hyperslab */ + hsize_t count[SPACE13_RANK]; /* The number of blocks for the hyperslab */ + hsize_t block[SPACE13_RANK]; /* The size of each block for the hyperslab */ + hsize_t t_start[SPACE13_RANK]; /* Temporary start of the hyperslab */ + hsize_t t_count[SPACE13_RANK]; /* Temporary number of blocks for the hyperslab */ + hsize_t q_start[SPACE13_RANK]; /* The queried start of the hyperslab */ + hsize_t q_stride[SPACE13_RANK]; /* The queried stride between block starts for the hyperslab */ + hsize_t q_count[SPACE13_RANK]; /* The queried number of blocks for the hyperslab */ + hsize_t q_block[SPACE13_RANK]; /* The queried size of each block for the hyperslab */ + htri_t is_regular; /* Whether a hyperslab selection is regular */ + unsigned u; /* Local index variable */ + herr_t ret; /* Generic return value */ + + /* Output message about test being performed */ + MESSAGE(6, ("Testing queries on regular hyperslabs\n")); + + /* Create dataspace */ + sid = H5Screate_simple(SPACE13_RANK, dims, NULL); + CHECK(sid, FAIL, "H5Screate_simple"); + + /* Query if 'all' selection is regular hyperslab (should fail) */ + H5E_BEGIN_TRY { + is_regular = H5Sis_regular_hyperslab(sid); + } H5E_END_TRY; + VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab"); + + /* Query regular hyperslab selection info (should fail) */ + H5E_BEGIN_TRY { + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* Set 'none' selection */ + ret = H5Sselect_none(sid); + CHECK(ret, FAIL, "H5Sselect_none"); + + /* Query if 'none' selection is regular hyperslab (should fail) */ + H5E_BEGIN_TRY { + is_regular = H5Sis_regular_hyperslab(sid); + } H5E_END_TRY; + VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab"); + + /* Query regular hyperslab selection info (should fail) */ + H5E_BEGIN_TRY { + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* Set point selection */ + coord[0][0] = 3; coord[0][1] = 3; coord[0][2] = 3; + coord[1][0] = 3; coord[1][1] = 48; coord[1][2] = 48; + coord[2][0] = 48; coord[2][1] = 3; coord[2][2] = 3; + coord[3][0] = 48; coord[3][1] = 48; coord[3][2] = 48; + ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)SPACE13_NPOINTS, (const hsize_t *)coord); + CHECK(ret, FAIL, "H5Sselect_elements"); + + /* Query if 'point' selection is regular hyperslab (should fail) */ + H5E_BEGIN_TRY { + is_regular = H5Sis_regular_hyperslab(sid); + } H5E_END_TRY; + VERIFY(is_regular, FAIL, "H5Sis_regular_hyperslab"); + + /* Query regular hyperslab selection info (should fail) */ + H5E_BEGIN_TRY { + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* Set "regular" hyperslab selection */ + start[0] = 2; start[1] = 2; start[2] = 2; + stride[0] = 5; stride[1] = 5; stride[2] = 5; + count[0] = 3; count[1] = 3; count[2] = 3; + block[0] = 4; block[1] = 4; block[2] = 4; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */ + is_regular = H5Sis_regular_hyperslab(sid); + VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab"); + + /* Retrieve the hyperslab parameters */ + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + CHECK(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* Verify the hyperslab parameters */ + for(u = 0; u < SPACE13_RANK; u++) { + if(start[u] != q_start[u]) + ERROR("H5Sget_regular_hyperslab, start"); + if(stride[u] != q_stride[u]) + ERROR("H5Sget_regular_hyperslab, stride"); + if(count[u] != q_count[u]) + ERROR("H5Sget_regular_hyperslab, count"); + if(block[u] != q_block[u]) + ERROR("H5Sget_regular_hyperslab, block"); + } /* end for */ + + /* 'OR' in another point */ + t_start[0] = 0; t_start[1] = 0; t_start[2] = 0; + t_count[0] = 1; t_count[1] = 1; t_count[2] = 1; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_OR, t_start, NULL, t_count, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Query if 'hyperslab' selection is regular hyperslab (should be FALSE) */ + is_regular = H5Sis_regular_hyperslab(sid); + VERIFY(is_regular, FALSE, "H5Sis_regular_hyperslab"); + + /* Query regular hyperslab selection info (should fail) */ + H5E_BEGIN_TRY { + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* 'XOR' in the point again, to remove it, which should make it regular again */ + t_start[0] = 0; t_start[1] = 0; t_start[2] = 0; + t_count[0] = 1; t_count[1] = 1; t_count[2] = 1; + ret = H5Sselect_hyperslab(sid, H5S_SELECT_XOR, t_start, NULL, t_count, NULL); + CHECK(ret, FAIL, "H5Sselect_hyperslab"); + + /* Query if 'hyperslab' selection is regular hyperslab (should be TRUE) */ + is_regular = H5Sis_regular_hyperslab(sid); + VERIFY(is_regular, TRUE, "H5Sis_regular_hyperslab"); + + /* Retrieve the hyperslab parameters */ + ret = H5Sget_regular_hyperslab(sid, q_start, q_stride, q_count, q_block); + CHECK(ret, FAIL, "H5Sget_regular_hyperslab"); + + /* Verify the hyperslab parameters */ + for(u = 0; u < SPACE13_RANK; u++) { + if(start[u] != q_start[u]) + ERROR("H5Sget_regular_hyperslab, start"); + if(stride[u] != q_stride[u]) + ERROR("H5Sget_regular_hyperslab, stride"); + if(count[u] != q_count[u]) + ERROR("H5Sget_regular_hyperslab, count"); + if(block[u] != q_block[u]) + ERROR("H5Sget_regular_hyperslab, block"); + } /* end for */ + + /* Close the dataspace */ + ret = H5Sclose(sid); + CHECK(ret, FAIL, "H5Sclose"); +} /* test_hyper_regular() */ + +/**************************************************************** +** ** test_select(): Main H5S selection testing routine. ** ****************************************************************/ @@ -13228,6 +13389,9 @@ test_select(void) /* Test selection bounds with & without offsets */ test_select_bounds(); + /* Test 'regular' hyperslab query routines */ + test_hyper_regular(); + } /* test_select() */ -- cgit v0.12 From 0ce8fddc735c588dcd5667f9fce44033500a4465 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 25 Feb 2015 12:29:30 -0500 Subject: [svn-r26301] Description: Bring Neil's fix for error in H5S_extent_copy() back to the trunk. Tested on: Mac OSX/64 10.10.2 (amazon) w/serial (h5committest forthcoming) --- src/H5Osdspace.c | 4 +-- src/H5S.c | 6 +++- test/th5s.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 3 deletions(-) diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c index 9ca8436..875cd56 100644 --- a/src/H5Osdspace.c +++ b/src/H5Osdspace.c @@ -308,7 +308,7 @@ H5O_sdspace_copy(const void *_mesg, void *_dest) /* check args */ HDassert(mesg); - if(!dest && NULL == (dest = H5FL_MALLOC(H5S_extent_t))) + if(!dest && NULL == (dest = H5FL_CALLOC(H5S_extent_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy extent information */ @@ -463,7 +463,7 @@ H5O_sdspace_pre_copy_file(H5F_t UNUSED *file_src, const void *mesg_src, */ if(udata) { /* Allocate copy of dataspace extent */ - if(NULL == (udata->src_space_extent = H5FL_MALLOC(H5S_extent_t))) + if(NULL == (udata->src_space_extent = H5FL_CALLOC(H5S_extent_t))) HGOTO_ERROR(H5E_DATASPACE, H5E_NOSPACE, FAIL, "dataspace extent allocation failed") /* Create a copy of the dataspace extent */ diff --git a/src/H5S.c b/src/H5S.c index 1146ab4..346e908 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -509,6 +509,10 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src, hbool_t copy_max) FUNC_ENTER_NOAPI(FAIL) + /* Release destination extent before we copy over it */ + if(H5S_extent_release(dst) < 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTRELEASE, FAIL, "unable to release dataspace extent") + /* Copy the regular fields */ dst->type = src->type; dst->version = src->version; @@ -583,7 +587,7 @@ H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max) FUNC_ENTER_NOAPI(NULL) - if(NULL == (dst = H5FL_MALLOC(H5S_t))) + if(NULL == (dst = H5FL_CALLOC(H5S_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Copy the source dataspace's extent */ diff --git a/test/th5s.c b/test/th5s.c index 43ad1bb..d3a651c 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -2207,6 +2207,97 @@ test_h5s_extent_equal(void) /**************************************************************** ** +** test_h5s_extent_copy(): Exercise extent copy code +** +****************************************************************/ +static void +test_h5s_extent_copy(void) +{ + hid_t spaces[14] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; /* Array of all dataspaces */ + hid_t tmp_space = -1; + hsize_t d1_dims1[1] = {10}, /* 1-D dimensions */ + d1_dims2[1] = {20}, + d1_dims3[1] = {H5S_UNLIMITED}; + hsize_t d2_dims1[2] = {10, 10}, /* 2-D dimensions */ + d2_dims2[2] = {20, 20}, + d2_dims3[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; + hsize_t d3_dims1[3] = {10, 10, 10}, /* 3-D dimensions */ + d3_dims2[3] = {20, 20, 20}, + d3_dims3[3] = {H5S_UNLIMITED, H5S_UNLIMITED, H5S_UNLIMITED}; + htri_t ext_equal; /* Whether two dataspace extents are equal */ + const unsigned num_spaces = sizeof(spaces) / sizeof(spaces[0]); + unsigned i, j; + herr_t ret; /* Generic error return */ + + /* Create dataspaces */ + spaces[0] = H5Screate(H5S_NULL); + CHECK(spaces[0], FAIL, "H5Screate"); + + spaces[1] = H5Screate(H5S_SCALAR); + CHECK(spaces[1], FAIL, "H5Screate"); + + spaces[2] = H5Screate_simple(1, d1_dims1, NULL); + CHECK(spaces[2], FAIL, "H5Screate"); + spaces[3] = H5Screate_simple(1, d1_dims2, NULL); + CHECK(spaces[3], FAIL, "H5Screate"); + spaces[4] = H5Screate_simple(1, d1_dims1, d1_dims2); + CHECK(spaces[4], FAIL, "H5Screate"); + spaces[5] = H5Screate_simple(1, d1_dims1, d1_dims3); + CHECK(spaces[5], FAIL, "H5Screate"); + + spaces[6] = H5Screate_simple(2, d2_dims1, NULL); + CHECK(spaces[6], FAIL, "H5Screate"); + spaces[7] = H5Screate_simple(2, d2_dims2, NULL); + CHECK(spaces[7], FAIL, "H5Screate"); + spaces[8] = H5Screate_simple(2, d2_dims1, d2_dims2); + CHECK(spaces[8], FAIL, "H5Screate"); + spaces[9] = H5Screate_simple(2, d2_dims1, d2_dims3); + CHECK(spaces[9], FAIL, "H5Screate"); + + spaces[10] = H5Screate_simple(3, d3_dims1, NULL); + CHECK(spaces[10], FAIL, "H5Screate"); + spaces[11] = H5Screate_simple(3, d3_dims2, NULL); + CHECK(spaces[11], FAIL, "H5Screate"); + spaces[12] = H5Screate_simple(3, d3_dims1, d3_dims2); + CHECK(spaces[12], FAIL, "H5Screate"); + spaces[13] = H5Screate_simple(3, d3_dims1, d3_dims3); + CHECK(spaces[13], FAIL, "H5Screate"); + + tmp_space = H5Screate(H5S_NULL); + CHECK(tmp_space, FAIL, "H5Screate"); + + /* Copy between all dataspace combinations. Note there are a few + * duplicates. */ + for(i = 0; i < num_spaces; i++) + for(j = i; j < num_spaces; j++) { + /* Copy from i to j, unless the inner loop just restarted, in which + * case i and j are the same, so the second call to H5Sextent_copy() + * will test copying from i/j to i/j */ + ret = H5Sextent_copy(tmp_space, spaces[j]); + CHECK(ret, FAIL, "H5Sextent_copy"); + ext_equal = H5Sextent_equal(tmp_space, spaces[j]); + VERIFY(ext_equal, TRUE, "H5Sextent_equal"); + + /* Copy from j to i */ + ret = H5Sextent_copy(tmp_space, spaces[i]); + CHECK(ret, FAIL, "H5Sextent_copy"); + ext_equal = H5Sextent_equal(tmp_space, spaces[i]); + VERIFY(ext_equal, TRUE, "H5Sextent_equal"); + } /* end for */ + + /* Close dataspaces */ + for(i = 0; i < num_spaces; i++) { + ret = H5Sclose(spaces[i]); + CHECK(ret, FAIL, "H5Sclose"); + spaces[i] = -1; + } /* end for */ + + ret = H5Sclose(tmp_space); + CHECK(ret, FAIL, "H5Sclose"); +} /* test_h5s_extent_copy() */ + +/**************************************************************** +** ** test_h5s(): Main H5S (dataspace) testing routine. ** ****************************************************************/ @@ -2230,6 +2321,7 @@ test_h5s(void) test_h5s_chunk(); /* Exercise bug fix for chunked I/O */ test_h5s_extent_equal(); /* Test extent comparison code */ + test_h5s_extent_copy(); /* Test extent copy code */ } /* test_h5s() */ -- cgit v0.12 From 3550004b200ef695c973fcf2310e95512c560c73 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 25 Feb 2015 13:03:52 -0500 Subject: [svn-r26302] Description: Revise dataspace encode/decode routines to make them work better with future virtual dataset feature. Tested on: Mac OSX/64 10.10.2 (amazon) w/serial (h5committest forthcoming) --- src/H5R.c | 4 +-- src/H5S.c | 4 +-- src/H5Sall.c | 41 +++++++++++++++++----------- src/H5Shyper.c | 82 +++++++++++++++++++++++++++++--------------------------- src/H5Snone.c | 35 ++++++++++++++---------- src/H5Spkg.h | 4 +-- src/H5Spoint.c | 56 ++++++++++++++++++++------------------ src/H5Sprivate.h | 4 +-- src/H5Sselect.c | 81 ++++++++++++++++++++++++++++++++++++++++++------------- 9 files changed, 190 insertions(+), 121 deletions(-) diff --git a/src/H5R.c b/src/H5R.c index 8396dcc..26f4b9d 100644 --- a/src/H5R.c +++ b/src/H5R.c @@ -291,7 +291,7 @@ H5R_create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, H5 H5F_addr_encode(loc->oloc->file, &p, obj_loc.oloc->addr); /* Serialize the selection into heap buffer */ - if(H5S_SELECT_SERIALIZE(space, p) < 0) + if(H5S_SELECT_SERIALIZE(space, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCOPY, FAIL, "Unable to serialize selection") /* Save the serialized buffer for later */ @@ -659,7 +659,7 @@ H5R_get_region(H5F_t *file, hid_t dxpl_id, const void *_ref) HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found") /* Unserialize the selection */ - if(H5S_select_deserialize(ret_value, p) < 0) + if(H5S_SELECT_DESERIALIZE(&ret_value, &p) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, NULL, "can't deserialize selection") done: diff --git a/src/H5S.c b/src/H5S.c index 346e908..a9812695 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -1540,7 +1540,7 @@ H5S_encode(H5S_t *obj, unsigned char *buf, size_t *nalloc) buf += extent_size; /* Encode the selection part of dataspace. */ - if(H5S_SELECT_SERIALIZE(obj, buf) < 0) + if(H5S_SELECT_SERIALIZE(obj, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTENCODE, FAIL, "can't encode select space") } /* end else */ @@ -1659,7 +1659,7 @@ H5S_decode(const unsigned char *buf) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection") /* Decode the select part of dataspace. I believe this part always exists. */ - if(H5S_SELECT_DESERIALIZE(ds, buf) < 0) + if(H5S_SELECT_DESERIALIZE(&ds, &buf) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection") /* Set return value */ diff --git a/src/H5Sall.c b/src/H5Sall.c index 24caad2..1105915 100644 --- a/src/H5Sall.c +++ b/src/H5Sall.c @@ -39,8 +39,8 @@ static herr_t H5S_all_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_all_release(H5S_t *space); static htri_t H5S_all_is_valid(const H5S_t *space); static hssize_t H5S_all_serial_size(const H5S_t *space); -static herr_t H5S_all_serialize(const H5S_t *space, uint8_t *buf); -static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t *buf); +static herr_t H5S_all_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_all_deserialize(H5S_t *space, const uint8_t **p); static herr_t H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_all_offset(const H5S_t *space, hsize_t *off); static htri_t H5S_all_is_contiguous(const H5S_t *space); @@ -496,9 +496,11 @@ H5S_all_serial_size (const H5S_t UNUSED *space) PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_all_serialize(space, buf) - H5S_t *space; IN: Dataspace pointer of selection to serialize - uint8 *buf; OUT: Buffer to put serialized selection into + herr_t H5S_all_serialize(space, p) + const H5S_t *space; IN: Dataspace with selection to serialize + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -510,17 +512,19 @@ H5S_all_serial_size (const H5S_t UNUSED *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_serialize (const H5S_t *space, uint8_t *buf) +H5S_all_serialize (const H5S_t *space, uint8_t **p) { FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); + HDassert(p); + HDassert(*p); /* Store the preamble information */ - UINT32ENCODE(buf, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the additional information length */ FUNC_LEAVE_NOAPI(SUCCEED) } /* H5S_all_serialize() */ @@ -532,9 +536,12 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_all_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_all_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -546,16 +553,18 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_all_deserialize(H5S_t *space, const uint8_t UNUSED *buf) +H5S_all_deserialize(H5S_t *space, const uint8_t UNUSED **p) { - herr_t ret_value; /* return value */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(space); + HDassert(p); + HDassert(*p); /* Change to "all" selection */ - if((ret_value = H5S_select_all(space, TRUE)) < 0) + if(H5S_select_all(space, TRUE) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDELETE, FAIL, "can't change selection") done: diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 93a93b7..dfc0d06 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -54,8 +54,8 @@ static herr_t H5S_hyper_get_seq_list(const H5S_t *space, unsigned flags, static herr_t H5S_hyper_release(H5S_t *space); static htri_t H5S_hyper_is_valid(const H5S_t *space); static hssize_t H5S_hyper_serial_size(const H5S_t *space); -static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t *buf); -static herr_t H5S_hyper_deserialize(H5S_t *space, const uint8_t *buf); +static herr_t H5S_hyper_serialize(const H5S_t *space, uint8_t **p); +static herr_t H5S_hyper_deserialize(H5S_t *space, const uint8_t **p); static herr_t H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end); static herr_t H5S_hyper_offset(const H5S_t *space, hsize_t *offset); static htri_t H5S_hyper_is_contiguous(const H5S_t *space); @@ -1994,7 +1994,7 @@ H5S_hyper_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **buf) +H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, hsize_t *end, hsize_t rank, uint8_t **p) { H5S_hyper_span_t *curr; /* Pointer to current hyperslab span */ hsize_t u; /* Index variable */ @@ -2007,7 +2007,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, HDassert(start); HDassert(end); HDassert(rank < H5O_LAYOUT_NDIMS); - HDassert(buf && *buf); + HDassert(p && *p); /* Walk through the list of spans, recursing or outputing them */ curr=spans->head; @@ -2019,7 +2019,7 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, end[rank]=curr->high; /* Recurse down to the next dimension */ - if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,buf)<0) + if(H5S_hyper_serialize_helper(curr->down,start,end,rank+1,p)<0) HGOTO_ERROR(H5E_INTERNAL, H5E_CANTFREE, FAIL, "failed to release hyperslab spans") } /* end if */ else { @@ -2027,17 +2027,17 @@ H5S_hyper_serialize_helper (const H5S_hyper_span_info_t *spans, hsize_t *start, /* Encode previous starting points */ for(u=0; ulow); + UINT32ENCODE(*p, (uint32_t)curr->low); /* Encode previous ending points */ for(u=0; uhigh); + UINT32ENCODE(*p, (uint32_t)curr->high); } /* end else */ /* Advance to next node */ @@ -2055,9 +2055,11 @@ done: PURPOSE Serialize the current selection into a user-provided buffer. USAGE - herr_t H5S_hyper_serialize(space, buf) - H5S_t *space; IN: Dataspace pointer of selection to serialize - uint8 *buf; OUT: Buffer to put serialized selection into + herr_t H5S_hyper_serialize(space, p) + const H5S_t *space; IN: Dataspace with selection to serialize + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -2069,7 +2071,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) +H5S_hyper_serialize (const H5S_t *space, uint8_t **p) { const H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */ hsize_t tmp_count[H5O_LAYOUT_NDIMS]; /* Temporary hyperslab counts */ @@ -2089,14 +2091,14 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) HDassert(space); /* Store the preamble information */ - UINT32ENCODE(buf, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ - UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */ - UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */ - lenp = buf; /* keep the pointer to the length location for later */ - buf += 4; /* skip over space for length */ + UINT32ENCODE(*p, (uint32_t)H5S_GET_SELECT_TYPE(space)); /* Store the type of selection */ + UINT32ENCODE(*p, (uint32_t)1); /* Store the version number */ + UINT32ENCODE(*p, (uint32_t)0); /* Store the un-used padding */ + lenp = *p; /* keep the pointer to the length location for later */ + *p += 4; /* skip over space for length */ /* Encode number of dimensions */ - UINT32ENCODE(buf, (uint32_t)space->extent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len += 4; /* Check for a "regular" hyperslab selection */ @@ -2114,7 +2116,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode number of hyperslabs */ H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(buf, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Now serialize the information for the regular hyperslab */ @@ -2137,11 +2139,11 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode hyperslab starting location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(buf, (uint32_t)offset[u]); + UINT32ENCODE(*p, (uint32_t)offset[u]); /* Encode hyperslab ending location */ for(u = 0; u < ndims; u++) - UINT32ENCODE(buf, (uint32_t)(offset[u] + (diminfo[u].block - 1))); + UINT32ENCODE(*p, (uint32_t)(offset[u] + (diminfo[u].block - 1))); /* Move the offset to the next sequence to start */ offset[fast_dim]+=diminfo[fast_dim].stride; @@ -2192,15 +2194,15 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) /* Encode number of hyperslabs */ block_count = H5S_hyper_span_nblocks(space->select.sel_info.hslab->span_lst); H5_CHECK_OVERFLOW(block_count, hsize_t, uint32_t); - UINT32ENCODE(buf, (uint32_t)block_count); + UINT32ENCODE(*p, (uint32_t)block_count); len+=4; /* Add 8 bytes times the rank for each hyperslab selected */ H5_CHECK_OVERFLOW((8 * space->extent.rank * block_count), hsize_t, size_t); - len += (size_t)(8 * space->extent.rank * block_count); + len += (uint32_t)(8 * space->extent.rank * block_count); /* Encode each hyperslab in selection */ - H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, &buf); + H5S_hyper_serialize_helper(space->select.sel_info.hslab->span_lst, start, end, (hsize_t)0, p); } /* end else */ /* Encode length */ @@ -2216,9 +2218,12 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_hyper_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_hyper_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -2230,9 +2235,9 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf) +H5S_hyper_deserialize (H5S_t *space, const uint8_t **p) { - uint32_t rank; /* rank of points */ + unsigned rank; /* rank of points */ size_t num_elem=0; /* number of elements in selection */ hsize_t start[H5O_LAYOUT_NDIMS]; /* hyperslab start information */ hsize_t end[H5O_LAYOUT_NDIMS]; /* hyperslab end information */ @@ -2251,14 +2256,13 @@ H5S_hyper_deserialize (H5S_t *space, const uint8_t *buf) /* Check args */ HDassert(space); - HDassert(buf); + HDassert(p); + HDassert(*p); /* Deserialize slabs to select */ - buf+=16; /* Skip over selection header */ - UINT32DECODE(buf,rank); /* decode the rank of the point selection */ - if(rank!=space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - UINT32DECODE(buf,num_elem); /* decode the number of points */ + /* (The header and rank have already beed decoded) */ + rank = space->extent.rank; /* Retrieve rank from space */ + UINT32DECODE(*p,num_elem); /* decode the number of points */ /* Set the count & stride for all blocks */ for(tcount=count,tstride=stride,j=0; jextent.rank); + UINT32ENCODE(*p, (uint32_t)space->extent.rank); len+=4; /* Encode number of elements */ - UINT32ENCODE(buf, (uint32_t)space->select.num_elem); + UINT32ENCODE(*p, (uint32_t)space->select.num_elem); len+=4; /* Encode each point in selection */ @@ -852,7 +854,7 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf) /* Encode each point */ for(u=0; uextent.rank; u++) - UINT32ENCODE(buf, (uint32_t)curr->pnt[u]); + UINT32ENCODE(*p, (uint32_t)curr->pnt[u]); curr=curr->next; } /* end while */ @@ -870,9 +872,12 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf) PURPOSE Deserialize the current selection from a user-provided buffer. USAGE - herr_t H5S_point_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_point_deserialize(space, p) + H5S_t *space; IN/OUT: Dataspace pointer to place + selection into + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -884,10 +889,10 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf) REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5S_point_deserialize (H5S_t *space, const uint8_t *buf) +H5S_point_deserialize (H5S_t *space, const uint8_t **p) { H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */ - uint32_t rank; /* Rank of points */ + unsigned rank; /* Rank of points */ size_t num_elem=0; /* Number of elements in selection */ hsize_t *coord=NULL, *tcoord; /* Pointer to array of elements */ unsigned i, j; /* local counting variables */ @@ -897,14 +902,13 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf) /* Check args */ HDassert(space); - HDassert(buf); + HDassert(p); + HDassert(*p); /* Deserialize points to select */ - buf += 16; /* Skip over selection header */ - UINT32DECODE(buf, rank); /* decode the rank of the point selection */ - if(rank != space->extent.rank) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of pointer does not match dataspace") - UINT32DECODE(buf, num_elem); /* decode the number of points */ + /* (The header and rank have already beed decoded) */ + rank = space->extent.rank; /* Retrieve rank from space */ + UINT32DECODE(*p, num_elem); /* decode the number of points */ /* Allocate space for the coordinates */ if(NULL == (coord = (hsize_t *)H5MM_malloc(num_elem * rank * sizeof(hsize_t)))) @@ -913,7 +917,7 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf) /* Retrieve the coordinates from the buffer */ for(tcoord = coord, i = 0; i < num_elem; i++) for(j = 0; j < (unsigned)rank; j++, tcoord++) - UINT32DECODE(buf, *tcoord); + UINT32DECODE(*p, *tcoord); /* Select points */ if(H5S_select_elements(space, op, num_elem, (const hsize_t *)coord) < 0) diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h index 44cd6c3..7b7b8c6 100644 --- a/src/H5Sprivate.h +++ b/src/H5Sprivate.h @@ -206,7 +206,7 @@ H5_DLL int H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2); /* Operations on selections */ -H5_DLL herr_t H5S_select_deserialize(H5S_t *space, const uint8_t *buf); +H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p); H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space); H5_DLL herr_t H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t op, void *operator_data); @@ -227,7 +227,7 @@ H5_DLL herr_t H5S_select_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter, size_t maxseq, size_t maxbytes, size_t *nseq, size_t *nbytes, hsize_t *off, size_t *len); H5_DLL hssize_t H5S_select_serial_size(const H5S_t *space); -H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf); +H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p); H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space); H5_DLL htri_t H5S_select_is_single(const H5S_t *space); H5_DLL htri_t H5S_select_is_regular(const H5S_t *space); diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 2cb4b38..a4f13d7 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -239,9 +239,11 @@ H5S_select_serial_size(const H5S_t *space) PURPOSE Serialize the selection for a dataspace into a buffer USAGE - herr_t H5S_select_serialize(space, buf) + herr_t H5S_select_serialize(space, p) const H5S_t *space; IN: Dataspace with selection to serialize - uint8_t *buf; OUT: Buffer to put serialized selection + uint8_t **p; OUT: Pointer to buffer to put serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -256,17 +258,17 @@ H5S_select_serial_size(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_serialize(const H5S_t *space, uint8_t *buf) +H5S_select_serialize(const H5S_t *space, uint8_t **p) { herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR HDassert(space); - HDassert(buf); + HDassert(p); /* Call the selection type's serialize function */ - ret_value=(*space->select.type->serialize)(space,buf); + ret_value=(*space->select.type->serialize)(space,p); FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_serialize() */ @@ -428,9 +430,13 @@ H5S_select_valid(const H5S_t *space) Deserialize the current selection from a user-provided buffer into a real selection in the dataspace. USAGE - herr_t H5S_select_deserialize(space, buf) - H5S_t *space; IN/OUT: Dataspace pointer to place selection into - uint8 *buf; IN: Buffer to retrieve serialized selection from + herr_t H5S_select_deserialize(space, p) + H5S_t **space; IN/OUT: Dataspace pointer to place + selection into. Will be allocated if not + provided. + uint8 **p; OUT: Pointer to buffer holding serialized + selection. Will be advanced to end of + serialized selection. RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -444,42 +450,81 @@ H5S_select_valid(const H5S_t *space) REVISION LOG --------------------------------------------------------------------------*/ herr_t -H5S_select_deserialize (H5S_t *space, const uint8_t *buf) +H5S_select_deserialize (H5S_t **space, const uint8_t **p) { - const uint8_t *tbuf; /* Temporary pointer to the selection type */ - uint32_t sel_type; /* Pointer to the selection type */ + H5S_t *tmp_space; /* Pointer to actual dataspace to use, either + *space or a newly allocated one */ + uint32_t sel_type; /* Pointer to the selection type */ herr_t ret_value=FAIL; /* return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(space); - tbuf=buf; - UINT32DECODE(tbuf, sel_type); + /* Allocate space if not provided */ + if(!*space) { + if(NULL == (tmp_space = H5S_create(H5S_SIMPLE))) + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create dataspace") + } /* end if */ + else + tmp_space = *space; + + /* Decode selection type */ + UINT32DECODE(*p, sel_type); + + /* Skip over the remainder of the header */ + *p += 12; + + /* Decode and check or patch rank for point and hyperslab selections */ + if((sel_type == H5S_SEL_POINTS) || (sel_type == H5S_SEL_HYPERSLABS)) { + uint32_t rank; /* Rank of dataspace */ + + /* Decode the rank of the point selection */ + UINT32DECODE(*p,rank); + + if(!*space) + /* Patch the rank of the allocated dataspace */ + tmp_space->extent.rank = rank; + else + /* Verify the rank of the provided dataspace */ + if(rank != tmp_space->extent.rank) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, FAIL, "rank of serialized selection does not match dataspace") + } /* end if */ + + /* Make routine for selection type */ switch(sel_type) { case H5S_SEL_POINTS: /* Sequence of points selected */ - ret_value=(*H5S_sel_point->deserialize)(space,buf); + ret_value = (*H5S_sel_point->deserialize)(tmp_space, p); break; case H5S_SEL_HYPERSLABS: /* Hyperslab selection defined */ - ret_value=(*H5S_sel_hyper->deserialize)(space,buf); + ret_value = (*H5S_sel_hyper->deserialize)(tmp_space, p); break; case H5S_SEL_ALL: /* Entire extent selected */ - ret_value=(*H5S_sel_all->deserialize)(space,buf); + ret_value = (*H5S_sel_all->deserialize)(tmp_space, p); break; case H5S_SEL_NONE: /* Nothing selected */ - ret_value=(*H5S_sel_none->deserialize)(space,buf); + ret_value = (*H5S_sel_none->deserialize)(tmp_space, p); break; default: break; } - if(ret_value<0) + if(ret_value < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTLOAD, FAIL, "can't deserialize selection") + /* Return space to the caller if allocated */ + if(!*space) + *space = tmp_space; + done: + /* Free temporary space if not passed to caller (only happens on error) */ + if(!*space && tmp_space) + if(H5S_close(tmp_space) < 0) + HDONE_ERROR(H5E_DATASPACE, H5E_CANTFREE, FAIL, "can't close dataspace") + FUNC_LEAVE_NOAPI(ret_value) } /* H5S_select_deserialize() */ -- cgit v0.12 From c4044e0c85778e6bd3eda61b7bfdf6bb0fd0a8e9 Mon Sep 17 00:00:00 2001 From: Mohamad Chaarawi Date: Wed, 25 Feb 2015 13:48:31 -0500 Subject: [svn-r26303] remove files with .clog2 extension generated by MPE when doing make clean. --- Makefile.in | 4 ++-- c++/Makefile.in | 4 ++-- c++/examples/Makefile.in | 4 ++-- c++/src/Makefile.in | 4 ++-- c++/test/Makefile.in | 6 +++--- config/commence.am | 4 ++-- examples/Makefile.in | 5 +++-- fortran/Makefile.in | 4 ++-- fortran/examples/Makefile.in | 4 ++-- fortran/src/Makefile.in | 4 ++-- fortran/test/Makefile.in | 4 ++-- fortran/testpar/Makefile.in | 4 ++-- hl/Makefile.in | 4 ++-- hl/c++/Makefile.in | 4 ++-- hl/c++/examples/Makefile.in | 4 ++-- hl/c++/src/Makefile.in | 4 ++-- hl/c++/test/Makefile.in | 4 ++-- hl/examples/Makefile.in | 4 ++-- hl/fortran/Makefile.in | 4 ++-- hl/fortran/examples/Makefile.in | 4 ++-- hl/fortran/src/Makefile.in | 4 ++-- hl/fortran/test/Makefile.in | 6 +++--- hl/src/Makefile.in | 4 ++-- hl/test/Makefile.in | 12 ++++++------ hl/tools/Makefile.in | 4 ++-- hl/tools/gif2h5/Makefile.in | 4 ++-- src/H5Shyper.c | 3 ++- src/Makefile.in | 4 ++-- test/Makefile.in | 6 +++--- testpar/Makefile.in | 6 +++--- tools/Makefile.in | 4 ++-- tools/h5copy/Makefile.in | 4 ++-- tools/h5diff/Makefile.in | 4 ++-- tools/h5dump/Makefile.in | 4 ++-- tools/h5import/Makefile.in | 4 ++-- tools/h5jam/Makefile.in | 6 +++--- tools/h5ls/Makefile.in | 4 ++-- tools/h5repack/Makefile.in | 4 ++-- tools/h5stat/Makefile.in | 4 ++-- tools/lib/Makefile.in | 4 ++-- tools/misc/Makefile.in | 4 ++-- tools/perform/Makefile.in | 4 ++-- 42 files changed, 94 insertions(+), 92 deletions(-) diff --git a/Makefile.in b/Makefile.in index f9c1263..9c1d71e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -501,10 +501,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Some files/directories generated during check that should be cleaned -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *-tmp +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *-tmp @BUILD_PARALLEL_CONDITIONAL_FALSE@TESTPARALLEL_DIR = # Define subdirectories to build. diff --git a/c++/Makefile.in b/c++/Makefile.in index ad4923f..45aeb34 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -661,8 +661,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 @BUILD_CXX_CONDITIONAL_TRUE@SUBDIRS = src test DIST_SUBDIRS = src test examples diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 8a6f4dc..d4a652f 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -609,8 +609,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 INSTALL_SCRIPT_FILES = run-c++-ex.sh # These are the programs that 'make all' or 'make prog' will build and diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 0faf8d9..a55cfac 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -675,8 +675,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index f6e2044..8b0b90f 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -666,10 +666,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files -CHECK_CLEANFILES = *.chkexe *.chklog *.clog tattr_multi.h5 tfattrs.h5 \ - tattr_scalar.h5 tattr_compound.h5 tattr_dtype.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 tattr_multi.h5 \ + tfattrs.h5 tattr_scalar.h5 tattr_compound.h5 tattr_dtype.h5 \ tattr_basic.h5 # These are our main targets. They should be listed in the order to be diff --git a/config/commence.am b/config/commence.am index 4bc005e..554c9fb 100644 --- a/config/commence.am +++ b/config/commence.am @@ -89,8 +89,8 @@ F9XMODFLAG=@F9XMODFLAG@ # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES=*.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES=*.chkexe *.chklog *.clog *.clog2 # List all build rules defined by HDF5 Makefiles as "PHONY" targets here. # This tells the Makefiles that these targets are not files to be built but diff --git a/examples/Makefile.in b/examples/Makefile.in index 5327842..7400481 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -609,8 +609,9 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog $(EXTLINK_DIRS) *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 $(EXTLINK_DIRS) \ + *.h5 @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example INSTALL_SCRIPT_FILES = run-c-ex.sh INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 2d0e0b7..74914fb 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -665,8 +665,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 @BUILD_PARALLEL_CONDITIONAL_TRUE@TESTPARALLEL_DIR = testpar # Subdirectories in build order, not including examples directory diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index c468739..eca49ec 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -617,8 +617,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 # Compile parallel fortran examples only if parallel is enabled @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = ph5example diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 7466528..cf29fed 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -726,8 +726,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index c2055c4..4d1e458 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -735,10 +735,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.raw +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.raw # The Fortran test library noinst_LTLIBRARIES = libh5test_fortran.la diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 97e59ed..fb38854 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -661,10 +661,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files -CHECK_CLEANFILES = *.chkexe *.chklog *.clog parf[12].h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 parf[12].h5 # These are our main targets TEST_PROG_PARA = parallel_test diff --git a/hl/Makefile.in b/hl/Makefile.in index 6ca0805..f3d6c04 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -665,8 +665,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 @BUILD_FORTRAN_CONDITIONAL_TRUE@FORTRAN_DIR = fortran @BUILD_CXX_CONDITIONAL_TRUE@CXX_DIR = c++ @BUILD_HDF5_HL_CONDITIONAL_TRUE@SUBDIRS = src test tools $(CXX_DIR) $(FORTRAN_DIR) diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index f16130a..0367469 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -661,8 +661,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 SUBDIRS = src test DIST_SUBDIRS = src test examples diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 83f07f2..a9ecd9e 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -608,8 +608,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 # These are the programs that 'make all' or 'make prog' will build and # which 'make check' will run. List them in the order they should be run. diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 98110b9..7e8c4ba 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -667,8 +667,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 7e50ec4..1160548 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -664,8 +664,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # These are our main targets. They should be listed in the order to be # executed, generally most specific tests to least specific tests. diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 43c6e3c..92a8301 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -608,8 +608,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = # Example directory diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index ff02a60..7c6f2e2 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -665,8 +665,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 SUBDIRS = src test DIST_SUBDIRS = src test examples diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 27b1dee..af5a18a 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -608,8 +608,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 # Compile parallel fortran examples only if parallel is enabled @BUILD_PARALLEL_CONDITIONAL_TRUE@EXAMPLE_PROG_PARA = diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 6979867..3ccfb9d 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -682,8 +682,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 50b8780..e1b28a5 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -673,11 +673,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog dsetf[1-5].h5 f1img.h5 \ - f1tab.h5 tstds.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 dsetf[1-5].h5 \ + f1img.h5 f1tab.h5 tstds.h5 # Our main target, the test programs TEST_PROG = tstds tstlite tstimage tsttable diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index a848280..ee3ef49 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -663,8 +663,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index e0ce927..75350ec 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -700,14 +700,14 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. These files are the ones created by running `make test'. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog combine_tables[1-2].h5 \ - test_ds[1-9].h5 test_ds10.h5 test_image[1-3].h5 \ - file_img[1-2].h5 test_lite[1-4].h5 test_table.h5 \ - test_packet_table.h5 test_packet_compress.h5 test_detach.h5 \ - test_dectris.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 \ + combine_tables[1-2].h5 test_ds[1-9].h5 test_ds10.h5 \ + test_image[1-3].h5 file_img[1-2].h5 test_lite[1-4].h5 \ + test_table.h5 test_packet_table.h5 test_packet_compress.h5 \ + test_detach.h5 test_dectris.h5 # The tests depend on the hdf5, hdf5 test, and hdf5_hl libraries LDADD = $(LIBH5_HL) $(LIBH5TEST) $(LIBHDF5) diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index bb7f71a..9d4359e 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -662,8 +662,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # All subdirectories SUBDIRS = gif2h5 diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 2317975..b8fdd3a 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -676,8 +676,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.gif +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.gif # These are our main targets, the tools TEST_SCRIPT = h52giftest.sh diff --git a/src/H5Shyper.c b/src/H5Shyper.c index dfc0d06..9b1562f 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -8888,7 +8888,7 @@ H5Sis_regular_hyperslab(hid_t spaceid) htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE1("Hs", "i", spaceid); + H5TRACE1("t", "i", spaceid); /* Check args */ if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) @@ -8938,6 +8938,7 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) + H5TRACE5("e", "i*h*h*h*h", spaceid, start, stride, count, block); /* Check args */ if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE))) diff --git a/src/Makefile.in b/src/Makefile.in index 3ba2e3c..46e48a0 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -725,8 +725,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. diff --git a/test/Makefile.in b/test/Makefile.in index cd089e8..918a803 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1068,15 +1068,15 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. These files are the ones created by setting the # HDF5_NOCLEANUP environment variable and running `make test' without # specifying a file prefix or low-level driver. Changing the file # prefix or low-level driver with environment variables will influence # the temporary file name in ways that the makefile is not aware of. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog accum.h5 cmpd_dset.h5 \ - compact_dataset.h5 dataset.h5 dset_offset.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 accum.h5 \ + cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offset.h5 \ max_compact_dataset.h5 simple.h5 set_local.h5 random_chunks.h5 \ huge_chunks.h5 chunk_cache.h5 big_chunk.h5 chunk_expand.h5 \ copy_dcpl_newfile.h5 extend.h5 istore.h5 extlinks*.h5 \ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 959731e..23ae44a 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -691,15 +691,15 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files # MPItest.h5 is from t_mpi # Para*.h5 are from testphdf # shutdown.h5 is from t_pshutdown # go is used for debugging. See testphdf5.c. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog MPItest.h5 Para*.h5 \ - CacheTestDummy.h5 shutdown.h5 go +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 MPItest.h5 \ + Para*.h5 CacheTestDummy.h5 shutdown.h5 go # Test programs. These are our main targets. # diff --git a/tools/Makefile.in b/tools/Makefile.in index ef0d6ab..4bd80af 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -662,8 +662,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 CONFIG = ordered # All subdirectories diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 2cb3a1e..e9a5e62 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -670,11 +670,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 # Test programs and scripts TEST_PROG = h5copygentest diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 860590c..29543a4 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -677,11 +677,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5diff. They should # be copied to the testfiles/ directory if update is required -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 expect_sorted \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 expect_sorted \ actual_sorted # Always build and test h5diff but build and test ph5diff only if parallel diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 287713d..fb8cc9b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -676,11 +676,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin # Test programs and scripts TEST_PROG = h5dumpgentest diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 7b9eadc..ed26aab 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -670,10 +670,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files from h5importtest -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.bin +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.bin # Test programs and scripts TEST_PROG = h5importtest diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 4c40784..855b708 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -682,12 +682,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by jamgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 testfiles/h5jam-*-sav \ - testfiles/h5unjam-*-sav +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ + testfiles/h5jam-*-sav testfiles/h5unjam-*-sav TEST_SCRIPT = testh5jam.sh # Add h5jam and h5unjam specific linker flags here diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index bd1244c..0a33e29 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -662,8 +662,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Test programs and scripts TEST_SCRIPT = testh5ls.sh diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 9edb827..698b8a3 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -694,11 +694,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin \ testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 # Test programs and scripts diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 9e9a6aa..993a226 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -672,12 +672,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repart_gentest. They should # copied to the testfiles/ directory if update is required. fst_family*.h5 # and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 #test script and program diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 26e88ee..607f1ed 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -659,8 +659,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # This is our main target, the h5tools library. noinst_LTLIBRARIES = libh5tools.la diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 06396f8..e11838f 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -697,12 +697,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repart_gentest. They should # copied to the testfiles/ directory if update is required. fst_family*.h5 # and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 #test script and program diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 728ce45..1f903c5 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -701,8 +701,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add h5perf and h5perf_serial specific linker flags here h5perf_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) -- cgit v0.12