summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/h5dump.c')
-rw-r--r--tools/h5dump/h5dump.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 3bcb40a..70d889f 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -3181,6 +3181,8 @@ parse_subset_params(char *dset)
* Tuesday, 9. January 2001
*
* Modifications:
+ * Pedro Vicente, Tuesday, January 15, 2008
+ * check for block overlap
*
*-------------------------------------------------------------------------
*/
@@ -3253,6 +3255,38 @@ handle_datasets(hid_t fid, char *dset, void *data)
}
}
+
+ /*-------------------------------------------------------------------------
+ * check for block overlap
+ *-------------------------------------------------------------------------
+ */
+
+ if(sset)
+ {
+ hid_t sid = H5Dget_space(dsetid);
+ unsigned int ndims = H5Sget_simple_extent_ndims(sid);
+ unsigned int i;
+
+ for ( i = 0; i < ndims; i++)
+ {
+ if ( sset->count[i] > 1 )
+ {
+
+ if ( sset->stride[i] < sset->block[i] )
+ {
+ error_msg(progname, "wrong subset selection; blocks overlap\n");
+ d_status = EXIT_FAILURE;
+ return;
+
+ }
+
+ }
+
+ }
+ H5Sclose(sid);
+
+ }
+
H5Oget_info(dsetid, &oinfo);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */