summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-04-06 21:14:01 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-04-06 21:14:01 (GMT)
commite6310e08692c631e95a9d827a0f7ec0ddf12d82a (patch)
tree75d57db2b33100f5e22e479c49c63503cb841b60 /tools/h5repack
parentaabcaea388957914df5f506399c43b5d994e7a3b (diff)
downloadhdf5-e6310e08692c631e95a9d827a0f7ec0ddf12d82a.zip
hdf5-e6310e08692c631e95a9d827a0f7ec0ddf12d82a.tar.gz
hdf5-e6310e08692c631e95a9d827a0f7ec0ddf12d82a.tar.bz2
[svn-r12208] Purpose:
new feature Description: some more formatting for the new printout of compression ratios Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/h5repack.h3
-rw-r--r--tools/h5repack/h5repack_copy.c10
-rw-r--r--tools/h5repack/h5repack_filters.c12
-rw-r--r--tools/h5repack/h5repack_list.c2
4 files changed, 19 insertions, 8 deletions
diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h
index e835b66..c4e70db 100644
--- a/tools/h5repack/h5repack.h
+++ b/tools/h5repack/h5repack.h
@@ -185,7 +185,8 @@ int apply_filters(const char* name, /* object name from traverse list */
hsize_t *dims, /* dimensions of dataset */
hid_t dcpl_id, /* dataset creation property list */
hid_t type_id, /* datatype */
- pack_opt_t *options); /* repack options */
+ pack_opt_t *options, /* repack options */
+ int *apply_f);
int has_filter(hid_t dcpl_id,
H5Z_filter_t filtnin);
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 82553d5..666a7fa 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -375,7 +375,7 @@ int do_copy_objects(hid_t fidin,
goto error;
if (next)
- fprintf(stderr,"warning: <%s> has external files, ignoring read...\n",
+ fprintf(stderr," <warning: %s has external files, ignoring read...>\n",
travt->objs[i].name );
/*-------------------------------------------------------------------------
@@ -387,6 +387,8 @@ int do_copy_objects(hid_t fidin,
*/
if (next==0 && h5tools_canreadf((travt->objs[i].name),dcpl_id)==1)
{
+ apply_s=1;
+ apply_f=1;
/*-------------------------------------------------------------------------
* references are a special case
@@ -417,7 +419,7 @@ int do_copy_objects(hid_t fidin,
* check for datasets too small
*-------------------------------------------------------------------------
*/
- apply_s=1;
+
if (nelmts*msize < options->threshold )
apply_s=0;
@@ -426,7 +428,7 @@ int do_copy_objects(hid_t fidin,
*-------------------------------------------------------------------------
*/
if (apply_s){
- if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,mtype_id,options)<0)
+ if (apply_filters(travt->objs[i].name,rank,dims,dcpl_out,mtype_id,options,&apply_f)<0)
goto error;
}
@@ -443,7 +445,7 @@ int do_copy_objects(hid_t fidin,
dset_out=H5Dcreate(fidout,travt->objs[i].name,mtype_id,space_id,dcpl_out);
} H5E_END_TRY;
- apply_f=1;
+
if (dset_out==FAIL)
{
if ((dset_out=H5Dcreate(fidout,travt->objs[i].name,mtype_id,space_id,dcpl_id))<0)
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index 1cd6955..a3ba70d 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -191,7 +191,8 @@ int apply_filters(const char* name, /* object name from traverse list */
hsize_t *dims, /* dimensions of dataset */
hid_t dcpl_id, /* dataset creation property list */
hid_t type_id, /* dataset datatype */
- pack_opt_t *options) /* repack options */
+ pack_opt_t *options, /* repack options */
+ int *apply_f)
{
int nfilters; /* number of filters in DCPL */
hsize_t chsize[64]; /* chunk size in elements */
@@ -199,6 +200,12 @@ int apply_filters(const char* name, /* object name from traverse list */
int i;
pack_info_t obj;
+ if (rank==0)
+ {
+ *apply_f=0;
+ return 0;
+ }
+
/*-------------------------------------------------------------------------
* initialize the assigment object
*-------------------------------------------------------------------------
@@ -400,7 +407,6 @@ int apply_filters(const char* name, /* object name from traverse list */
}
return 0;
-
}
@@ -466,6 +472,8 @@ int print_filters(hid_t dcpl_id)
}
return 0;
+
+
}
diff --git a/tools/h5repack/h5repack_list.c b/tools/h5repack/h5repack_list.c
index 7831380..f2eb2c9 100644
--- a/tools/h5repack/h5repack_list.c
+++ b/tools/h5repack/h5repack_list.c
@@ -133,7 +133,7 @@ int check_objects(const char* fname,
if (csize < ppb )
{
- printf("warning: SZIP settins, chunk size is smaller than pixels per block...Exiting\n");
+ printf(" <warning: SZIP settins, chunk size is smaller than pixels per block>\n");
goto out;
}