summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-02-22 17:37:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-02-22 17:37:06 (GMT)
commit85590e85cbe38d4491e4d79e0c277bcfe81b8e4c (patch)
tree683fee796149e590a38d320ebce436416eb28212
parenta4ea00337111da256d250618bd15d84758c94dce (diff)
downloadhdf5-85590e85cbe38d4491e4d79e0c277bcfe81b8e4c.zip
hdf5-85590e85cbe38d4491e4d79e0c277bcfe81b8e4c.tar.gz
hdf5-85590e85cbe38d4491e4d79e0c277bcfe81b8e4c.tar.bz2
HDFFV-10412 merge from develop
-rw-r--r--release_docs/RELEASE.txt12
-rw-r--r--tools/h5repack/h5repack_filters.c38
-rw-r--r--tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl4
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl2
-rw-r--r--tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl2
5 files changed, 35 insertions, 23 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 3ab9fc0..5d01e13 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -169,6 +169,18 @@ Bug Fixes since HDF5-1.8.20
Tools
-----
+ - h5repack
+
+ h5repack changes the chunk parameters when a change of layout is not
+ specified and a filter is applied.
+
+ HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code
+ in the tools library. The check for an existing layout was incorrectly
+ placed into an if block and not executed. The check was moved into
+ the normal path of the function.
+
+ (ADB - 2018/02/21, HDFFV-10412)
+
- h5dump
the tools library will hide the error stack during file open.
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c
index eb8d724..8cc7b92 100644
--- a/tools/h5repack/h5repack_filters.c
+++ b/tools/h5repack/h5repack_filters.c
@@ -277,25 +277,6 @@ int apply_filters(const char* name, /* object name from traverse list */
*has_filter = 1;
if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed");
-
- /*-------------------------------------------------------------------------
- * check if there is an existent chunk
- * read it only if there is not a requested layout
- *-------------------------------------------------------------------------
- */
- if (obj.layout == -1) {
- if ((layout = H5Pget_layout(dcpl_id)) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
-
- if (layout == H5D_CHUNKED) {
- if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
- HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
- obj.layout = H5D_CHUNKED;
- obj.chunk.rank = rank;
- for (i = 0; i < rank; i++)
- obj.chunk.chunk_lengths[i] = chsize[i];
- }
- }
}
else if(nfilters) {
*has_filter = 1;
@@ -304,6 +285,25 @@ int apply_filters(const char* name, /* object name from traverse list */
}
/*-------------------------------------------------------------------------
+ * check if there is an existent chunk
+ * read it only if there is not a requested layout
+ *-------------------------------------------------------------------------
+ */
+ if (obj.layout == -1) {
+ if ((layout = H5Pget_layout(dcpl_id)) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed");
+
+ if (layout == H5D_CHUNKED) {
+ if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0)
+ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed");
+ obj.layout = H5D_CHUNKED;
+ obj.chunk.rank = rank;
+ for (i = 0; i < rank; i++)
+ obj.chunk.chunk_lengths[i] = chsize[i];
+ }
+ }
+
+ /*-------------------------------------------------------------------------
* the type of filter and additional parameter
* type can be one of the filters
* H5Z_FILTER_NONE 0 , uncompress if compressed
diff --git a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
index 1b0b821..80b8a19 100644
--- a/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
+++ b/tools/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl
@@ -76,8 +76,8 @@ GROUP "/" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
- SIZE 1150 (2.783:1 COMPRESSION)
+ CHUNKED ( 20, 10 )
+ SIZE 1283 (2.494:1 COMPRESSION)
}
FILTERS {
COMPRESSION DEFLATE { LEVEL 1 }
diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
index 9e80c72..87b133d 100644
--- a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
+++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl
@@ -92,7 +92,7 @@ GROUP "/" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
+ CHUNKED ( 20, 10 )
SIZE 3200 (1.000:1 COMPRESSION)
}
FILTERS {
diff --git a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
index d582d2d..e8ac9a4 100644
--- a/tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
+++ b/tools/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl
@@ -92,7 +92,7 @@ GROUP "/" {
DATATYPE H5T_STD_I32LE
DATASPACE SIMPLE { ( 40, 20 ) / ( 40, H5S_UNLIMITED ) }
STORAGE_LAYOUT {
- CHUNKED ( 40, 20 )
+ CHUNKED ( 20, 10 )
SIZE 3200 (1.000:1 COMPRESSION)
}
FILTERS {