summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-08 20:00:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-09 21:44:38 (GMT)
commit310b42e35af19780000344fa8902c1954659ee58 (patch)
tree1a70cbbde96b927f2392fcd9efc178c098026c1f /tools/lib/h5diff_dset.c
parentdbd6fb0ba6062f1a48b893f79224c257d3282292 (diff)
downloadhdf5-310b42e35af19780000344fa8902c1954659ee58.zip
hdf5-310b42e35af19780000344fa8902c1954659ee58.tar.gz
hdf5-310b42e35af19780000344fa8902c1954659ee58.tar.bz2
HDFFV-10876 Merge from develop
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r--tools/lib/h5diff_dset.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 96f1d1a..56c4f0b 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -49,17 +49,17 @@ hsize_t diff_dataset(hid_t file1_id,
/* Open the datasets */
if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj1_name);
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 first dataset failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 first dataset failed");
}
if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) {
parallel_print("Cannot open dataset <%s>\n", obj2_name);
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 second dataset failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dopen2 second dataset failed");
}
if((dcpl1 = H5Dget_create_plist(did1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist first dataset failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist first dataset failed");
if((dcpl2 = H5Dget_create_plist(did2)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist second dataset failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist second dataset failed");
/*-------------------------------------------------------------------------
* check if the dataset creation property list has filters that
@@ -72,7 +72,7 @@ hsize_t diff_dataset(hid_t file1_id,
(status = h5tools_canreadf((opts->m_verbose ? obj2_name : NULL), dcpl2) == 1))
nfound = diff_datasetid(did1, did2, obj1_name, obj2_name, opts);
else if (status < 0) {
- HGOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed");
}
else {
ret_value = 1;
@@ -198,27 +198,27 @@ hsize_t diff_datasetid(hid_t did1,
h5difftrace("diff_datasetid start\n");
/* Get the dataspace handle */
if((sid1 = H5Dget_space(did1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
/* Get rank */
if((rank1 = H5Sget_simple_extent_ndims(sid1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
/* Get the dataspace handle */
if((sid2 = H5Dget_space(did2)) < 0 )
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_space failed");
/* Get rank */
if((rank2 = H5Sget_simple_extent_ndims(sid2)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_ndims failed");
/* Get dimensions */
if(H5Sget_simple_extent_dims(sid1, dims1, maxdim1) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
/* Get dimensions */
if(H5Sget_simple_extent_dims(sid2, dims2, maxdim2) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
+ H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Sget_simple_extent_dims failed");
h5diffdebug3("rank: %ld - %ld\n", rank1, rank2);
/*-------------------------------------------------------------------------
@@ -228,25 +228,25 @@ hsize_t diff_datasetid(hid_t did1,
/* Get the data type */
if((f_tid1 = H5Dget_type(did1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
/* Get the data type */
if((f_tid2 = H5Dget_type(did2)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_type failed");
/*-------------------------------------------------------------------------
* get the storage layout type
*-------------------------------------------------------------------------
*/
if((dcpl1 = H5Dget_create_plist(did1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((dcpl2 = H5Dget_create_plist(did2)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dget_create_plist failed");
if((stl1 = H5Pget_layout(dcpl1)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
if((stl2 = H5Pget_layout(dcpl2)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Pget_layout failed");
/*-------------------------------------------------------------------------
* check for empty datasets
@@ -288,10 +288,10 @@ hsize_t diff_datasetid(hid_t did1,
*/
h5difftrace("check for memory type and sizes\n");
if((m_tid1 = H5Tget_native_type(f_tid1, H5T_DIR_DEFAULT)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
if((m_tid2 = H5Tget_native_type(f_tid2, H5T_DIR_DEFAULT)) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Tget_native_type failed");
m_size1 = H5Tget_size(m_tid1);
m_size2 = H5Tget_size(m_tid2);
@@ -357,7 +357,7 @@ hsize_t diff_datasetid(hid_t did1,
if (FAIL == match_up_memsize (f_tid1, f_tid2,
&m_tid1, &m_tid2,
&m_size1, &m_size2))
- HGOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "match_up_memsize failed");
h5diffdebug3("m_size: %ld - %ld\n", m_size1, m_size2);
dadims = dims1;
dam_size = m_size1;
@@ -403,10 +403,10 @@ hsize_t diff_datasetid(hid_t did1,
if(buf1 != NULL && buf2 != NULL) {
h5difftrace("buf1 != NULL && buf2 != NULL\n");
if(H5Dread(did1, m_tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf1) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
h5difftrace("H5Dread did2\n");
if(H5Dread(did2, m_tid2, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf2) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
/* array diff */
nfound = diff_array(buf1, buf2, danelmts, (hsize_t)0, rank1, dadims,
@@ -470,9 +470,9 @@ hsize_t diff_datasetid(hid_t did1,
* E.g., sm_space.
*/
if((sm_buf1 = HDmalloc((size_t)sm_nbytes)) == NULL)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
if((sm_buf2 = HDmalloc((size_t)sm_nbytes)) == NULL)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "HDmalloc failed");
sm_nelmts = sm_nbytes / p_type_nbytes;
sm_space = H5Screate_simple(1, &sm_nelmts, NULL);
@@ -489,19 +489,19 @@ hsize_t diff_datasetid(hid_t did1,
hs_nelmts *= hs_size[i];
} /* end for */
if(H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
if(H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Sselect_hyperslab failed");
} /* end if */
else
hs_nelmts = 1;
if(H5Dread(did1, m_tid1, sm_space, sid1, H5P_DEFAULT, sm_buf1) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
if(H5Dread(did2, m_tid2, sm_space, sid2, H5P_DEFAULT, sm_buf2) < 0)
- HGOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
+ H5TOOLS_GOTO_ERROR(1, H5E_tools_min_id_g, "H5Dread failed");
/* get array differences. in the case of hyperslab read, increment the number of differences
found in each hyperslab and pass the position at the beginning for printing */
@@ -630,9 +630,9 @@ int diff_can_type(hid_t f_tid1, /* file data type */
*-------------------------------------------------------------------------
*/
if((tclass1 = H5Tget_class(f_tid1)) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class first object failed");
+ H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class first object failed");
if((tclass2 = H5Tget_class(f_tid2)) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class second object failed");
+ H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_class second object failed");
if(tclass1 != tclass2) {
if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name) {