summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/testh5repack_main.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2004-07-01 17:38:04 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2004-07-01 17:38:04 (GMT)
commiteab58732d86e9219fa9f41f9ab2e30fae94e4a7d (patch)
tree333b5f2c50c267c14611e042724a7f28d5156ab7 /tools/h5repack/testh5repack_main.c
parent3f500747fa0f4379e8e03b82f6d679628d55a8c3 (diff)
downloadhdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.zip
hdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.tar.gz
hdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.tar.bz2
[svn-r8781]
Purpose: HDF5 now supports SZIP with no encoder. Description: SZIP can be configured to have both encoder and decoder or just to have the decoder. HDF5 can now query the configuration of any filter, and will throw errors if users try to write using a filter with encoding disabled. Solution: Added H5Zget_filter_info function, changed API for H5Pget_filter and H5P_get_filter_by_id. See SZIP RFC. Platforms tested: Copper (fortran, C++, parallel), Sleipnir (C++), Arabica (fortran, C++), Verbena (fortran, C++) Misc. update:
Diffstat (limited to 'tools/h5repack/testh5repack_main.c')
-rw-r--r--tools/h5repack/testh5repack_main.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c
index ddecd98..4c0a8c5 100644
--- a/tools/h5repack/testh5repack_main.c
+++ b/tools/h5repack/testh5repack_main.c
@@ -203,7 +203,8 @@ int main (void)
TESTING(" removing szip filter");
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options)<0)
@@ -216,7 +217,6 @@ int main (void)
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
-
PASSED();
#else
SKIPPED();
@@ -330,12 +330,11 @@ int main (void)
TESTING(" adding szip filter");
-#ifdef H5_HAVE_FILTER_SZIP
-
/*-------------------------------------------------------------------------
* test an individual object option
*-------------------------------------------------------------------------
*/
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
@@ -364,7 +363,7 @@ int main (void)
*/
TESTING(" adding szip filter to all");
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
@@ -379,7 +378,8 @@ TESTING(" adding szip filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
- PASSED();
+ PASSED();
+
#else
SKIPPED();
#endif
@@ -522,8 +522,10 @@ TESTING(" addding shuffle filter to all");
#endif
if (h5repack_addfilter("dset1:SHUF",&pack_options)<0)
TEST_ERROR;
- if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0)
- TEST_ERROR;
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+ if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0)
+ TEST_ERROR;
+#endif
if (h5repack_addfilter("dset1:GZIP=1",&pack_options)<0)
TEST_ERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
@@ -542,7 +544,7 @@ TESTING(" addding shuffle filter to all");
* filter conversion from deflate to szip
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_DEFLATE
+#if defined(H5_HAVE_FILTER_DEFLATE) && defined(H5_HAVE_FILTER_SZIP) && defined(H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_gzip:SZIP=8",&pack_options)<0)
@@ -556,16 +558,18 @@ TESTING(" addding shuffle filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
PASSED();
-#else
+#else
SKIPPED();
-#endif
+#endif
+
TESTING(" filter conversion from szip to deflate");
/*-------------------------------------------------------------------------
* filter conversion from szip to deflate
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
@@ -579,6 +583,7 @@ TESTING(" addding shuffle filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
PASSED();
+
#else
SKIPPED();
#endif
@@ -588,7 +593,8 @@ TESTING(" addding shuffle filter to all");
* filter conversion from szip to deflate
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_all:GZIP=1",&pack_options)<0)
@@ -601,7 +607,7 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
- PASSED();
+ PASSED();
#else
SKIPPED();
#endif