diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-03-27 20:09:01 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2006-03-27 20:09:01 (GMT) |
commit | 26e1b18a578af61b491ff47a32779507df77a6ff (patch) | |
tree | 7ed5546454ffd360082b8ab2da1b7f85677cb3c0 /tools/h5repack/h5repack_filters.c | |
parent | 983e043587f221bc2d0ebc17e403f8f61f438dfd (diff) | |
download | hdf5-26e1b18a578af61b491ff47a32779507df77a6ff.zip hdf5-26e1b18a578af61b491ff47a32779507df77a6ff.tar.gz hdf5-26e1b18a578af61b491ff47a32779507df77a6ff.tar.bz2 |
[svn-r12159] Purpose:
bug fix
Description:
h5repack was not dealing with family files
Solution:
use the toolslib function h5tools_open to open the file instead of H5Fopen in h5repack
Platforms tested:
linux
solaris
AIX
Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_filters.c')
-rw-r--r-- | tools/h5repack/h5repack_filters.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 1f4c2d7..a96d5be 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -201,24 +201,25 @@ int apply_filters(const char* name, /* object name from traverse list */ int i; pack_info_t obj; - if (rank==0) goto out; - /*------------------------------------------------------------------------- - * initialize the assigment object - *------------------------------------------------------------------------- +/*------------------------------------------------------------------------- + * initialize the assigment object + *------------------------------------------------------------------------- */ init_packobject(&obj); - - /*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- * find options *------------------------------------------------------------------------- */ if (aux_assign_obj(name,options,&obj)==0) return 0; + /* get information about input filters */ + if ((nfilters = H5Pget_nfilters(dcpl_id))<0) + return -1; /* check for datasets too small */ if ((size=H5Tget_size(type_id))==0) @@ -228,21 +229,18 @@ int apply_filters(const char* name, /* object name from traverse list */ nelmts*=dims[i]; if (nelmts*size < options->threshold ) { - if (options->verbose) + if (nfilters && options->verbose) printf("Warning: Filter not applied to <%s>. Dataset smaller than <%d> bytes\n", name,(int)options->threshold); return 0; } - - /* get information about input filters */ - if ((nfilters = H5Pget_nfilters(dcpl_id))<0) - return -1; - /*------------------------------------------------------------------------- + + /*------------------------------------------------------------------------- * check if we have filters in the pipeline * we want to replace them with the input filters * only remove if we are inserting new ones *------------------------------------------------------------------------- - */ + */ if (nfilters && obj.nfilters ) { if (H5Premove_filter(dcpl_id,H5Z_FILTER_ALL)<0) return -1; |