diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5diff/testfiles/h5diff_dset_idx1.h5 | bin | 5974 -> 5974 bytes | |||
-rw-r--r-- | tools/h5diff/testfiles/h5diff_dset_idx2.h5 | bin | 2206 -> 2206 bytes | |||
-rw-r--r-- | tools/h5stat/testfiles/h5stat_idx.h5 | bin | 2206 -> 2206 bytes | |||
-rw-r--r-- | tools/misc/h5debug.c | 60 | ||||
-rw-r--r-- | tools/testfiles/tdset_idx.h5 | bin | 6760 -> 6760 bytes |
5 files changed, 45 insertions, 15 deletions
diff --git a/tools/h5diff/testfiles/h5diff_dset_idx1.h5 b/tools/h5diff/testfiles/h5diff_dset_idx1.h5 Binary files differindex 684925d..1af4e5a 100644 --- a/tools/h5diff/testfiles/h5diff_dset_idx1.h5 +++ b/tools/h5diff/testfiles/h5diff_dset_idx1.h5 diff --git a/tools/h5diff/testfiles/h5diff_dset_idx2.h5 b/tools/h5diff/testfiles/h5diff_dset_idx2.h5 Binary files differindex ea721d1..64c9330 100644 --- a/tools/h5diff/testfiles/h5diff_dset_idx2.h5 +++ b/tools/h5diff/testfiles/h5diff_dset_idx2.h5 diff --git a/tools/h5stat/testfiles/h5stat_idx.h5 b/tools/h5stat/testfiles/h5stat_idx.h5 Binary files differindex 6a25272..8b7655a 100644 --- a/tools/h5stat/testfiles/h5stat_idx.h5 +++ b/tools/h5stat/testfiles/h5stat_idx.h5 diff --git a/tools/misc/h5debug.c b/tools/misc/h5debug.c index d79a66a..ef43adb 100644 --- a/tools/misc/h5debug.c +++ b/tools/misc/h5debug.c @@ -144,6 +144,10 @@ get_H5B2_class(const uint8_t *sig) * koziol@hdfgroup.org * Sep 11 2008 * + * Modifications: + * Vailin Choi; August 2010 + * Added Extensible Array class callbacks. + * *------------------------------------------------------------------------- */ static const H5EA_class_t * @@ -157,6 +161,14 @@ get_H5EA_class(const uint8_t *sig) cls = H5EA_CLS_TEST; break; + case H5EA_CLS_CHUNK_ID: + cls = H5EA_CLS_CHUNK; + break; + + case H5EA_CLS_FILT_CHUNK_ID: + cls = H5EA_CLS_FILT_CHUNK; + break; + default: fprintf(stderr, "Unknown array class %u\n", (unsigned)(clsid)); HDexit(4); @@ -222,6 +234,9 @@ get_H5FA_class(const uint8_t *sig) * matzke@llnl.gov * Jul 18 1997 * + * Modifications: + * Vailin Choi; August 2010 + * Modified to handle Extensible Array and Fixed Array meta data. *------------------------------------------------------------------------- */ int @@ -267,6 +282,12 @@ main(int argc, char *argv[]) HDexit(2); } /* end if */ + /* Ignore metadata tags while using h5debug */ + if(H5AC_ignore_tags(f) < 0) { + fprintf(stderr, "cannot ignore metadata tags\n"); + HDexit(1); + } + /* * Parse command arguments. */ @@ -487,7 +508,16 @@ main(int argc, char *argv[]) */ const H5EA_class_t *cls = get_H5EA_class(sig); HDassert(cls); - status = H5EA__hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls); + + /* Check for enough valid parameters */ + if(extra == 0) { + fprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n"); + fprintf(stderr, "Extensible array header block usage:\n"); + fprintf(stderr, "\th5debug <filename> <Extensible Array header address> <object header address>\n"); + HDexit(4); + } /* end if */ + + status = H5EA__hdr_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra); } else if(!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* @@ -497,14 +527,14 @@ main(int argc, char *argv[]) HDassert(cls); /* Check for enough valid parameters */ - if(extra == 0) { - fprintf(stderr, "ERROR: Need extensible array header address in order to dump index block\n"); + if(extra == 0 || extra2 == 0) { + fprintf(stderr, "ERROR: Need extensible array header address and object header address containing the layout message in order to dump index block\n"); fprintf(stderr, "Extensible array index block usage:\n"); - fprintf(stderr, "\th5debug <filename> <index block address> <array header address>\n"); + fprintf(stderr, "\th5debug <filename> <index block address> <array header address> <object header address\n"); HDexit(4); } /* end if */ - status = H5EA__iblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra); + status = H5EA__iblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, extra2); } else if(!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* @@ -514,14 +544,14 @@ main(int argc, char *argv[]) HDassert(cls); /* Check for enough valid parameters */ - if(extra == 0 || extra2 == 0) { - fprintf(stderr, "ERROR: Need extensible array header address and super block index in order to dump super block\n"); + if(extra == 0 || extra2 == 0 || extra3 == 0) { + fprintf(stderr, "ERROR: Need extensible array header address, super block index and object header address containing the layout message in order to dump super block\n"); fprintf(stderr, "Extensible array super block usage:\n"); - fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super block index>\n"); + fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super block index> <object header address>\n"); HDexit(4); } /* end if */ - status = H5EA__sblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2); + status = H5EA__sblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (unsigned)extra2, extra3); } else if(!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* @@ -531,14 +561,14 @@ main(int argc, char *argv[]) HDassert(cls); /* Check for enough valid parameters */ - if(extra == 0 || extra2 == 0) { - fprintf(stderr, "ERROR: Need extensible array header address and # of elements in data block in order to dump data block\n"); + if(extra == 0 || extra2 == 0 || extra3 == 0) { + fprintf(stderr, "ERROR: Need extensible array header address, # of elements in data block and object header address containing the layout message in order to dump data block\n"); fprintf(stderr, "Extensible array data block usage:\n"); - fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of elements in data block>\n"); + fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of elements in data block> <object header address\n"); HDexit(4); } /* end if */ - status = H5EA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2); + status = H5EA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2, extra3); } else if(!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* @@ -549,7 +579,7 @@ main(int argc, char *argv[]) /* Check for enough valid parameters */ if(extra == 0) { - fprintf(stderr, "ERROR: Need object header address containing the layout messagein order to dump header\n"); + fprintf(stderr, "ERROR: Need object header address containing the layout message in order to dump header\n"); fprintf(stderr, "Fixed array header block usage:\n"); fprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n"); HDexit(4); @@ -572,7 +602,7 @@ main(int argc, char *argv[]) HDexit(4); } /* end if */ - status = H5FA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, (size_t)extra2); + status = H5FA__dblock_debug(f, H5P_DATASET_XFER_DEFAULT, addr, stdout, 0, VCOL, cls, extra, extra2); } else if(!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) { /* diff --git a/tools/testfiles/tdset_idx.h5 b/tools/testfiles/tdset_idx.h5 Binary files differindex 920f59e..809aee6 100644 --- a/tools/testfiles/tdset_idx.h5 +++ b/tools/testfiles/tdset_idx.h5 |