summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2018-06-07 16:30:08 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2018-06-07 16:30:08 (GMT)
commit551f15f8ae02ca9c995619b216121081eb07633e (patch)
tree995de8be59b4d8524753eba6b542ce4039d54c79 /tools/lib/h5diff_dset.c
parentb8c6b68c35fa2be23ef488a1d81097ff3ed55000 (diff)
parent664186b91d9198915baca4c6dca3f7b03695d316 (diff)
downloadhdf5-551f15f8ae02ca9c995619b216121081eb07633e.zip
hdf5-551f15f8ae02ca9c995619b216121081eb07633e.tar.gz
hdf5-551f15f8ae02ca9c995619b216121081eb07633e.tar.bz2
Merge pull request #1106 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:1.8/master to 1.8/masterhdf5-1_8_21
* commit '664186b91d9198915baca4c6dca3f7b03695d316': (124 commits) Commit HDF5 1.8.21 release version strings. Update INSTALL and INSTALL_parallel files to remove references to ancient systems and add generic steps for building HDF5 on HPC clusters. Update various INSTALL files for 1.8.21 release. Add missing space and correct typo. Modified a section for newly supported systems and compilers (vs. 1.8.20 release); Brought edits for tools bug fixes from 1.10.2 RELEASE.txt as we agreed with Allen. It is my test under Larry's guidance. Remove build directory which was unintentionally committed. Updated MANIFEST Switch default build mode to production. Update version to 1.8.21 in anticipation of release. Fixed EED-319 Description: Added an html version for the C++ function mapping table and removed the single web page version. Updated cpp_doc_config to use the html file. Fixed some typos. Running "doxygen cpp_doc_config" successfully. HDFFV-10473 fix HDFFV-10398 attribute location Add missing C++ entries to RELEASE.txt. pre1 release. Add missing RELEASE.txt entries for C++. Update Windows test machines Fix soversion naming and update cmake scripts Update version in RELEASE.txt. Correct merge errors from hdf5_1_8. Fixed typos Fixed typos Fixed typos ...
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r--tools/lib/h5diff_dset.c50
1 files changed, 37 insertions, 13 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 9d0462d..af6a171 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -192,7 +192,8 @@ hsize_t diff_datasetid(hid_t did1,
hid_t sm_space = -1; /*stripmine data space */
size_t need; /* bytes needed for malloc */
int i;
- unsigned int vl_data = 0; /*contains VL datatypes */
+ unsigned int vl_data1 = 0; /*contains VL datatypes */
+ unsigned int vl_data2 = 0; /*contains VL datatypes */
h5difftrace("diff_datasetid start\n");
/* Get the dataspace handle */
@@ -314,7 +315,9 @@ hsize_t diff_datasetid(hid_t did1,
* VLEN memory buffer later
*/
if(TRUE == h5tools_detect_vlen(m_tid1))
- vl_data = TRUE;
+ vl_data1 = TRUE;
+ if(TRUE == h5tools_detect_vlen(m_tid2))
+ vl_data2 = TRUE;
h5diffdebug2("h5tools_detect_vlen - errstat:%d\n", opts->err_stat);
/*------------------------------------------------------------------------
@@ -405,11 +408,12 @@ hsize_t diff_datasetid(hid_t did1,
h5diffdebug2("diff_array nfound:%d\n", nfound);
/* reclaim any VL memory, if necessary */
- if(vl_data) {
- h5difftrace("check vl_data\n");
+ h5diffdebug2("check vl_data1:%d\n", vl_data1);
+ if(vl_data1)
H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
+ h5diffdebug2("check vl_data2:%d\n", vl_data2);
+ if(vl_data2)
H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
- } /* end if */
if(buf1 != NULL) {
HDfree(buf1);
buf1 = NULL;
@@ -499,10 +503,10 @@ hsize_t diff_datasetid(hid_t did1,
dadims, opts, name1, name2, dam_tid, did1, did2);
/* reclaim any VL memory, if necessary */
- if(vl_data) {
+ if(vl_data1)
H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
- H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2);
- } /* end if */
+ if(vl_data2)
+ H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
/* calculate the next hyperslab offset */
for(i = rank1, carry = 1; i > 0 && carry; --i) {
@@ -539,29 +543,29 @@ done:
/* free */
if(buf1 != NULL) {
/* reclaim any VL memory, if necessary */
- if(vl_data)
+ if(vl_data1)
H5Dvlen_reclaim(m_tid1, sid1, H5P_DEFAULT, buf1);
HDfree(buf1);
buf1 = NULL;
}
if(buf2 != NULL) {
/* reclaim any VL memory, if necessary */
- if(vl_data)
+ if(vl_data2)
H5Dvlen_reclaim(m_tid2, sid2, H5P_DEFAULT, buf2);
HDfree(buf2);
buf2 = NULL;
}
if(sm_buf1 != NULL) {
/* reclaim any VL memory, if necessary */
- if(vl_data)
+ if(vl_data1)
H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf1);
HDfree(sm_buf1);
sm_buf1 = NULL;
}
if(sm_buf2 != NULL) {
/* reclaim any VL memory, if necessary */
- if(vl_data)
- H5Dvlen_reclaim(m_tid1, sm_space, H5P_DEFAULT, sm_buf2);
+ if(vl_data2)
+ H5Dvlen_reclaim(m_tid2, sm_space, H5P_DEFAULT, sm_buf2);
HDfree(sm_buf2);
sm_buf2 = NULL;
}
@@ -570,6 +574,7 @@ done:
H5E_BEGIN_TRY {
H5Sclose(sid1);
H5Sclose(sid2);
+ H5Sclose(sm_space);
H5Tclose(f_tid1);
H5Tclose(f_tid2);
H5Tclose(m_tid1);
@@ -761,12 +766,31 @@ int diff_can_type(hid_t f_tid1, /* file data type */
}
}
+ if(tclass1 == H5T_STRING) {
+ htri_t vstrtype1 = -1;
+ htri_t vstrtype2 = -1;
+ h5difftrace("diff_can_type end - H5T_STRING\n");
+
+ vstrtype1 = H5Tis_variable_str(f_tid1);
+ vstrtype2 = H5Tis_variable_str(f_tid2);
+
+ /* no compare if either one but not both are variable string type */
+ if (vstrtype1 != vstrtype2) {
+ if((opts->m_verbose || opts->m_list_not_cmp) && obj1_name && obj2_name)
+ parallel_print("Not comparable: <%s> or <%s> is of mixed string type\n",
+ obj1_name, obj2_name);
+ opts->not_cmp = 1;
+ HGOTO_DONE(0);
+ }
+ }
+
if(tclass1 == H5T_COMPOUND) {
int nmembs1;
int nmembs2;
int j;
hid_t memb_type1 = -1;
hid_t memb_type2 = -1;
+ h5difftrace("diff_can_type end - H5T_COMPOUND\n");
nmembs1 = H5Tget_nmembers(f_tid1);
nmembs2 = H5Tget_nmembers(f_tid2);