diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-12-12 15:32:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 15:32:38 (GMT) |
commit | 1dae8c805c61039b7f0c53021d0b828026077eba (patch) | |
tree | e4abb79b874f17777edd6694d5ca1c5d8aa756cd /tools/src | |
parent | 1da36c90b636f6cd1889338a61602582e5187f00 (diff) | |
download | hdf5-1dae8c805c61039b7f0c53021d0b828026077eba.zip hdf5-1dae8c805c61039b7f0c53021d0b828026077eba.tar.gz hdf5-1dae8c805c61039b7f0c53021d0b828026077eba.tar.bz2 |
1.12 h5repack should only print if verbose (#2274)
* h5repack should only print if verbose
Also chage dump test to use long option
* Add note
* Update yaml workflows
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5repack/h5repack_copy.c | 62 |
1 files changed, 36 insertions, 26 deletions
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c index d8a9e15..f3ab22e 100644 --- a/tools/src/h5repack/h5repack_copy.c +++ b/tools/src/h5repack/h5repack_copy.c @@ -666,15 +666,17 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ - if (options->verbose == 2) { - HDprintf("-----------------------------------------------------------------\n"); - HDprintf(" Type Filter (Compression) Timing read/write Name\n"); - HDprintf("-----------------------------------------------------------------\n"); - } - else { - HDprintf("-----------------------------------------\n"); - HDprintf(" Type Filter (Compression) Name\n"); - HDprintf("-----------------------------------------\n"); + if (options->verbose > 0) { + if (options->verbose == 2) { + HDprintf("-----------------------------------------------------------------\n"); + HDprintf(" Type Filter (Compression) Timing read/write Name\n"); + HDprintf("-----------------------------------------------------------------\n"); + } + else { + HDprintf("-----------------------------------------\n"); + HDprintf(" Type Filter (Compression) Name\n"); + HDprintf("-----------------------------------------\n"); + } } if (travt->objs) { @@ -692,10 +694,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ case H5TRAV_TYPE_GROUP: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "group", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "group", travt->objs[i].name); + } /* open input group */ if ((grp_in = H5Gopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) @@ -1199,7 +1203,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti if (options->verbose > 0) { double ratio = 0; - /* only print the compression ration if there was a filter request */ + /* only print the compression ratio if there was a filter request */ if (apply_s && apply_f && req_filter) { /* get the storage size of the output dataset */ dsize_out = H5Dget_storage_size(dset_out); @@ -1305,10 +1309,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti if (H5Dclose(dset_out) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Dclose failed"); - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name); + } } /* end whether we have request for filter/chunking */ @@ -1320,10 +1326,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti *------------------------------------------------------------------------- */ case H5TRAV_TYPE_NAMED_DATATYPE: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "type", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "type", travt->objs[i].name); + } if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0) H5TOOLS_GOTO_ERROR((-1), "H5Topen2 failed"); @@ -1362,10 +1370,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti */ case H5TRAV_TYPE_LINK: case H5TRAV_TYPE_UDLINK: - if (options->verbose == 2) - HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name); - else - HDprintf(FORMAT_OBJ, "link", travt->objs[i].name); + if (options->verbose > 0) { + if (options->verbose == 2) + HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name); + else + HDprintf(FORMAT_OBJ, "link", travt->objs[i].name); + } /* Check -X option. */ if (options->merge) { |