summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/testh5repack_main.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
commit4cb6c01d7f59be968649e36a61346be044f76345 (patch)
treee0a0b81e542768b75d5bbb2de8afc1abfb8c4370 /tools/h5repack/testh5repack_main.c
parent00909f278d64017c21c8348537231daba97be9dd (diff)
downloadhdf5-4cb6c01d7f59be968649e36a61346be044f76345.zip
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.gz
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.bz2
[svn-r8904] Purpose:
h5diff and h5repack changes Description: h5diff introduced the following four modes of output: Normal mode: print the number of differences found and where they occured Report mode: print the above plus the differences Verbose mode: print the above plus a list of objects and warnings Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) h5repack added an extra parameter for SZIP filter (coding method) the new syntax is -f SZIP=<pixels per block,coding> (pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN') Example of use: ./h5repack -i file1 -o file2 -f SZIP=8,NN -v updated usage messages, test scripts and files accordingly Solution: Platforms tested: linux AIX solaris Misc. update:
Diffstat (limited to 'tools/h5repack/testh5repack_main.c')
-rw-r--r--tools/h5repack/testh5repack_main.c73
1 files changed, 41 insertions, 32 deletions
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c
index 0c976f4..af19db2 100644
--- a/tools/h5repack/testh5repack_main.c
+++ b/tools/h5repack/testh5repack_main.c
@@ -29,7 +29,7 @@
* Return: Success: zero
* Failure: non-zero
*
- * Programmer: <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
* January, 6, 2004
*
*-------------------------------------------------------------------------
@@ -58,7 +58,7 @@ int main (void)
* it returns RET==0 if the objects have the same data
*-------------------------------------------------------------------------
*/
-
+
/*-------------------------------------------------------------------------
* file with all kinds of dataset datatypes
*-------------------------------------------------------------------------
@@ -178,7 +178,7 @@ int main (void)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("GZIP=9",&pack_options)<0)
+ if (h5repack_addfilter("GZIP=1",&pack_options)<0)
TEST_ERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
@@ -212,7 +212,7 @@ int main (void)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("dset2:SZIP=8",&pack_options)<0)
+ if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options)<0)
TEST_ERROR;
if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0)
TEST_ERROR;
@@ -240,7 +240,7 @@ TESTING(" adding szip filter to all");
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("SZIP=8",&pack_options)<0)
+ if (h5repack_addfilter("SZIP=8,NN",&pack_options)<0)
TEST_ERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
TEST_ERROR;
@@ -399,8 +399,8 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
#endif
-#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
- if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0)
+#if defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP)
+ if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options)<0)
TEST_ERROR;
#endif
@@ -409,7 +409,6 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
#endif
-
if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
TEST_ERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) == 1)
@@ -902,21 +901,26 @@ TESTING(" addding shuffle filter to all");
SKIPPED();
#endif
-
/*-------------------------------------------------------------------------
- * test the NONE global option
+ * file with all filters
+ * dset_all
+ * dset_deflate
+ * dset_szip
+ * dset_shuffle
+ * dset_fletcher32
*-------------------------------------------------------------------------
*/
+
- TESTING(" removing all filters");
+ TESTING(" filter conversion from deflate to szip");
#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("NONE",&pack_options)<0)
+ if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options)<0)
TEST_ERROR;
if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0)
TEST_ERROR;
@@ -931,54 +935,59 @@ TESTING(" addding shuffle filter to all");
#else
SKIPPED();
#endif
-
- TESTING(" filter conversion from deflate to szip");
-/*-------------------------------------------------------------------------
- * filter conversion from deflate to szip
- *-------------------------------------------------------------------------
- */
-#if (defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP)) && defined(H5_HAVE_FILTER_DEFLATE)
+
+ TESTING(" filter conversion from szip to deflate");
+
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
+ && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("dset_deflate:SZIP=8",&pack_options)<0)
+ if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME8,FNAME8OUT,&pack_options)<0)
+ if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0)
TEST_ERROR;
- if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1)
+ if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
+
PASSED();
#else
SKIPPED();
#endif
- TESTING(" filter conversion from szip to deflate");
+
/*-------------------------------------------------------------------------
- * filter conversion from szip to deflate
+ * test the NONE global option
*-------------------------------------------------------------------------
*/
-#if (defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP)) && defined(H5_HAVE_FILTER_DEFLATE)
+
+ TESTING(" removing all filters");
+
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \
+ && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
- if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
+ if (h5repack_addfilter("NONE",&pack_options)<0)
TEST_ERROR;
- if (h5repack(FNAME7,FNAME7OUT,&pack_options)<0)
+ if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0)
TEST_ERROR;
- if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1)
+ if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1)
TEST_ERROR;
- if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
+
PASSED();
#else
SKIPPED();
#endif
-
-
+
/*-------------------------------------------------------------------------
* end