summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repacktst.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-10-02 02:08:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-10-02 02:08:59 (GMT)
commit37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918 (patch)
tree387658306d99e60d807c2eb8b3888a12aca4a75f /tools/h5repack/h5repacktst.c
parent006071f2338faa14f2784562279cb78b4341bce0 (diff)
downloadhdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.zip
hdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.tar.gz
hdf5-37ec6dc75e85ebd7f9fb9b32fe978e47ab3fe918.tar.bz2
[svn-r17582] Description:
Bring changes from file free space branch back to the trunk. *yay!* Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.8 (amazon) in debug mode Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r--tools/h5repack/h5repacktst.c229
1 files changed, 119 insertions, 110 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 7ac339a..e36a8dc 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -152,6 +152,8 @@ int main (void)
{
pack_opt_t pack_options;
diff_opt_t diff_options;
+ hsize_t fs_size = 0; /* free space section threshold */
+ H5F_file_space_type_t fs_type = H5F_FILE_SPACE_DEFAULT; /* file space handling strategy */
#if defined (H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
@@ -184,13 +186,15 @@ int main (void)
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init (&pack_options, 0) < 0)
+
+ /* fs_type = 0; fs_size = 0 */
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME0,FNAME0OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME0,FNAME0OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME0OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME0, FNAME0OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME0,FNAME0OUT)<=0)
GOERROR;
@@ -204,13 +208,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME1,FNAME1OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME1,FNAME1OUT)<=0)
GOERROR;
@@ -224,13 +228,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (attributes)");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME2,FNAME2OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME2,FNAME2OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME2OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME2, FNAME2OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME2,FNAME2OUT)<=0)
GOERROR;
@@ -243,13 +247,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME3,FNAME3OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME3,FNAME3OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME3OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME3, FNAME3OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME3,FNAME3OUT)<=0)
GOERROR;
@@ -263,13 +267,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of allocation early file");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME5,FNAME5OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME5,FNAME5OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME5OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME5, FNAME5OUT, &pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -293,7 +297,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
GOERROR;
@@ -303,7 +307,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -321,7 +325,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -331,7 +335,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -359,7 +363,7 @@ int main (void)
*/
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0)
GOERROR;
@@ -369,7 +373,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -391,7 +395,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0)
GOERROR;
@@ -399,7 +403,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -422,7 +426,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
@@ -432,7 +436,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -451,7 +455,8 @@ int main (void)
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */
+ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SHUF",&pack_options) < 0)
GOERROR;
@@ -461,7 +466,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -480,7 +485,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
@@ -490,7 +495,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -510,7 +515,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("FLET",&pack_options) < 0)
GOERROR;
@@ -520,7 +525,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -538,7 +543,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
@@ -569,7 +574,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -584,7 +589,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -592,7 +597,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -604,7 +609,7 @@ int main (void)
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -612,7 +617,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -625,7 +630,7 @@ int main (void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0)
GOERROR;
@@ -633,7 +638,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -646,7 +651,7 @@ int main (void)
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -654,7 +659,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -663,7 +668,7 @@ int main (void)
* do the same test for a file with filters (chunked)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -671,7 +676,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -685,7 +690,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0)
GOERROR;
@@ -693,7 +698,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -706,7 +711,8 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL; fs_size = 2 */
+ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addlayout("COMPA",&pack_options) < 0)
GOERROR;
@@ -714,7 +720,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -728,7 +734,7 @@ int main (void)
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0)
GOERROR;
@@ -736,7 +742,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -748,7 +754,7 @@ int main (void)
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0)
GOERROR;
@@ -756,7 +762,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -768,7 +774,7 @@ int main (void)
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0)
GOERROR;
@@ -776,7 +782,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -787,7 +793,7 @@ int main (void)
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0)
GOERROR;
@@ -795,7 +801,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -806,7 +812,7 @@ int main (void)
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0)
GOERROR;
@@ -814,7 +820,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -826,7 +832,7 @@ int main (void)
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0)
GOERROR;
@@ -834,7 +840,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -845,7 +851,7 @@ int main (void)
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0)
GOERROR;
@@ -853,7 +859,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -865,7 +871,7 @@ int main (void)
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0)
GOERROR;
@@ -873,7 +879,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -884,7 +890,7 @@ int main (void)
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0)
GOERROR;
@@ -892,7 +898,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME4OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -914,13 +920,14 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_AGGR_VFD; fs_size = 3 */
+ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack(FNAME7,FNAME7OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
GOERROR;
if (h5repack_cmp_pl(FNAME7,FNAME7OUT)<=0)
GOERROR;
@@ -939,7 +946,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0)
GOERROR;
@@ -947,7 +954,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME7OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME7, FNAME7OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -964,13 +971,13 @@ int main (void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME8,FNAME8OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -984,7 +991,7 @@ int main (void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0)
GOERROR;
@@ -992,7 +999,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME8OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME8, FNAME8OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1007,13 +1014,13 @@ int main (void)
TESTING(" copy of shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME9,FNAME9OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1026,7 +1033,7 @@ int main (void)
TESTING(" removing shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
GOERROR;
@@ -1034,7 +1041,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME9,FNAME9OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME9OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME9, FNAME9OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1047,13 +1054,13 @@ int main (void)
TESTING(" copy of fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME10,FNAME10OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1066,7 +1073,7 @@ int main (void)
TESTING(" removing fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
GOERROR;
@@ -1074,7 +1081,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME10,FNAME10OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME10OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME10, FNAME10OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1088,13 +1095,13 @@ int main (void)
TESTING(" copy of nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME12,FNAME12OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1107,7 +1114,7 @@ int main (void)
TESTING(" removing nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
GOERROR;
@@ -1115,7 +1122,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1129,7 +1136,7 @@ int main (void)
TESTING(" adding nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
GOERROR;
@@ -1137,7 +1144,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME12,FNAME12OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME12OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME12, FNAME12OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1151,13 +1158,13 @@ int main (void)
TESTING(" copy of scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME13,FNAME13OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1170,7 +1177,7 @@ int main (void)
TESTING(" removing scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
GOERROR;
@@ -1178,7 +1185,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1192,7 +1199,7 @@ int main (void)
TESTING(" adding scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
GOERROR;
@@ -1200,7 +1207,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME13,FNAME13OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME13OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME13, FNAME13OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1230,7 +1237,8 @@ int main (void)
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */
+ if (h5repack_init (&pack_options, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options) < 0)
GOERROR;
@@ -1238,7 +1246,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1258,7 +1266,7 @@ int main (void)
&& defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1266,7 +1274,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1290,7 +1298,7 @@ int main (void)
#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)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("NONE",&pack_options) < 0)
GOERROR;
@@ -1298,7 +1306,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1313,13 +1321,14 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" big file");
- if (h5repack_init (&pack_options, 0) < 0)
+
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME14,FNAME14OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME14,FNAME14OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME14OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME14, FNAME14OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1330,13 +1339,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack(FNAME15,FNAME15OUT,&pack_options) < 0)
GOERROR;
if (h5diff(FNAME15,FNAME15OUT,NULL,NULL,&diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME15OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME15, FNAME15OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1347,13 +1356,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" file with userblock");
- if(h5repack_init(&pack_options, 0) < 0)
+ if(h5repack_init(&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if(h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
GOERROR;
if(h5diff(FNAME16, FNAME16OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME16OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME16, FNAME16OUT, &pack_options) <= 0)
GOERROR;
if(verify_userblock(FNAME16OUT) < 0)
GOERROR;
@@ -1366,7 +1375,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" latest file format options");
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
pack_options.latest=1;
pack_options.grp_compact=10;
@@ -1380,7 +1389,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME1,FNAME1OUT,NULL,NULL,&diff_options) > 0)
GOERROR;
- if (h5repack_verify(FNAME1OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME1, FNAME1OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1396,7 +1405,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_DEFLATE) && defined (H5_HAVE_FILTER_SHUFFLE)
- if (h5repack_init (&pack_options, 0) < 0)
+ if (h5repack_init (&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1406,7 +1415,7 @@ int main (void)
GOERROR;
if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) >0)
GOERROR;
- if (h5repack_verify(FNAME11OUT,&pack_options)<=0)
+ if (h5repack_verify(FNAME11, FNAME11OUT,&pack_options)<=0)
GOERROR;
if (h5repack_end (&pack_options) < 0)
GOERROR;
@@ -1425,7 +1434,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0) < 0)
+ if(h5repack_init(&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for a user block size and user block filename */
@@ -1436,7 +1445,7 @@ int main (void)
GOERROR;
if(h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME8OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
if(verify_userblock(FNAME8OUT) < 0)
GOERROR;
@@ -1458,7 +1467,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0) < 0)
+ if(h5repack_init(&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for aligment */
@@ -1469,7 +1478,7 @@ int main (void)
GOERROR;
if(h5diff(FNAME8, FNAME8OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME8OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME8, FNAME8OUT, &pack_options) <= 0)
GOERROR;
/* verify aligment */
@@ -1512,14 +1521,14 @@ int main (void)
*/
TESTING(" file with committed datatypes");
- if(h5repack_init(&pack_options, 0) < 0)
+ if(h5repack_init(&pack_options, 0, fs_type, fs_size) < 0)
GOERROR;
if(h5repack(FNAME17, FNAME17OUT, &pack_options) < 0)
GOERROR;
if(h5diff(FNAME17, FNAME17OUT, NULL, NULL, &diff_options) > 0)
GOERROR;
- if(h5repack_verify(FNAME17OUT, &pack_options) <= 0)
+ if(h5repack_verify(FNAME17, FNAME17OUT, &pack_options) <= 0)
GOERROR;
if(h5repack_end(&pack_options) < 0)
GOERROR;