summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-04-21 02:52:07 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-04-21 02:52:07 (GMT)
commit3f36df51d845a93e94fff264fa22ad60a71db754 (patch)
tree0183dbf4cf0e6fa3020c51c019c09023a5e48a99 /tools/h5repack
parent76d509dd6f454de8b01d0116dc73e56ea5949aa8 (diff)
downloadhdf5-3f36df51d845a93e94fff264fa22ad60a71db754.zip
hdf5-3f36df51d845a93e94fff264fa22ad60a71db754.tar.gz
hdf5-3f36df51d845a93e94fff264fa22ad60a71db754.tar.bz2
[svn-r26859] Bring revisions #26324 - #26843 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/Makefile.in5
-rw-r--r--tools/h5repack/h5repack.sh.in94
-rw-r--r--tools/h5repack/h5repacktst.c107
3 files changed, 28 insertions, 178 deletions
diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in
index 698b8a3..43fe5c6 100644
--- a/tools/h5repack/Makefile.in
+++ b/tools/h5repack/Makefile.in
@@ -489,7 +489,6 @@ FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_VERSION = @FC_VERSION@
FGREP = @FGREP@
-FILTERS = @FILTERS@
FSEARCH_DIRS = @FSEARCH_DIRS@
GREP = @GREP@
H5_CFLAGS = @H5_CFLAGS@
@@ -577,10 +576,6 @@ TR = @TR@
TRACE_API = @TRACE_API@
UNAME_INFO = @UNAME_INFO@
USE_FILTER_DEFLATE = @USE_FILTER_DEFLATE@
-USE_FILTER_FLETCHER32 = @USE_FILTER_FLETCHER32@
-USE_FILTER_NBIT = @USE_FILTER_NBIT@
-USE_FILTER_SCALEOFFSET = @USE_FILTER_SCALEOFFSET@
-USE_FILTER_SHUFFLE = @USE_FILTER_SHUFFLE@
USE_FILTER_SZIP = @USE_FILTER_SZIP@
USINGMEMCHECKER = @USINGMEMCHECKER@
VERSION = @VERSION@
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index a4d12bd..e3bb939 100644
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -24,10 +24,6 @@ srcdir=@srcdir@
USE_FILTER_SZIP="@USE_FILTER_SZIP@"
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
-USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@"
-USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
-USE_FILTER_NBIT="@USE_FILTER_NBIT@"
-USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
TESTNAME=h5repack
EXIT_SUCCESS=0
@@ -742,40 +738,24 @@ fi
# shuffle with individual object
arg="h5repack_layout.h5 -f dset2:SHUF -l dset2:CHUNK=20x10"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_individual $arg
-fi
+TOOLTEST shuffle_individual $arg
# shuffle for all
arg="h5repack_layout.h5 -f SHUF"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_all $arg
-fi
+TOOLTEST shuffle_all $arg
# fletcher32 with individual object
arg="h5repack_layout.h5 -f dset2:FLET -l dset2:CHUNK=20x10"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_individual $arg
-fi
+TOOLTEST fletcher_individual $arg
# fletcher32 for all
arg="h5repack_layout.h5 -f FLET"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_all $arg
-fi
+TOOLTEST fletcher_all $arg
# all filters
arg="h5repack_layout.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10"
-if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
+if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
TOOLTEST all_filters $arg
@@ -828,87 +808,47 @@ fi
# shuffle copy
arg="h5repack_shuffle.h5"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_copy $arg
-fi
+TOOLTEST shuffle_copy $arg
# shuffle remove
arg="h5repack_shuffle.h5 -f dset_shuffle:NONE"
-if test $USE_FILTER_SHUFFLE != "yes" ; then
- SKIP $arg
-else
- TOOLTEST shuffle_remove $arg
-fi
+TOOLTEST shuffle_remove $arg
# fletcher32 copy
arg="h5repack_fletcher.h5"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_copy $arg
-fi
+TOOLTEST fletcher_copy $arg
# fletcher32 remove
arg="h5repack_fletcher.h5 -f dset_fletcher32:NONE"
-if test $USE_FILTER_FLETCHER32 != "yes" ; then
- SKIP $arg
-else
- TOOLTEST fletcher_remove $arg
-fi
+TOOLTEST fletcher_remove $arg
# nbit copy
arg="h5repack_nbit.h5"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_copy $arg
-fi
+TOOLTEST nbit_copy $arg
# nbit remove
arg="h5repack_nbit.h5 -f dset_nbit:NONE"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_remove $arg
-fi
+TOOLTEST nbit_remove $arg
# nbit add
arg="h5repack_nbit.h5 -f dset_int31:NBIT"
-if test $USE_FILTER_NBIT != "yes" ; then
- SKIP $arg
-else
- TOOLTEST nbit_add $arg
-fi
+TOOLTEST nbit_add $arg
# scaleoffset copy
arg="h5repack_soffset.h5"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_copy $arg
-fi
+TOOLTEST scale_copy $arg
# scaleoffset add
arg="h5repack_soffset.h5 -f dset_none:SOFF=31,IN"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_add $arg
-fi
+TOOLTEST scale_add $arg
# scaleoffset remove
arg="h5repack_soffset.h5 -f dset_scaleoffset:NONE"
-if test $USE_FILTER_SCALEOFFSET != "yes" ; then
- SKIP $arg
-else
- TOOLTEST scale_remove $arg
-fi
+TOOLTEST scale_remove $arg
# remove all filters
arg="h5repack_filters.h5 -f NONE"
-if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_NBIT != "yes" -o $USE_FILTER_SCALEOFFSET != "yes" ; then
+if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SZIP_ENCODER != "yes" ; then
SKIP $arg
else
TOOLTEST remove_all $arg
@@ -1061,7 +1001,7 @@ fi
# several global filters
arg="h5repack_layout.h5 --filter GZIP=1 --filter SHUF"
-if test $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then
+if test $USE_FILTER_DEFLATE != "yes" ; then
SKIP $arg
else
TOOLTEST global_filters $arg
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 5d5b0c3..d35b602 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -472,8 +472,6 @@ int main (void)
TESTING(" addding shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
-
/*-------------------------------------------------------------------------
* test an individual object option
*-------------------------------------------------------------------------
@@ -495,9 +493,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
/*-------------------------------------------------------------------------
* test all objects option
@@ -506,8 +501,6 @@ int main (void)
TESTING(" addding shuffle filter to all");
-#ifdef H5_HAVE_FILTER_SHUFFLE
-
/* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */
if (h5repack_init (&pack_options, 0, FALSE, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
@@ -525,13 +518,9 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
- TESTING(" adding checksum filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
+ TESTING(" adding checksum filter");
/*-------------------------------------------------------------------------
* test an individual object option
@@ -554,9 +543,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
/*-------------------------------------------------------------------------
* test all objects option
@@ -566,8 +552,6 @@ int main (void)
TESTING(" adding checksum filter to all");
-#ifdef H5_HAVE_FILTER_FLETCHER32
-
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("FLET",&pack_options) < 0)
@@ -584,9 +568,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" filter queue fletcher, shuffle, deflate, szip");
@@ -600,16 +581,10 @@ int main (void)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
-
-#if defined (H5_HAVE_FILTER_FLETCHER32)
if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
-#endif
-
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
-#endif
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
@@ -1088,7 +1063,6 @@ int main (void)
TESTING(" copy of shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
@@ -1101,13 +1075,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing shuffle filter");
-#ifdef H5_HAVE_FILTER_SHUFFLE
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
@@ -1122,13 +1093,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" copy of fletcher filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
@@ -1141,13 +1109,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing fletcher filter");
-#ifdef H5_HAVE_FILTER_FLETCHER32
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
@@ -1162,14 +1127,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" copy of nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
@@ -1182,13 +1143,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
@@ -1203,14 +1161,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" adding nbit filter");
-#ifdef H5_HAVE_FILTER_NBIT
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
@@ -1225,14 +1179,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" copy of scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
@@ -1245,13 +1195,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
+
TESTING(" removing scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
@@ -1266,14 +1213,10 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
TESTING(" adding scaleoffset filter");
-#ifdef H5_HAVE_FILTER_SCALEOFFSET
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
@@ -1288,10 +1231,6 @@ int main (void)
GOERROR;
PASSED();
-#else
- SKIPPED();
-#endif
-
/*-------------------------------------------------------------------------
@@ -1307,9 +1246,7 @@ int main (void)
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 defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
/* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */
@@ -1336,9 +1273,7 @@ int main (void)
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 defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
@@ -1370,8 +1305,7 @@ int main (void)
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 defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE)
if (h5repack_init (&pack_options, 0, FALSE, fs_type, fs_size) < 0)
GOERROR;
@@ -2396,13 +2330,12 @@ int make_shuffle(hid_t loc_id)
* shuffle
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_SHUFFLE)
+
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto out;
if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
-#endif
/*-------------------------------------------------------------------------
@@ -2463,7 +2396,7 @@ int make_fletcher32(hid_t loc_id)
* fletcher32
*-------------------------------------------------------------------------
*/
-#if defined (H5_HAVE_FILTER_FLETCHER32)
+
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2472,7 +2405,6 @@ int make_fletcher32(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
-#endif
/*-------------------------------------------------------------------------
* close space and dcpl
@@ -2537,7 +2469,6 @@ int make_nbit(hid_t loc_id)
goto out;
}
-#if defined H5_HAVE_FILTER_NBIT
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
{
@@ -2571,7 +2502,6 @@ int make_nbit(hid_t loc_id)
goto out;
}
H5Dclose(dsid);
-#endif
/*-------------------------------------------------------------------------
* close
@@ -2633,7 +2563,6 @@ int make_scaleoffset(hid_t loc_id)
dtid = H5Tcopy(H5T_NATIVE_INT);
-#if defined (H5_HAVE_FILTER_SCALEOFFSET)
/* remove the filters from the dcpl */
if(H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0) {
H5Tclose(dtid);
@@ -2662,7 +2591,6 @@ int make_scaleoffset(hid_t loc_id)
}
H5Tclose(dtid);
H5Dclose(dsid);
-#endif
/*-------------------------------------------------------------------------
* close space and dcpl
@@ -2696,10 +2624,8 @@ int make_all_filters(hid_t loc_id)
{
hid_t dcpl; /* dataset creation property list */
hid_t sid; /* dataspace ID */
-#if defined (H5_HAVE_FILTER_NBIT)
hid_t dtid;
hid_t dsid;
-#endif /* H5_HAVE_FILTER_NBIT */
#if defined (H5_HAVE_FILTER_SZIP)
unsigned szip_options_mask=H5_SZIP_ALLOW_K13_OPTION_MASK|H5_SZIP_NN_OPTION_MASK;
unsigned szip_pixels_per_block=8;
@@ -2729,17 +2655,13 @@ int make_all_filters(hid_t loc_id)
if (H5Pset_chunk(dcpl, RANK, chunk_dims) < 0)
goto out;
-#if defined (H5_HAVE_FILTER_SHUFFLE)
/* set the shuffle filter */
if (H5Pset_shuffle(dcpl) < 0)
goto out;
-#endif
-#if defined (H5_HAVE_FILTER_FLETCHER32)
/* set the checksum filter */
if (H5Pset_fletcher32(dcpl) < 0)
goto out;
-#endif
#if defined (H5_HAVE_FILTER_SZIP)
if (h5tools_can_encode(H5Z_FILTER_SZIP) == 1)
@@ -2765,7 +2687,6 @@ int make_all_filters(hid_t loc_id)
if (make_dset(loc_id,"dset_all",sid,dcpl,buf) < 0)
goto out;
-#if defined (H5_HAVE_FILTER_FLETCHER32)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2774,7 +2695,6 @@ int make_all_filters(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf) < 0)
goto out;
-#endif
/* Make sure encoding is enabled */
@@ -2796,7 +2716,6 @@ int make_all_filters(hid_t loc_id)
#endif
-#if defined (H5_HAVE_FILTER_SHUFFLE)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl,H5Z_FILTER_ALL) < 0)
goto out;
@@ -2805,7 +2724,6 @@ int make_all_filters(hid_t loc_id)
goto out;
if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf) < 0)
goto out;
-#endif
#if defined (H5_HAVE_FILTER_DEFLATE)
@@ -2821,7 +2739,6 @@ int make_all_filters(hid_t loc_id)
-#if defined (H5_HAVE_FILTER_NBIT)
/* remove the filters from the dcpl */
if (H5Premove_filter(dcpl, H5Z_FILTER_ALL) < 0)
goto out;
@@ -2842,8 +2759,6 @@ int make_all_filters(hid_t loc_id)
return -1;
if(H5Dclose(dsid) < 0)
return -1;
-#endif
-
if(H5Sclose(sid) < 0)
goto out;