diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2015-03-06 05:13:47 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2015-03-06 05:13:47 (GMT) |
commit | 76d509dd6f454de8b01d0116dc73e56ea5949aa8 (patch) | |
tree | bd3291ac545e0ab332624aed7b6435899b13d4ef /tools | |
parent | 50c38a5733bf39c2ba2cdb0de4d03e4aa78b1814 (diff) | |
download | hdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.zip hdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.tar.gz hdf5-76d509dd6f454de8b01d0116dc73e56ea5949aa8.tar.bz2 |
[svn-r26378] Bring revisions #26220 - #26324 from trunk to revise_chunks. h5committested.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5copy/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5diff/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5dump/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5import/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5jam/Makefile.in | 6 | ||||
-rw-r--r-- | tools/h5ls/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5repack/Makefile.in | 4 | ||||
-rw-r--r-- | tools/h5stat/Makefile.in | 4 | ||||
-rw-r--r-- | tools/lib/Makefile.in | 4 | ||||
-rw-r--r-- | tools/lib/h5tools_dump.c | 430 | ||||
-rw-r--r-- | tools/misc/Makefile.in | 4 | ||||
-rw-r--r-- | tools/perform/Makefile.in | 4 | ||||
-rw-r--r-- | tools/perform/perf.c | 2 | ||||
-rw-r--r-- | tools/perform/sio_standalone.h | 1 |
15 files changed, 215 insertions, 268 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in index ef0d6ab..4bd80af 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -662,8 +662,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 CONFIG = ordered # All subdirectories diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 2cb3a1e..e9a5e62 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -670,11 +670,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 # Test programs and scripts TEST_PROG = h5copygentest diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 860590c..29543a4 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -677,11 +677,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5diff. They should # be copied to the testfiles/ directory if update is required -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 expect_sorted \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 expect_sorted \ actual_sorted # Always build and test h5diff but build and test ph5diff only if parallel diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 287713d..fb8cc9b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -676,11 +676,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin # Test programs and scripts TEST_PROG = h5dumpgentest diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 7b9eadc..ed26aab 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -670,10 +670,10 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files from h5importtest -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.bin +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.bin # Test programs and scripts TEST_PROG = h5importtest diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 4c40784..855b708 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -682,12 +682,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by jamgentest. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 testfiles/h5jam-*-sav \ - testfiles/h5unjam-*-sav +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ + testfiles/h5jam-*-sav testfiles/h5unjam-*-sav TEST_SCRIPT = testh5jam.sh # Add h5jam and h5unjam specific linker flags here diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index bd1244c..0a33e29 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -662,8 +662,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Test programs and scripts TEST_SCRIPT = testh5ls.sh diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 9edb827..698b8a3 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -694,11 +694,11 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin \ testfiles/h5diff_attr1.h5 testfiles/tfamily*.h5 # Test programs and scripts diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 9e9a6aa..993a226 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -672,12 +672,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repart_gentest. They should # copied to the testfiles/ directory if update is required. fst_family*.h5 # and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 #test script and program diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 26e88ee..607f1ed 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -659,8 +659,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # This is our main target, the h5tools library. noinst_LTLIBRARIES = libh5tools.la diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 3981b1e..c00f45b 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -2472,7 +2472,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_ /* Close array base type */ if(H5Tclose(super) < 0) HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed"); - } + } else HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed"); @@ -2846,17 +2846,13 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, } + /*------------------------------------------------------------------------- * Function: dump_fill_value * * Purpose: prints the fill value * * Return: void - * - * Programmer: pvn - * - * Modifications: - * *------------------------------------------------------------------------- */ void @@ -2887,15 +2883,11 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t * Purpose: prints several dataset create property list properties * * Return: void - * - * Modifications: pvn, March 28, 2008 - * Add a COMPRESSION ratio information for cases when filters are present - * *------------------------------------------------------------------------- */ void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx, hid_t dcpl_id,hid_t type_id, hid_t obj_id) + h5tools_context_t *ctx, hid_t dcpl_id, hid_t type_id, hid_t obj_id) { int nfilters; /* number of filters */ int rank; /* rank */ @@ -2909,16 +2901,18 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, H5D_fill_value_t fvstatus; H5D_alloc_time_t at; H5D_fill_time_t ft; - size_t ncols = 80; /* available output width */ + H5D_layout_t stl; + size_t ncols = 80; /* available output width */ size_t cd_nelmts; /* filter client number of values */ off_t offset; /* offset of external file */ char f_name[256]; /* filter name */ - char name[256]; /* external file name */ + char name[256]; /* external or virtual file name */ + char dsetname[256]; /* virtual datset name */ hsize_t chsize[64]; /* chunk size in elements */ hsize_t size; /* size of external file */ hsize_t storage_size; - hsize_t curr_pos = 0; /* total data element position */ - h5tools_str_t buffer; /* string into which to render */ + hsize_t curr_pos = 0; /* total data element position */ + h5tools_str_t buffer; /* string into which to render */ /* setup */ HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -2940,216 +2934,172 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - if(H5D_CHUNKED == H5Pget_layout(dcpl_id)) { - ctx->indent_level++; + ctx->indent_level++; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s ", CHUNKED); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - rank = H5Pget_chunk(dcpl_id,(int)NELMTS(chsize),chsize); - h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]); - for(i = 1; i < rank; i++) - h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]); - h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + stl = H5Pget_layout(dcpl_id); + switch (stl) { + case H5D_CHUNKED: + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s ", CHUNKED); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); + rank = H5Pget_chunk(dcpl_id, (int) NELMTS(chsize), chsize); + h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]); + for(i = 1; i < rank; i++) + h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]); + h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - /* if there are filters, print a compression ratio */ - if(nfilters) { - hsize_t dims[H5S_MAX_RANK]; - hsize_t nelmts = 1; - double ratio = 0; - int ok = 0; - - hid_t tid = H5Dget_type(obj_id); - hid_t sid = H5Dget_space(obj_id); - size_t datum_size = H5Tget_size(tid); - int ndims = H5Sget_simple_extent_dims(sid, dims, NULL); - - /* only print the compression ratio for these filters */ - for(i = 0; i < nfilters && !ok; i++) { - cd_nelmts = NELMTS(cd_values); - filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, - cd_values, sizeof(f_name), f_name, NULL); - ok = (filtn>=0); - - /* this following code will not show compression ratio for - user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org - switch(filtn) { - case H5Z_FILTER_DEFLATE: - case H5Z_FILTER_SZIP: - case H5Z_FILTER_NBIT: - case H5Z_FILTER_SCALEOFFSET: - ok = 1; - break; - } - */ - } + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - if(ndims && ok) { - hsize_t uncomp_size; + h5tools_str_reset(&buffer); - for(i = 0; i < ndims; i++) { - nelmts *= dims[i]; + /* if there are filters, print a compression ratio */ + if (nfilters) { + hsize_t dims[H5S_MAX_RANK]; + hsize_t nelmts = 1; + double ratio = 0; + int ok = 0; + + hid_t tid = H5Dget_type(obj_id); + hid_t sid = H5Dget_space(obj_id); + size_t datum_size = H5Tget_size(tid); + int ndims = H5Sget_simple_extent_dims(sid, dims, NULL); + + /* only print the compression ratio for these filters */ + for (i = 0; i < nfilters && !ok; i++) { + cd_nelmts = NELMTS(cd_values); + filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), + f_name, NULL); + ok = (filtn >= 0); } - uncomp_size = nelmts * datum_size; - /* compression ratio = uncompressed size / compressed size */ + if(ndims && ok) { + hsize_t uncomp_size; - if(storage_size != 0) - ratio = (double) uncomp_size / (double) storage_size; + for(i = 0; i < ndims; i++) { + nelmts *= dims[i]; + } + uncomp_size = nelmts * datum_size; - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio); + /* compression ratio = uncompressed size / compressed size */ - } - else - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + if(storage_size != 0) + ratio = (double) uncomp_size / (double) storage_size; - H5Sclose(sid); - H5Tclose(tid); + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio); - } - else { - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - } - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + } + else + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - ctx->indent_level--; + H5Sclose(sid); + H5Tclose(tid); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - else if(H5D_COMPACT == H5Pget_layout(dcpl_id)) { - ctx->indent_level++; + } + else { + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + } + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + break; + case H5D_COMPACT: + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", COMPACT); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", COMPACT); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + break; + case H5D_CONTIGUOUS: + { + int next; - ctx->indent_level--; + next = H5Pget_external_count(dcpl_id); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - else if(H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) { - int next; + /*------------------------------------------------------------------------- + * EXTERNAL_FILE + *------------------------------------------------------------------------- + */ + if (next) { + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", CONTIGUOUS); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - next = H5Pget_external_count(dcpl_id); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - /*------------------------------------------------------------------------- - * EXTERNAL_FILE - *------------------------------------------------------------------------- - */ - if(next) { - ctx->indent_level++; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", CONTIGUOUS); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->indent_level++; + for (j = 0; j < (unsigned) next; j++) { + H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->indent_level++; - for(j = 0; j < (unsigned)next; j++) { - H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size); + h5tools_str_append(&buffer, " OFFSET %ld", offset); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + ctx->indent_level--; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size); - h5tools_str_append(&buffer, " OFFSET %ld", offset); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - ctx->indent_level--; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + else { + haddr_t ioffset; - ctx->indent_level--; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", CONTIGUOUS); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - else { - haddr_t ioffset; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->indent_level++; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s", CONTIGUOUS); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - + h5tools_str_reset(&buffer); + ioffset = H5Dget_offset(obj_id); + h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + } + } + break; + default: h5tools_str_reset(&buffer); - h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_append(&buffer, "%s", "Unknown layout"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0); + }/*switch*/ - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - ioffset = H5Dget_offset(obj_id); - h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->indent_level--; - ctx->indent_level--; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - } - /*------------------------------------------------------------------------- + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + /*------------------------------------------------------------------------- * FILTERS *------------------------------------------------------------------------- */ @@ -3169,7 +3119,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name), f_name, NULL); - if (filtn<0) + if (filtn < 0) continue; /* nothing to print for invalid filter */ ctx->need_prefix = TRUE; @@ -3190,70 +3140,68 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; case H5Z_FILTER_SZIP: - { - szip_options_mask = cd_values[0];; - szip_pixels_per_block = cd_values[1]; + szip_options_mask = cd_values[0];; + szip_pixels_per_block = cd_values[1]; - h5tools_str_append(&buffer, "%s %s",SZIP, BEGIN); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_append(&buffer, "%s %s", SZIP, BEGIN); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->indent_level++; + ctx->indent_level++; - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) - h5tools_str_append(&buffer, "MODE %s", "HARDWARE"); - else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK) - h5tools_str_append(&buffer, "MODE %s", "K13"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_EC_OPTION_MASK) - h5tools_str_append(&buffer, "CODING %s", "ENTROPY"); - else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK) - h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK) - h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB"); - else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK) - h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK) + h5tools_str_append(&buffer, "MODE %s", "HARDWARE"); + else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK) + h5tools_str_append(&buffer, "MODE %s", "K13"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { - ctx->need_prefix = TRUE; - h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); - - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "HEADER %s", "RAW"); - h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_EC_OPTION_MASK) + h5tools_str_append(&buffer, "CODING %s", "ENTROPY"); + else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK) + h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - ctx->indent_level--; + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + h5tools_str_reset(&buffer); + if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK) + h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB"); + else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK) + h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB"); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + + if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) { ctx->need_prefix = TRUE; h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "%s",END); + h5tools_str_append(&buffer, "HEADER %s", "RAW"); h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); } + + ctx->indent_level--; + + ctx->need_prefix = TRUE; + h5tools_simple_prefix(stream, info, ctx, curr_pos, 0); + + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "%s", END); + h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; case H5Z_FILTER_NBIT: h5tools_str_append(&buffer, "%s", NBIT); @@ -3264,7 +3212,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); break; default: - /* filter do not have to be avaiable for showing registered filter info. + /* filters do not have to be available for showing registered filter info. see HDFFV-8346 for details. --xcao@hdfgroup.org if(H5Zfilter_avail(filtn)) h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN); diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 06396f8..e11838f 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -697,12 +697,12 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. +# *.clog and *.clog2 are from the MPE option. # Temporary files. *.h5 are generated by h5repart_gentest. They should # copied to the testfiles/ directory if update is required. fst_family*.h5 # and scd_family*.h5 were created by setting the HDF5_NOCLEANUP variable. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 \ +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 \ ../testfiles/fst_family*.h5 ../testfiles/scd_family*.h5 #test script and program diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 728ce45..1f903c5 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -701,8 +701,8 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. -# *.clog are from the MPE option. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog +# *.clog and *.clog2 are from the MPE option. +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 # Add h5perf and h5perf_serial specific linker flags here h5perf_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) diff --git a/tools/perform/perf.c b/tools/perform/perf.c index 7d329f0..1bd33b6 100644 --- a/tools/perform/perf.c +++ b/tools/perform/perf.c @@ -390,7 +390,7 @@ die_jar_jar_die: free(tmp); if (opt_correct) free(tmp2); - + MPI_Finalize(); return(0); diff --git a/tools/perform/sio_standalone.h b/tools/perform/sio_standalone.h index b2f8220..4eb1ded 100644 --- a/tools/perform/sio_standalone.h +++ b/tools/perform/sio_standalone.h @@ -87,7 +87,6 @@ #define HDatof(S) atof(S) #define HDatoi(S) atoi(S) #define HDatol(S) atol(S) -#define HDBSDgettimeofday(S,P) BSDgettimeofday(S,P) #define HDbsearch(K,B,N,Z,F) bsearch(K,B,N,Z,F) #define HDcalloc(N,Z) calloc(N,Z) #define HDceil(X) ceil(X) |