diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-05-25 20:45:01 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-05-25 20:45:01 (GMT) |
commit | c62c0eb9d258f67c512ee9ddf6a5905bdf30642f (patch) | |
tree | 2cf2605aef54a26b3211315c059f592f1de602c0 | |
parent | 9edb2fcc8d940f9028d203c2b69d21cbfe44aa61 (diff) | |
download | hdf5-c62c0eb9d258f67c512ee9ddf6a5905bdf30642f.zip hdf5-c62c0eb9d258f67c512ee9ddf6a5905bdf30642f.tar.gz hdf5-c62c0eb9d258f67c512ee9ddf6a5905bdf30642f.tar.bz2 |
[svn-r8574] Purpose:
h5dump new features
Description:
added the code for new features. dump of
1) filters
2) storage layout
3) fill value
4) comments
5) file super block
6) file contents
7) array indices
Solution:
Platforms tested:
linux
AIX
solaris
Misc. update:
-rw-r--r-- | tools/h5dump/h5dump.c | 805 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 80 | ||||
-rwxr-xr-x | tools/h5dump/testh5dump.sh | 11 | ||||
-rwxr-xr-x | tools/h5dump/testh5dumpxml.sh | 9 | ||||
-rw-r--r-- | tools/lib/h5diff.c | 2 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 14 | ||||
-rw-r--r-- | tools/lib/h5tools.h | 24 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 1 | ||||
-rw-r--r-- | tools/testfiles/tvldtypes4.h5.xml | 4 | ||||
-rw-r--r-- | tools/testfiles/tvldtypes5.h5.xml | 4 | ||||
-rw-r--r-- | tools/testfiles/tvlstr.h5.xml | 8 |
11 files changed, 791 insertions, 171 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 601b3bd..f1c0a65 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -18,10 +18,21 @@ #include "H5private.h" #include "h5tools.h" #include "h5tools_utils.h" +#include "h5trav.h" + + /* module-scoped variables */ static const char *progname = "h5dump"; +/* 3 private values: can't be set, but can be read. + Note: these are defined in H5Zprivate, they are + duplicated here. + */ +#define H5_SZIP_LSB_OPTION_MASK 8 +#define H5_SZIP_MSB_OPTION_MASK 16 +#define H5_SZIP_RAW_OPTION_MASK 128 + static int d_status = EXIT_SUCCESS; static int unamedtype = 0; /* shared data type with no name */ static size_t prefix_len = 1024; @@ -32,13 +43,16 @@ static const char *driver = NULL; /* The driver to open the file with. */ static const dump_header *dump_header_format; /* things to display or which are set via command line parameters */ -static int display_all = TRUE; -static int display_bb = FALSE; -static int display_oid = FALSE; -static int display_data = TRUE; +static int display_all = TRUE; +static int display_oid = FALSE; +static int display_data = TRUE; static int display_attr_data = TRUE; -static int display_char = FALSE; /*print 1-byte numbers as ASCII? */ -static int usingdasho = FALSE; +static int display_char = FALSE; /*print 1-byte numbers as ASCII */ +static int usingdasho = FALSE; +static int display_bb = FALSE; /*superblock */ +static int display_dcpl = FALSE; /*dcpl */ +static int display_fi = FALSE; /*file index */ +static int display_ai = TRUE; /*array index */ /** ** Added for XML ** @@ -66,6 +80,7 @@ struct ref_path_table_entry_t { /** end XML **/ /* internal functions */ +static hid_t h5_fileaccess(void); static void dump_oid(hid_t oid); static void print_enum(hid_t type); static herr_t dump_all(hid_t group, const char *name, void *op_data); @@ -236,7 +251,7 @@ static const dump_header standardformat = { "standardformat", /*name */ "HDF5", /*fileebgin */ "", /*fileend */ - BOOT_BLOCK, /*bootblockbegin */ + SUPER_BLOCK, /*bootblockbegin */ "", /*bootblockend */ GROUPNAME, /*groupbegin */ "", /*groupend */ @@ -335,11 +350,13 @@ struct handler_t { /* binary: not implemented yet */ static const char *s_opts = "hbBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A"; #else -static const char *s_opts = "hBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A"; +static const char *s_opts = "hnpBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A"; #endif /* 0 */ static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "hel", no_arg, 'h' }, + { "contents", no_arg, 'n' }, + { "properties", no_arg, 'p' }, #if 0 /* binary: not implemented yet */ { "binary", no_arg, 'b' }, @@ -471,7 +488,12 @@ static void dump_dataset(hid_t, const char *, struct subset_t *); static void dump_dataspace(hid_t space); static void dump_datatype(hid_t type); static herr_t dump_attr(hid_t, const char *, void *); -static void dump_data(hid_t, int, struct subset_t *); +static void dump_data(hid_t, int, struct subset_t *, int); +static void dump_dcpl(hid_t dcpl, hid_t type_id, hid_t obj_id); +static void dump_comment(hid_t obj_id); +static void dump_fcpl(hid_t fid); +static void dump_list(hid_t fid); + /* XML format: same interface, alternative output */ @@ -481,7 +503,7 @@ static void xml_dump_dataset(hid_t, const char *, struct subset_t *) static void xml_dump_dataspace(hid_t space); static void xml_dump_datatype(hid_t type); static herr_t xml_dump_attr(hid_t, const char *, void *); -static void xml_dump_data(hid_t, int, struct subset_t *); +static void xml_dump_data(hid_t, int, struct subset_t *, int); /** ** Added for XML ** @@ -496,7 +518,7 @@ typedef struct dump_functions_t { void (*dump_dataspace_function) (hid_t); void (*dump_datatype_function) (hid_t); herr_t (*dump_attribute_function) (hid_t, const char *, void *); - void (*dump_data_function) (hid_t, int, struct subset_t *); + void (*dump_data_function) (hid_t, int, struct subset_t *, int); } dump_functions; /* Standard DDL output */ @@ -547,6 +569,7 @@ usage(const char *prog) fprintf(stdout, "usage: %s [OPTIONS] file\n", prog); fprintf(stdout, " OPTIONS\n"); fprintf(stdout, " -h, --help Print a usage message and exit\n"); + fprintf(stdout, " -n, --contents Print a list of the file contents and exit\n"); fprintf(stdout, " -B, --bootblock Print the content of the boot block\n"); fprintf(stdout, " -H, --header Print the header only; no data is displayed\n"); fprintf(stdout, " -A Print the header and value of attributes; data of datasets is not displayed\n"); @@ -555,6 +578,7 @@ usage(const char *prog) fprintf(stdout, " -V, --version Print version number and exit\n"); fprintf(stdout, " -a P, --attribute=P Print the specified attribute\n"); fprintf(stdout, " -d P, --dataset=P Print the specified dataset\n"); + fprintf(stdout, " -p, --properties Print dataset filters, storage layout and fill value\n"); fprintf(stdout, " -f D, --filedriver=D Specify which driver to open the file with\n"); fprintf(stdout, " -g P, --group=P Print the specified group and all members\n"); fprintf(stdout, " -l P, --soft-link=P Print the value(s) of the specified soft link\n"); @@ -562,7 +586,7 @@ usage(const char *prog) fprintf(stdout, " -t P, --datatype=P Print the specified named data type\n"); fprintf(stdout, " -w N, --width=N Set the number of columns of output\n"); fprintf(stdout, " -x, --xml Output in XML using Schema (default)\n"); - fprintf(stdout, " -u, --use-dtd Output in XML using DTD\n"); + fprintf(stdout, " -u, --use-dtd Output in XML using DTD\n"); fprintf(stdout, " -D U, --xml-dtd=U Use the DTD or schema at U\n"); fprintf(stdout, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n"); fprintf(stdout, " \":\": no namespace, default: \"hdf5:\"\n"); @@ -929,25 +953,6 @@ print_datatype(hid_t type,unsigned in_group) } /* end else */ } -/*------------------------------------------------------------------------- - * Function: dump_bb - * - * Purpose: Dump the boot block - * - * Return: void - * - * Programmer: Ruey-Hsia Li - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static void -dump_bb(void) -{ - printf("%s %s boot block not yet implemented %s\n", - BOOT_BLOCK, BEGIN, END); -} /*------------------------------------------------------------------------- * Function: dump_datatype @@ -1087,7 +1092,7 @@ dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) dump_oid(attr_id); if (display_data || display_attr_data) - dump_data(attr_id, ATTRIBUTE_DATA, NULL); + dump_data(attr_id, ATTRIBUTE_DATA, NULL, 0); H5Tclose(type); H5Sclose(space); @@ -1197,7 +1202,7 @@ dump_selected_attr(hid_t loc_id, const char *name) dump_oid(attr_id); if (display_data || display_attr_data) - dump_data(attr_id, ATTRIBUTE_DATA, NULL); + dump_data(attr_id, ATTRIBUTE_DATA, NULL, 0); H5Tclose(type); H5Sclose(space); @@ -1540,11 +1545,13 @@ dump_named_datatype(hid_t type, const char *name) indentation(indent + COL); print_datatype(type,1); printf(";\n"); + dump_comment(type); } end_obj(dump_header_format->datatypeend, dump_header_format->datatypeblockend); } + /*------------------------------------------------------------------------- * Function: dump_group * @@ -1565,7 +1572,7 @@ dump_group(hid_t gid, const char *name) { H5G_stat_t statbuf; hid_t dset, type; - char type_name[1024], *tmp, comment[50]; + char type_name[1024], *tmp; int i, xtype = H5G_UNKNOWN; /* dump all */ tmp = malloc(strlen(prefix) + strlen(name) + 2); @@ -1576,15 +1583,9 @@ dump_group(hid_t gid, const char *name) indent += COL; if (display_oid) - dump_oid(gid); - - comment[0] = '\0'; - H5Gget_comment(gid, ".", sizeof(comment), comment); + dump_oid(gid); - if (comment[0]) { - indentation(indent); - printf("COMMENT \"%s\"\n", comment); - } + dump_comment(gid); if (!strcmp(name, "/") && unamedtype) /* dump unamed type in root group */ @@ -1640,25 +1641,32 @@ dump_group(hid_t gid, const char *name) * * Programmer: Ruey-Hsia Li * - * Modifications: + * Modifications: pvn, 2004, added dcpl dump * *------------------------------------------------------------------------- */ static void dump_dataset(hid_t did, const char *name, struct subset_t *sset) { - hid_t type, space; + hid_t type, space, dcpl_id; indentation(indent); begin_obj(dump_header_format->datasetbegin, name, dump_header_format->datasetblockbegin); - type = H5Dget_type(did); - space = H5Dget_space(did); + type = H5Dget_type(did); + space = H5Dget_space(did); + dcpl_id = H5Dget_create_plist(did); + + + dump_comment(did); dump_datatype(type); dump_dataspace(space); if (display_oid) - dump_oid(did); + dump_oid(did); + + if (display_dcpl) + dump_dcpl(dcpl_id, type, did); if (display_data) switch (H5Tget_class(type)) { @@ -1677,7 +1685,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) case H5T_ENUM: case H5T_VLEN: case H5T_ARRAY: - dump_data(did, DATASET_DATA, sset); + dump_data(did, DATASET_DATA, sset, display_ai); break; default: @@ -1689,6 +1697,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) indent -= COL; H5Tclose(type); H5Sclose(space); + H5Pclose(dcpl_id); indentation(indent); end_obj(dump_header_format->datasetend, dump_header_format->datasetblockend); @@ -1838,12 +1847,12 @@ dump_subsetting_header(struct subset_t *sset, int dims) * * Programmer: Ruey-Hsia Li * - * Modifications: + * Modifications: pvn, print the matrix indices * *------------------------------------------------------------------------- */ static void -dump_data(hid_t obj_id, int obj_data, struct subset_t *sset) +dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex) { h5dump_t *outputformat = &dataformat; int status = -1; @@ -1913,8 +1922,21 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset) outputformat = &string_dataformat; } - status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); - H5Tclose(f_type); + /* print the matrix indices */ + if (pindex) + { + outputformat->idx_fmt = "(%s)"; + outputformat->idx_n_fmt = "%lu"; + outputformat->idx_sep = ","; + outputformat->line_pre = " %s "; + outputformat->line_1st = " %s "; + outputformat->line_cont = " %s "; + depth=0; + } + + + status = h5tools_dump_dset(stdout, outputformat, obj_id, -1, sset, depth); + H5Tclose(f_type); } else { /* need to call h5tools_dump_mem for the attribute data */ type = H5Aget_type(obj_id); @@ -1980,6 +2002,512 @@ dump_oid(hid_t oid) } /*------------------------------------------------------------------------- + * Function: dump_comment + * + * Purpose: prints the comment for the the object name + * + * Return: void + * + * Programmer: pvn + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +static void dump_comment(hid_t obj_id) +{ + char comment[50]; + + comment[0] = '\0'; + H5Gget_comment(obj_id, ".", sizeof(comment), comment); + + if (comment[0]) { + indentation(indent); + printf("COMMENT \"%s\"\n", comment); + } +} + + +/*------------------------------------------------------------------------- + * Function: dump_fill_value + * + * Purpose: prints the fill value + * + * Return: void + * + * Programmer: pvn + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +static void dump_fill_value(hid_t dcpl,hid_t type_id, hid_t obj_id) +{ + h5tools_context_t ctx; /*print context */ + size_t size; + void *buf=NULL; + int nelmts=1; + h5dump_t *outputformat = &dataformat; + + memset(&ctx, 0, sizeof(ctx)); + size = H5Tget_size(type_id); + buf = malloc(size); + + H5Pget_fill_value(dcpl, type_id, buf); + + h5tools_dump_simple_data(stdout, outputformat, obj_id, &ctx, + START_OF_DATA | END_OF_DATA, nelmts, type_id, buf); + + if (buf) + free (buf); + +} + + +/*------------------------------------------------------------------------- + * Function: dump_dcpl + * + * Purpose: prints several dataset create property list properties + * + * Return: void + * + * Programmer: pvn + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id) +{ + int nfilters; /* number of filters */ + unsigned filt_flags; /* filter flags */ + H5Z_filter_t filtn; /* filter identification number */ + unsigned cd_values[20]; /* filter client data values */ + size_t cd_nelmts; /* filter client number of values */ + char f_name[256]; /* filter name */ + unsigned szip_options_mask; + unsigned szip_pixels_per_block; + hsize_t chsize[64]; /* chunk size in elements */ + int rank; /* rank */ + char name[256]; /* external file name */ + off_t offset; /* offset of external file */ + hsize_t size; /* size of external file */ + H5D_fill_value_t fvstatus; + H5D_alloc_time_t at; + H5D_fill_time_t ft; + hsize_t storage_size; + haddr_t ioffset; + int i, next; + unsigned j; + + storage_size=H5Dget_storage_size(obj_id); + ioffset=H5Dget_offset(obj_id); + next=H5Pget_external_count(dcpl_id); + + +/*------------------------------------------------------------------------- + * STORAGE_LAYOUT + *------------------------------------------------------------------------- + */ + indentation(indent + COL); + printf("%s ", STORAGE_LAYOUT); + + if (H5D_CHUNKED == H5Pget_layout(dcpl_id)) + { + printf("%s %s\n", CHUNKED, BEGIN); + /*start indent */ + indent += COL; + indentation(indent + COL); + printf("SIZE %d ", storage_size); + rank = H5Pget_chunk(dcpl_id,NELMTS(chsize),chsize); + printf("%s %d", dump_header_format->dataspacedimbegin, chsize[0]); + for ( i=1; i<rank; i++) + printf(", %d", chsize[i]); + printf(" %s\n", dump_header_format->dataspacedimend); + /*end indent */ + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + } + else if (H5D_COMPACT == H5Pget_layout(dcpl_id)) + { + printf("%s %s\n", COMPACT, BEGIN); + /*start indent */ + indent += COL; + indentation(indent + COL); + printf("SIZE %d\n", storage_size); + /*end indent */ + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + } + else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) + { + /*------------------------------------------------------------------------- + * EXTERNAL_FILE + *------------------------------------------------------------------------- + */ + if (next) + { + printf("%s %s %s\n", CONTIGUOUS, EXTERNAL, BEGIN); + /*start indent */ + indent += COL; + + for ( i=0; i<next; i++) { + H5Pget_external(dcpl_id,i,sizeof(name),name,&offset,&size); + indentation(indent + COL); + printf("FILENAME %s SIZE %d OFFSET %d\n",name,size,offset); + } + /*end indent */ + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + } + + else + { + printf("%s %s\n", CONTIGUOUS, BEGIN); + /*start indent */ + indent += COL; + indentation(indent + COL); + printf("SIZE %d OFFSET %d\n", storage_size, ioffset); + /*end indent */ + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + } + } + + + + +/*------------------------------------------------------------------------- + * FILTERS + *------------------------------------------------------------------------- + */ + nfilters = H5Pget_nfilters(dcpl_id); + if (nfilters) + { + + indentation(indent + COL); + printf("%s %s\n", FILTERS, BEGIN); + indent += COL; + + + for (i=0; i<nfilters; i++) + { + cd_nelmts = NELMTS(cd_values); + filtn = H5Pget_filter(dcpl_id, + (unsigned)i, + &filt_flags, + &cd_nelmts, + cd_values, + sizeof(f_name), + f_name); + + switch (filtn) + { + case H5Z_FILTER_DEFLATE: + indentation(indent + COL); + printf("%s %s %s %d %s\n", DEFLATE, BEGIN, DEFLATE_LEVEL, cd_values[0], END); + break; + case H5Z_FILTER_SHUFFLE: + indentation(indent + COL); + printf("%s\n", SHUFFLE); + break; + case H5Z_FILTER_FLETCHER32: + indentation(indent + COL); + printf("%s\n", FLETCHER32); + break; + case H5Z_FILTER_SZIP: + { + szip_options_mask=cd_values[0];; + szip_pixels_per_block=cd_values[1]; + + indentation(indent + COL); + printf("%s %s\n",SZIP, BEGIN); + + /*start indent */ + + indent += COL; + indentation(indent + COL); + printf("PIXELS_PER_BLOCK %d\n", szip_pixels_per_block); + + indentation(indent + COL); + if (szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) + printf("MODE %s\n", "HARDWARE"); + else if (szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK) + printf("MODE %s\n", "K13"); + + indentation(indent + COL); + if (szip_options_mask & H5_SZIP_EC_OPTION_MASK) + printf("CODING %s\n", "ENTROPY"); + else if (szip_options_mask & H5_SZIP_NN_OPTION_MASK) + printf("CODING %s\n", "NEAREST NEIGHBOUR"); + + indentation(indent + COL); + if (szip_options_mask & H5_SZIP_LSB_OPTION_MASK) + printf("BYTE_ORDER %s\n", "LSB"); + else if (szip_options_mask & H5_SZIP_MSB_OPTION_MASK) + printf("BYTE_ORDER %s\n", "MSB"); + + indentation(indent + COL); + if (szip_options_mask & H5_SZIP_RAW_OPTION_MASK) + printf("HEADER %s\n", "RAW"); + + /*end indent */ + + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + } + break; + default: + indentation(indent + COL); + printf("%s %d %s", UNKNOWN_FILTER, filtn, cd_nelmts? "" : "\n" ); + if (cd_nelmts) { + printf("%s %s ","PARAMS", BEGIN); + for (j=0; j<cd_nelmts; j++) { + printf("%d ", cd_values[j]); + } + printf("%s\n", END); + } + break; + }/*switch*/ + } /*i*/ + + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + }/*nfilters*/ + +/*------------------------------------------------------------------------- + * FILLVALUE + *------------------------------------------------------------------------- + */ + + indentation(indent + COL); + printf("%s %s\n", FILLVALUE, BEGIN); + + /*start indent */ + indent += COL; + + indentation(indent + COL); + printf("FILL_TIME "); + + H5Pget_fill_time(dcpl_id, &ft); + switch ( ft ) + { + case H5D_FILL_TIME_ALLOC: + printf("%s", "ALLOC\n"); + break; + case H5D_FILL_TIME_NEVER: + printf("%s", "NEVER\n"); + break; + case H5D_FILL_TIME_IFSET: + printf("%s", "IFSET\n"); + break; + } + + indentation(indent + COL); + printf("%s", "ALLOC_TIME "); + H5Pget_alloc_time(dcpl_id, &at); + + switch (at) + { + case H5D_ALLOC_TIME_EARLY: + printf("%s", "EARLY\n"); + break; + case H5D_ALLOC_TIME_INCR: + printf("%s", "INCR\n"); + break; + case H5D_ALLOC_TIME_LATE: + printf("%s", "LATE\n"); + break; + } + + indentation(indent + COL); + printf("%s %s ", "VALUE ", BEGIN); + + H5Pfill_value_defined(dcpl_id, &fvstatus); + + if (fvstatus == H5D_FILL_VALUE_UNDEFINED) + printf("%s %s\n" "UNDEFINED ", END); + else + { + dump_fill_value(dcpl_id,type_id,obj_id); + printf(" %s\n", END); + } + + /* end indent */ + indent -= COL; + indentation(indent + COL); + printf("%s\n",END); + +} + +/*------------------------------------------------------------------------- + * Function: dump_fcpl + * + * Purpose: prints file creation property list information + * + * Return: void + * + * Programmer: pvn + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +dump_fcpl(hid_t fid) +{ +#ifdef H5_WANT_H5_V1_4_COMPAT + int sym_lk; +#else + unsigned sym_lk; /* symbol table B-tree leaf 'K' value */ + int istore_ik; /* indexed storage B-tree initial 'K' value */ +#endif + hid_t fcpl; /* file creation property list ID */ + hid_t fapl; /* file access property list ID */ + hsize_t userblock; /* userblock size retrieved from FCPL */ + size_t off_size; /* size of offsets in the file */ + size_t len_size; /* size of lengths in the file */ + int sym_ik; /* symbol table B-tree initial 'K' value */ + int super; /* superblock version # */ + int freelist; /* free list version # */ + int stab; /* symbol table entry version # */ + int shhdr; /* shared object header version # */ + herr_t ret; /* generic return value */ + hid_t driver; /* file driver */ + char dname[15]; /* buffer to store driver name */ + + fcpl=H5Fget_create_plist(fid); + ret=H5Pget_version(fcpl, &super, &freelist, &stab, &shhdr); + ret=H5Pget_userblock(fcpl,&userblock); + ret=H5Pget_sizes(fcpl,&off_size,&len_size); + ret=H5Pget_sym_k(fcpl,&sym_ik,&sym_lk); + ret=H5Pget_istore_k(fcpl,&istore_ik); + ret=H5Pclose(fcpl); + fapl = h5_fileaccess(); + driver = H5Pget_driver(fapl); + H5Pclose(fapl); + + + printf("%s %s\n",SUPER_BLOCK, BEGIN); + indentation(indent + COL); + printf("%s %d\n","SUPERBLOCK_VERSION", super); + indentation(indent + COL); + printf("%s %d\n","FREELIST_VERSION", freelist); + indentation(indent + COL); + printf("%s %d\n","SYMBOLTABLE_VERSION", stab); + indentation(indent + COL); + printf("%s %d\n","OBJECTHEADER_VERSION", shhdr); + indentation(indent + COL); + printf("%s %d\n","USERBLOCK_VERSION", userblock); + indentation(indent + COL); + printf("%s %d\n","OFFSET_SIZE", off_size); + indentation(indent + COL); + printf("%s %d\n","LENGTH_SIZE", len_size); + indentation(indent + COL); + printf("%s %d\n","BTREE_RANK", sym_ik); + indentation(indent + COL); + printf("%s %d\n","BTREE_LEAF", sym_lk); + + + + if (H5FD_CORE==driver) + { + strcpy(dname,"H5FD_CORE"); + } +#if 0 + else if (H5FD_DPSS==driver) + { + strcpy(dname,"H5FD_DPSS"); + } +#endif + else if (H5FD_FAMILY==driver) + { + strcpy(dname,"H5FD_FAMILY"); + } + else if (H5FD_GASS==driver) + { + strcpy(dname,"H5FD_GASS"); + } + else if (H5FD_LOG==driver) + { + strcpy(dname,"H5FD_LOG"); + } + else if (H5FD_MPIO==driver) + { + strcpy(dname,"H5FD_MPIO"); + } + else if (H5FD_MULTI==driver) + { + strcpy(dname,"H5FD_MULTI"); + } + else if (H5FD_SEC2==driver) + { + strcpy(dname,"H5FD_SEC2"); + } + else if (H5FD_STDIO==driver) + { + strcpy(dname,"H5FD_STDIO"); + } +#ifdef H5_HAVE_STREAM + else if (H5FD_STREAM==driver) + { + strcpy(dname,"H5FD_STREAM"); + } +#endif + + indentation(indent + COL); + printf("%s %s\n","FILE_DRIVER", dname); + indentation(indent + COL); + printf("%s %d\n","ISTORE_K", istore_ik); + + printf("%s\n",END); +} + +/*------------------------------------------------------------------------- + * Function: dump_list + * + * Purpose: prints all objects + * + * Return: void + * + * Programmer: pvn + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + +static void dump_list(hid_t fid) +{ + int nobjects; + trav_info_t *info=NULL; + + /* get the number of objects in the files */ + nobjects = h5trav_getinfo(fid, NULL); + + /* get the list of objects in the files */ + info = (trav_info_t*) malloc( nobjects * sizeof(trav_info_t)); + if (info==NULL) + return; + + h5trav_getinfo(fid, info); + printf("%s %s\n",FILE_CONTENTS, BEGIN); + h5trav_printinfo(nobjects,info); + printf(" %s\n",END); + h5trav_freeinfo(info,nobjects); +} + + +/*------------------------------------------------------------------------- * Function: set_output_file * * Purpose: Open fname as the output file for dataset raw data. @@ -2477,6 +3005,13 @@ parse_start: display_bb = TRUE; last_was_dset = FALSE; break; + case 'n': + display_fi = TRUE; + last_was_dset = FALSE; + break; + case 'p': + display_dcpl = TRUE; + break; case 'H': display_data = FALSE; display_attr_data = FALSE; @@ -2892,6 +3427,8 @@ main(int argc, const char *argv[]) goto done; } + + /* start to dump */ if (!doxml) { begin_obj(dump_header_format->filebegin, fname, @@ -2923,8 +3460,19 @@ main(int argc, const char *argv[]) } } - if (display_bb) - dump_bb(); + if (!doxml) + { + if (display_fi) + { + dump_list(fid); + end_obj(dump_header_format->fileend,dump_header_format->fileblockend); + goto done; + } + + if (display_bb) + dump_fcpl(fid); + } + if (display_all) { if ((gid = H5Gopen(fid, "/")) < 0) { @@ -4227,7 +4775,7 @@ xml_dump_dataspace(hid_t space) *------------------------------------------------------------------------- */ static void -xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset) +xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNUSED pindex) { h5dump_t *outputformat = &xml_dataformat; int status = -1; @@ -4356,7 +4904,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) case H5T_OPAQUE: case H5T_ENUM: case H5T_ARRAY: - dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL); + dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL, 0); break; case H5T_TIME: @@ -4376,7 +4924,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) case H5T_COMPOUND: indentation(indent); printf("<!-- Note: format of compound data not specified -->\n"); - dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL); + dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL,0); break; case H5T_REFERENCE: @@ -4399,7 +4947,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) case H5T_VLEN: printf("<!-- Note: format of VL data not specified -->\n"); - dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL); + dump_function_table->dump_data_function(attr_id, ATTRIBUTE_DATA, NULL,0); break; default: indentation(indent); @@ -5044,13 +5592,7 @@ check_filters(hid_t dcpl) indentation(indent + COL); printf("<%sShuffle />",xmlnsprefix); } else if (filter == H5Z_FILTER_SZIP) { -/* 3 private values: can't be set, but can be read. - Note: these are defined in H5Zprivate, they are - duplicated here. - */ -#define H5_SZIP_LSB_OPTION_MASK 8 -#define H5_SZIP_MSB_OPTION_MASK 16 -#define H5_SZIP_RAW_OPTION_MASK 128 + indentation(indent + COL); printf("<%sSZIP ",xmlnsprefix); if (cd_nelmts < 2) { @@ -5096,7 +5638,7 @@ static void xml_dump_fill_value(hid_t dcpl, hid_t type) size_t sz; size_t i; hsize_t space; -void * buf; +void * buf=NULL; char * path; char * name; indent += COL; @@ -5413,7 +5955,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_OPAQUE: case H5T_ENUM: case H5T_ARRAY: - dump_function_table->dump_data_function(did, DATASET_DATA, NULL); + dump_function_table->dump_data_function(did, DATASET_DATA, NULL,0); break; case H5T_TIME: @@ -5432,7 +5974,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_COMPOUND: indentation(indent); printf("<!-- Note: format of compound data not specified -->\n"); - dump_function_table->dump_data_function(did, DATASET_DATA, NULL); + dump_function_table->dump_data_function(did, DATASET_DATA, NULL,0); break; case H5T_REFERENCE: @@ -5455,7 +5997,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_VLEN: printf("<!-- Note: format of VL data not specified -->\n"); - dump_function_table->dump_data_function(did, DATASET_DATA, NULL); + dump_function_table->dump_data_function(did, DATASET_DATA, NULL,0); break; default: indentation(indent); @@ -5596,3 +6138,128 @@ xml_print_enum(hid_t type) free(value); H5Tclose(super); } + + + + + +/*------------------------------------------------------------------------- + * Function: h5_fileaccess + * + * Purpose: Returns a file access template which is the default template + * but with a file driver set according to the constant or + * environment variable HDF5_DRIVER + * + * Return: Success: A file access property list + * + * Failure: -1 + * + * Programmer: Robb Matzke + * Thursday, November 19, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ + + + +static hid_t h5_fileaccess(void) +{ + static const char *multi_letters = "msbrglo"; + + const char *val = NULL; + const char *name; + char s[1024]; + hid_t fapl = -1; + hsize_t fam_size = 100*1024*1024; /*100 MB*/ +#ifdef H5_WANT_H5_V1_4_COMPAT + long verbosity = 1; +#else /* H5_WANT_H5_V1_4_COMPAT */ + long log_flags = H5FD_LOG_LOC_IO; +#endif /* H5_WANT_H5_V1_4_COMPAT */ + H5FD_mem_t mt; + + /* First use the environment variable, then the constant */ + val = HDgetenv("HDF5_DRIVER"); +#ifdef HDF5_DRIVER + if (!val) val = HDF5_DRIVER; +#endif + + if ((fapl=H5Pcreate(H5P_FILE_ACCESS))<0) return -1; + if (!val || !*val) return fapl; /*use default*/ + + HDstrncpy(s, val, sizeof s); + s[sizeof(s)-1] = '\0'; + if (NULL==(name=HDstrtok(s, " \t\n\r"))) return fapl; + + if (!HDstrcmp(name, "sec2")) { + /* Unix read() and write() system calls */ + if (H5Pset_fapl_sec2(fapl)<0) return -1; + } else if (!HDstrcmp(name, "stdio")) { + /* Standard C fread() and fwrite() system calls */ + if (H5Pset_fapl_stdio(fapl)<0) return -1; + } else if (!HDstrcmp(name, "core")) { + /* In-core temporary file with 1MB increment */ + if (H5Pset_fapl_core(fapl, 1024*1024, FALSE)<0) return -1; + } else if (!HDstrcmp(name, "split")) { + /* Split meta data and raw data each using default driver */ + if (H5Pset_fapl_split(fapl, + "-m.h5", H5P_DEFAULT, + "-r.h5", H5P_DEFAULT)<0) + return -1; + } else if (!HDstrcmp(name, "multi")) { + /* Multi-file driver, general case of the split driver */ + H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; + hid_t memb_fapl[H5FD_MEM_NTYPES]; + const char *memb_name[H5FD_MEM_NTYPES]; + char sv[H5FD_MEM_NTYPES][1024]; + haddr_t memb_addr[H5FD_MEM_NTYPES]; + + HDmemset(memb_map, 0, sizeof memb_map); + HDmemset(memb_fapl, 0, sizeof memb_fapl); + HDmemset(memb_name, 0, sizeof memb_name); + HDmemset(memb_addr, 0, sizeof memb_addr); + + assert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES); + for (mt=H5FD_MEM_DEFAULT; mt<H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) { + memb_fapl[mt] = H5P_DEFAULT; + sprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]); + memb_name[mt] = sv[mt]; + memb_addr[mt] = MAX(mt-1,0)*(HADDR_MAX/10); + } + + if (H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, + memb_addr, FALSE)<0) { + return -1; + } + } else if (!HDstrcmp(name, "family")) { + /* Family of files, each 1MB and using the default driver */ + if ((val=HDstrtok(NULL, " \t\n\r"))) { + fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024); + } + if (H5Pset_fapl_family(fapl, fam_size, H5P_DEFAULT)<0) return -1; + } else if (!HDstrcmp(name, "log")) { +#ifdef H5_WANT_H5_V1_4_COMPAT + /* Log file access */ + if ((val = strtok(NULL, " \t\n\r"))) + verbosity = strtol(val, NULL, 0); + + if (H5Pset_fapl_log(fapl, NULL, (int)verbosity) < 0) + return -1; +#else /* H5_WANT_H5_V1_4_COMPAT */ + /* Log file access */ + if ((val = HDstrtok(NULL, " \t\n\r"))) + log_flags = HDstrtol(val, NULL, 0); + + if (H5Pset_fapl_log(fapl, NULL, (unsigned)log_flags, 0) < 0) + return -1; +#endif /* H5_WANT_H5_V1_4_COMPAT */ + } else { + /* Unknown driver */ + return -1; + } + + return fapl; +} + diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index e7f1922..96f3aff 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -4838,7 +4838,6 @@ set_local_myfilter(hid_t dcpl_id, hid_t UNUSED type_id, hid_t UNUSED space_id) *------------------------------------------------------------------------- */ -#if 1 int main(void) { @@ -4903,82 +4902,3 @@ int main(void) return 0; } -#else - -#include <stdio.h> -#include <hdf5.h> - -#define COMMIT_CMPD_DATATYPE 1 - -typedef struct cmpdStruct - { - int a; - int b; - hvl_t string; - } cmpdStruct; - -int main( void ) -{ - hid_t h5File, cmpdType, dataSetID, dataSpaceID; - hsize_t dataSpaceSize; - cmpdStruct myStruct; - herr_t status; - - myStruct.a = 2; - myStruct.b = 6; - myStruct.string.p = (char *)malloc( sizeof(char) * 4 ); - myStruct.string.len = 4; - strcpy( myStruct.string.p, "adsf" ); - - - /* create hdf file */ - h5File = H5Fcreate( "vlen.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT ); - printf ("%i\n", h5File); - - /* create compound datatype */ - cmpdType = H5Tcreate( H5T_COMPOUND, sizeof(cmpdStruct) ); - printf ("%i\n", cmpdType); - status = H5Tinsert( cmpdType, "a", HOFFSET(cmpdStruct, a), H5T_NATIVE_INT ); - printf ("%i\n", status); - status = H5Tinsert( cmpdType, "b", HOFFSET(cmpdStruct, b), H5T_NATIVE_INT ); - printf ("%i\n", status); -/* - status =H5Tinsert( cmpdType, "string", HOFFSET(cmpdStruct, string), - H5Tvlen_create( H5T_NATIVE_CHAR ) ); -*/ - - status =H5Tinsert( cmpdType, "string", HOFFSET(cmpdStruct, string), - H5Tvlen_create( H5T_C_S1 ) ); - - printf ("%i\n", status); - -#if (COMMIT_CMPD_DATATYPE == 1) - /* commit datatype */ - status =H5Tcommit( h5File, "cmpdType", cmpdType ); - printf ("%i\n", status); -#endif - - /* create dataspace ID */ - dataSpaceID = H5Screate_simple( 1, (dataSpaceSize=1, &dataSpaceSize), NULL ); - /* create dataset ID */ - printf ("%i\n", dataSpaceID); - dataSetID = H5Dcreate( h5File, "cmpdStruct", cmpdType, dataSpaceID, H5P_DEFAULT ); - printf ("%i\n", dataSetID); - - /* write dataset */ - status = H5Dwrite( dataSetID, cmpdType, H5S_ALL, H5S_ALL, H5P_DEFAULT, &myStruct ); - printf ("%i\n", status); - - status = H5Tclose (cmpdType); - printf ("%i\n", status); - status = H5Dclose (dataSetID); - printf ("%i\n", status); - status = H5Sclose (dataSpaceID); - printf ("%i\n", status); - status = H5Fclose (h5File); - printf ("%i\n", status); - - return( 0 ); -} - -#endif
\ No newline at end of file diff --git a/tools/h5dump/testh5dump.sh b/tools/h5dump/testh5dump.sh index 78e2f03..2119101 100755 --- a/tools/h5dump/testh5dump.sh +++ b/tools/h5dump/testh5dump.sh @@ -62,8 +62,13 @@ TOOLTEST() { $RUNSERIAL $DUMPER_BIN $@ ) >$actual 2>$actual_err cat $actual_err >> $actual - - if $CMP $expect $actual; then + + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then echo " PASSED" else echo "*FAILED*" @@ -191,6 +196,8 @@ TOOLTEST tchar1.ddl -r tchar.h5 # Missing file name TOOLTEST tnofilename.ddl + + if test $nerrors -eq 0 ; then echo "All $DUMPER tests passed." fi diff --git a/tools/h5dump/testh5dumpxml.sh b/tools/h5dump/testh5dumpxml.sh index d5e3ad5..c6b4c6a 100755 --- a/tools/h5dump/testh5dumpxml.sh +++ b/tools/h5dump/testh5dumpxml.sh @@ -62,8 +62,13 @@ TOOLTEST() { $RUNSERIAL $DUMPER_BIN $@ ) >$actual 2>$actual_err cat $actual_err >> $actual - - if $CMP $expect $actual; then + + + if [ ! -f $expect ]; then + # Create the expect file if it doesn't yet exist. + echo " CREATED" + cp $actual $expect + elif $CMP $expect $actual; then echo " PASSED" else echo "*FAILED*" diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index a84a9b5..e9160ee 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -19,7 +19,7 @@ /*------------------------------------------------------------------------- * Function: h5diff * - * Purpose: public function, can be called in an applicattion program. + * Purpose: public function, can be called in an application program. * return differences between 2 HDF5 files * * Return: Number of differences found; -1 for error. diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 50d17d3..213e9dc 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -43,9 +43,6 @@ #define ALIGN(A,Z) ((((A) + (Z) - 1) / (Z)) * (Z)) -#define START_OF_DATA 0x0001 -#define END_OF_DATA 0x0002 - /* global variables */ int indent; int compound_data; @@ -378,9 +375,9 @@ h5tools_simple_prefix(FILE *stream, const h5dump_t *info, /* Terminate previous line, if any */ if (ctx->cur_column) { - fputs(OPT(info->line_suf, ""), stream); - putc('\n', stream); - fputs(OPT(info->line_sep, ""), stream); + fputs(OPT(info->line_suf, ""), stream); + putc('\n', stream); + fputs(OPT(info->line_sep, ""), stream); } /* Calculate new prefix */ @@ -452,7 +449,7 @@ h5tools_simple_prefix(FILE *stream, const h5dump_t *info, * handled correctly. *------------------------------------------------------------------------- */ -static void +void h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container, h5tools_context_t *ctx/*in,out*/, unsigned flags, hsize_t nelmts, hid_t type, void *_mem) @@ -485,7 +482,8 @@ h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container, for (i = 0; i < nelmts; i++, ctx->cur_elmt++, elmt_counter++) { /* Render the element */ h5tools_str_reset(&buffer); - h5tools_str_sprint(&buffer, info, container, type, mem + i * size, ctx); + + h5tools_str_sprint(&buffer, info, container, type, mem + i * size, ctx); if (i + 1 < nelmts || (flags & END_OF_DATA) == 0) h5tools_str_append(&buffer, "%s", OPT(info->elmt_suf1, ",")); diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index f4fbb3d..c1d231a 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -30,6 +30,8 @@ #define ESCAPE_HTML 1 #define OPT(X,S) ((X) ? (X) : (S)) #define OPTIONAL_LINE_BREAK "\001" /* Special strings embedded in the output */ +#define START_OF_DATA 0x0001 +#define END_OF_DATA 0x0002 /* * Information about how to format output. @@ -104,6 +106,7 @@ typedef struct h5dump_t { * str_repeat: If set to non-zero then any character value repeated N * or more times is printed as 'C'*N * + * * Numeric data is also subject to the formats for individual elements. */ hbool_t raw; @@ -441,7 +444,7 @@ extern FILE *rawdatastream; /*output stream for raw data */ /* taken from h5dump.h*/ #define ATTRIBUTE "ATTRIBUTE" #define BLOCK "BLOCK" -#define BOOT_BLOCK "BOOT_BLOCK" +#define SUPER_BLOCK "SUPER_BLOCK" #define COMPRESSION "COMPRESSION" #define CONCATENATOR "//" #define COMPLEX "COMPLEX" @@ -468,6 +471,22 @@ extern FILE *rawdatastream; /*output stream for raw data */ #define STRSIZE "STRSIZE" #define STRPAD "STRPAD" #define SUBSET "SUBSET" +#define FILTERS "FILTERS" +#define DEFLATE "COMPRESSION DEFLATE" +#define DEFLATE_LEVEL "LEVEL" +#define SHUFFLE "PREPROCESSING SHUFFLE" +#define FLETCHER32 "CHECKSUM FLETCHER32" +#define SZIP "COMPRESSION SZIP" +#define UNKNOWN_FILTER "UNKNOWN_FILTER" +#define STORAGE_LAYOUT "STORAGE_LAYOUT" +#define CONTIGUOUS "CONTIGUOUS" +#define COMPACT "COMPACT" +#define CHUNKED "CHUNKED" +#define EXTERNAL_FILE "EXTERNAL_FILE" +#define FILLVALUE "FILLVALUE" +#define FILE_CONTENTS "FILE_CONTENTS" + + #define BEGIN "{" #define END "}" @@ -481,6 +500,9 @@ extern int h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset hid_t p_typ, struct subset_t *sset, int indentlevel); extern int h5tools_dump_mem(FILE *stream, const h5dump_t *info, hid_t obj_id, hid_t type, hid_t space, void *mem, int indentlevel); +extern void h5tools_dump_simple_data(FILE *stream, const h5dump_t *info, hid_t container, + h5tools_context_t *ctx/*in,out*/, unsigned flags, + hsize_t nelmts, hid_t type, void *_mem); extern int h5tools_canreadf(const char* name, hid_t dcpl_id); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 970a46b..3d9aaf7 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1051,3 +1051,4 @@ h5tools_is_zero(const void *_mem, size_t size) return TRUE; } + diff --git a/tools/testfiles/tvldtypes4.h5.xml b/tools/testfiles/tvldtypes4.h5.xml index 6a31194..f490341 100644 --- a/tools/testfiles/tvldtypes4.h5.xml +++ b/tools/testfiles/tvldtypes4.h5.xml @@ -3,8 +3,8 @@ Expected output for 'h5dump --xml tvldtypes4.h5' ############################# <?xml version="1.0" encoding="UTF-8"?> <hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd"> -<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/"> - <hdf5:Dataset Name="Dataset1" OBJ-XID="xid_976" H5Path= "/Dataset1" Parents="xid_928" H5ParentPaths="/"> +<hdf5:RootGroup OBJ-XID="xid_928-0" H5Path="/"> + <hdf5:Dataset Name="Dataset1" OBJ-XID="xid_976-0" H5Path= "/Dataset1" Parents="xid_928-0" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> diff --git a/tools/testfiles/tvldtypes5.h5.xml b/tools/testfiles/tvldtypes5.h5.xml index f2452a7..ebb3836 100644 --- a/tools/testfiles/tvldtypes5.h5.xml +++ b/tools/testfiles/tvldtypes5.h5.xml @@ -3,8 +3,8 @@ Expected output for 'h5dump --xml tvldtypes5.h5' ############################# <?xml version="1.0" encoding="UTF-8"?> <hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd"> -<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/"> - <hdf5:Dataset Name="Dataset" OBJ-XID="xid_976" H5Path= "/Dataset" Parents="xid_928" H5ParentPaths="/"> +<hdf5:RootGroup OBJ-XID="xid_928-0" H5Path="/"> + <hdf5:Dataset Name="Dataset" OBJ-XID="xid_976-0" H5Path= "/Dataset" Parents="xid_928-0" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> diff --git a/tools/testfiles/tvlstr.h5.xml b/tools/testfiles/tvlstr.h5.xml index 7d9fb5b..1dffb77 100644 --- a/tools/testfiles/tvlstr.h5.xml +++ b/tools/testfiles/tvlstr.h5.xml @@ -3,26 +3,26 @@ Expected output for 'h5dump --xml tvlstr.h5' ############################# <?xml version="1.0" encoding="UTF-8"?> <hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd"> -<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/"> +<hdf5:RootGroup OBJ-XID="xid_928-0" H5Path="/"> <hdf5:Attribute Name="test_scalar"> <hdf5:Dataspace> <hdf5:ScalarDataspace /> </hdf5:Dataspace> - <hdf5:NamedDataTypePtr OBJ-XID="xid_1576" H5Path="/vl_string_type" /> + <hdf5:NamedDataTypePtr OBJ-XID="xid_1576-0" H5Path="/vl_string_type" /> <hdf5:Data> <hdf5:DataFromFile> "This is the string for the attribute" </hdf5:DataFromFile> </hdf5:Data> </hdf5:Attribute> - <hdf5:NamedDataType Name="vl_string_type" OBJ-XID="xid_1576" H5Path="/vl_string_type" Parents="xid_928" H5ParentPaths="/"> + <hdf5:NamedDataType Name="vl_string_type" OBJ-XID="xid_1576-0" H5Path="/vl_string_type" Parents="xid_928-0" H5ParentPaths="/"> <hdf5:DataType> <hdf5:AtomicType> <hdf5:StringType Cset="H5T_CSET_ASCII" StrSize="H5T_VARIABLE" StrPad="H5T_STR_NULLPAD"/> </hdf5:AtomicType> </hdf5:DataType> </hdf5:NamedDataType> - <hdf5:Dataset Name="Dataset1" OBJ-XID="xid_976" H5Path= "/Dataset1" Parents="xid_928" H5ParentPaths="/"> + <hdf5:Dataset Name="Dataset1" OBJ-XID="xid_976-0" H5Path= "/Dataset1" Parents="xid_928-0" H5ParentPaths="/"> <hdf5:StorageLayout> <hdf5:ContiguousLayout/> </hdf5:StorageLayout> |