summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_filters.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-02-23 16:52:45 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-02-23 16:52:45 (GMT)
commitf29e2a01e35e466fdcc292a0c443265efdf4b025 (patch)
treeea6ae0ace8c1cf49c0fe8b9c493120e71cc001d1 /tools/h5repack/h5repack_filters.c
parentfe388e2c1303c515f36b9a595a2820db950b9413 (diff)
downloadhdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.zip
hdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.tar.gz
hdf5-f29e2a01e35e466fdcc292a0c443265efdf4b025.tar.bz2
[svn-r8218] Purpose:
bug fix in H5Zshuffle.c add more tests to h5repack that exposed the bug Description: when creating a dataset with the shuffle filter and duplicating it in a new dataset (file) the call to H5Z_set_local_shuffle failed. this is because the value of cd_nelmts of the filter structure is set to 1 (H5Z_SHUFFLE_TOTAL_NPARMS) when the original dataset is created, but when the new dataset is created there is a checking instruction that fails if the value of cd_nelmts is not 0 (its original value, H5Z_SHUFFLE_USER_NPARMS) Solution: just remove that check condition, since the value of cd_nelmts is not used anyway. if we decide that the value of cd_nelmts is necessary, then the H5O_pline_copy function must be changed to update this value (a different update for each filter) Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_filters.c')
-rw-r--r--tools/h5repack/h5repack_filters.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index 9a91679..ab592a0 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -149,44 +149,23 @@ int apply_filters(const char* name, /* object name from traverse list */
name,options->threshold);
return 0;
}
-
/* get information about input filters */
if ((nfilters = H5Pget_nfilters(dcpl_id))<0)
return -1;
-
-/*-------------------------------------------------------------------------
- * check if we have the H5Z_FILTER_NONE filter
- * if so, just delete all filters from the DCPL and exit
- *-------------------------------------------------------------------------
- */
-
- for ( i=0; i<obj->nfilters; i++)
- {
- if (obj->filter[i].filtn==H5Z_FILTER_NONE)
- {
- if (nfilters && H5Premove_filter(dcpl_id,H5Z_FILTER_NONE)<0)
- return -1;
- return 0;
- }
- }
-
/*-------------------------------------------------------------------------
* check if we have filters in the pipeline
* we want to replace them with the input filters
*-------------------------------------------------------------------------
*/
-
if (nfilters) {
if (H5Premove_filter(dcpl_id,H5Z_FILTER_ALL)<0)
return -1;
}
-
/*-------------------------------------------------------------------------
* filters require CHUNK layout; if we do not have one define a default
*-------------------------------------------------------------------------
*/
-
if (obj->chunk.rank<=0)
{
obj->chunk.rank=rank;
@@ -204,7 +183,6 @@ int apply_filters(const char* name, /* object name from traverse list */
* H5Z_FILTER_SZIP 4 , szip compression
*-------------------------------------------------------------------------
*/
-
for ( i=0; i<obj->nfilters; i++)
{
switch (obj->filter[i].filtn)