summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-05-13 21:30:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-05-13 21:30:24 (GMT)
commit7e231953a25fd4cc82f5b14b48b2c928cb3748e7 (patch)
treedd725497a7dff53acdab7120b76e628a7b533ffb /tools
parent67ba6cb57d84dd34c69930d469ae445697b49731 (diff)
downloadhdf5-7e231953a25fd4cc82f5b14b48b2c928cb3748e7.zip
hdf5-7e231953a25fd4cc82f5b14b48b2c928cb3748e7.tar.gz
hdf5-7e231953a25fd4cc82f5b14b48b2c928cb3748e7.tar.bz2
[svn-r27058] Description:
Convert internal chunk structures to use 'scaled' coordinates instead of absolute coordinates. Tested on: Mac OSX/64 10.10.3 (amazon) w/parallel & serial Linux 2.6.x/32 (jam) w/parallel & serial Linux 2.6.x/64 (koala) w/serial
Diffstat (limited to 'tools')
-rw-r--r--tools/misc/h5debug.c39
1 files changed, 33 insertions, 6 deletions
diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c
index 617e614..ea7a9ca 100644
--- a/tools/misc/h5debug.c
+++ b/tools/misc/h5debug.c
@@ -329,6 +329,7 @@ main(int argc, char *argv[])
*/
H5B_subid_t subtype = (H5B_subid_t)sig[H5_SIZEOF_MAGIC];
unsigned ndims;
+ uint32_t dim[H5O_LAYOUT_NDIMS];
switch(subtype) {
case H5B_SNODE_ID:
@@ -337,6 +338,7 @@ main(int argc, char *argv[])
HDfprintf(stderr, "\nWarning: Providing the group's local heap address will give more information\n");
HDfprintf(stderr, "B-tree symbol table node usage:\n");
HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
+ HDexit(4);
} /* end if */
status = H5G_node_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, extra);
@@ -347,12 +349,37 @@ main(int argc, char *argv[])
if(extra == 0) {
HDfprintf(stderr, "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions>\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
HDexit(4);
} /* end if */
+ /* Build array of chunk dimensions */
ndims = (unsigned)extra;
- status = H5D_btree_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims);
+ dim[0] = extra2;
+ if(ndims > 1)
+ dim[1] = extra3;
+ if(ndims > 2)
+ dim[2] = extra4;
+
+ /* Check for dimension error */
+ if(ndims > 3) {
+ HDfprintf(stderr, "ERROR: Only 3 dimensions support currently (fix h5debug)\n");
+ HDfprintf(stderr, "B-tree chunked storage node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
+ HDexit(4);
+ } /* end for */
+ for(u = 0; u < ndims; u++)
+ if(0 == dim[u]) {
+ HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
+ HDfprintf(stderr, "B-tree chunked storage node usage:\n");
+ HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
+ HDexit(4);
+ } /* end if */
+
+ /* Set the last dimension (the element size) to zero */
+ dim[ndims] = 0;
+
+ status = H5D_btree_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, ndims, dim);
break;
default:
@@ -491,7 +518,7 @@ main(int argc, char *argv[])
const H5EA_class_t *cls = get_H5EA_class(sig);
HDassert(cls);
- /* Check for enough valid parameters */
+ /* Check for enough valid parameters */
if(extra == 0) {
HDfprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n");
HDfprintf(stderr, "Extensible array header block usage:\n");
@@ -559,11 +586,11 @@ main(int argc, char *argv[])
const H5FA_class_t *cls = get_H5FA_class(sig);
HDassert(cls);
- /* Check for enough valid parameters */
+ /* Check for enough valid parameters */
if(extra == 0) {
- HDfprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n");
+ HDfprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n");
HDfprintf(stderr, "Fixed array header block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
+ HDfprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
HDexit(4);
} /* end if */