summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repacktst.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r--tools/h5repack/h5repacktst.c240
1 files changed, 124 insertions, 116 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 59652e0..adaef43 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -79,7 +79,6 @@
#define FNAME_UB "ublock.bin"
-
const char *H5REPACK_FILENAMES[] = {
"h5repack_big_out",
NULL
@@ -153,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
@@ -178,19 +179,22 @@ int main (void)
*-------------------------------------------------------------------------
*/
+
/*-------------------------------------------------------------------------
* file with fill values
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+
+ /* fs_type = 0; fs_size = 0 */
+ if (h5repack_init (&pack_options, 0, 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) < 0)
+ if (h5repack_init (&pack_options, 0, 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) < 0)
+ if (h5repack_init (&pack_options, 0, 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) < 0)
+ if (h5repack_init (&pack_options, 0, 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) < 0)
+ if (h5repack_init (&pack_options, 0, 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) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -320,7 +324,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 1) < 0)
+ if (h5repack_init (&pack_options, 0, 1, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9",&pack_options) < 0)
GOERROR;
@@ -330,7 +334,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;
@@ -348,7 +352,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -358,7 +362,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;
@@ -386,7 +390,7 @@ int main (void)
*/
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options) < 0)
GOERROR;
@@ -396,7 +400,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;
@@ -418,7 +422,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SZIP=8,NN",&pack_options) < 0)
GOERROR;
@@ -426,7 +430,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;
@@ -449,7 +453,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:SHUF",&pack_options) < 0)
GOERROR;
@@ -459,7 +463,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;
@@ -478,7 +482,8 @@ int main (void)
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL_PERSIST; fs_size = 1 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("SHUF",&pack_options) < 0)
GOERROR;
@@ -488,7 +493,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;
@@ -507,7 +512,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset1:FLET",&pack_options) < 0)
GOERROR;
@@ -517,7 +522,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;
@@ -537,7 +542,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("FLET",&pack_options) < 0)
GOERROR;
@@ -547,7 +552,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;
@@ -565,7 +570,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10",&pack_options) < 0)
GOERROR;
@@ -596,7 +601,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;
@@ -611,7 +616,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -619,7 +624,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;
@@ -633,7 +638,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 1) < 0)
+ if (h5repack_init (&pack_options, 0, 1, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -641,7 +646,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;
@@ -653,7 +658,7 @@ int main (void)
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CHUNK=20x10",&pack_options) < 0)
GOERROR;
@@ -661,7 +666,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;
@@ -674,7 +679,7 @@ int main (void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CONTI",&pack_options) < 0)
GOERROR;
@@ -682,7 +687,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;
@@ -695,7 +700,7 @@ int main (void)
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -703,7 +708,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;
@@ -712,7 +717,7 @@ int main (void)
* do the same test for a file with filters (chunked)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("CONTI",&pack_options) < 0)
GOERROR;
@@ -720,7 +725,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;
@@ -734,7 +739,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset1:COMPA",&pack_options) < 0)
GOERROR;
@@ -742,7 +747,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;
@@ -755,7 +760,8 @@ int main (void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_ALL; fs_size = 2 */
+ if (h5repack_init (&pack_options, 0, 0, H5_INC_ENUM(H5F_file_space_type_t, fs_type), ++fs_size) < 0)
GOERROR;
if (h5repack_addlayout("COMPA",&pack_options) < 0)
GOERROR;
@@ -763,7 +769,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;
@@ -777,7 +783,7 @@ int main (void)
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CONTI",&pack_options) < 0)
GOERROR;
@@ -785,7 +791,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;
@@ -797,7 +803,7 @@ int main (void)
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5",&pack_options) < 0)
GOERROR;
@@ -805,7 +811,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;
@@ -817,7 +823,7 @@ int main (void)
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:COMPA",&pack_options) < 0)
GOERROR;
@@ -825,7 +831,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;
@@ -836,7 +842,7 @@ int main (void)
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:COMPA",&pack_options) < 0)
GOERROR;
@@ -844,7 +850,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;
@@ -855,7 +861,7 @@ int main (void)
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6",&pack_options) < 0)
GOERROR;
@@ -863,7 +869,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;
@@ -875,7 +881,7 @@ int main (void)
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CONTI",&pack_options) < 0)
GOERROR;
@@ -883,7 +889,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;
@@ -894,7 +900,7 @@ int main (void)
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:COMPA",&pack_options) < 0)
GOERROR;
@@ -902,7 +908,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,7 +920,7 @@ int main (void)
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CONTI",&pack_options) < 0)
GOERROR;
@@ -922,7 +928,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;
@@ -933,7 +939,7 @@ int main (void)
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13",&pack_options) < 0)
GOERROR;
@@ -941,7 +947,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;
@@ -963,13 +969,14 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ /* fs_type = H5F_FILE_SPACE_AGGR_VFD; fs_size = 3 */
+ if (h5repack_init (&pack_options, 0, 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;
@@ -988,7 +995,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options) < 0)
GOERROR;
@@ -996,7 +1003,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;
@@ -1013,13 +1020,13 @@ int main (void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1033,7 +1040,7 @@ int main (void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, ++fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:NONE",&pack_options) < 0)
GOERROR;
@@ -1041,7 +1048,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;
@@ -1056,13 +1063,13 @@ int main (void)
TESTING(" copy of shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1075,7 +1082,7 @@ int main (void)
TESTING(" removing shuffle filter");
#ifdef H5_HAVE_FILTER_SHUFFLE
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE",&pack_options) < 0)
GOERROR;
@@ -1083,7 +1090,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;
@@ -1096,13 +1103,13 @@ int main (void)
TESTING(" copy of fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1115,7 +1122,7 @@ int main (void)
TESTING(" removing fletcher filter");
#ifdef H5_HAVE_FILTER_FLETCHER32
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE",&pack_options) < 0)
GOERROR;
@@ -1123,7 +1130,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;
@@ -1137,13 +1144,13 @@ int main (void)
TESTING(" copy of nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1156,7 +1163,7 @@ int main (void)
TESTING(" removing nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE",&pack_options) < 0)
GOERROR;
@@ -1164,7 +1171,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;
@@ -1178,7 +1185,7 @@ int main (void)
TESTING(" adding nbit filter");
#ifdef H5_HAVE_FILTER_NBIT
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT",&pack_options) < 0)
GOERROR;
@@ -1186,7 +1193,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;
@@ -1200,13 +1207,13 @@ int main (void)
TESTING(" copy of scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1219,7 +1226,7 @@ int main (void)
TESTING(" removing scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE",&pack_options) < 0)
GOERROR;
@@ -1227,7 +1234,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;
@@ -1241,7 +1248,7 @@ int main (void)
TESTING(" adding scaleoffset filter");
#ifdef H5_HAVE_FILTER_SCALEOFFSET
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN",&pack_options) < 0)
GOERROR;
@@ -1249,7 +1256,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;
@@ -1279,7 +1286,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) < 0)
+ /* fs_type = H5F_FILE_SPACE_VFD; fs_size = 4 */
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1287,7 +1295,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;
@@ -1307,7 +1315,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) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1315,7 +1323,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;
@@ -1339,7 +1347,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) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("NONE",&pack_options) < 0)
GOERROR;
@@ -1347,7 +1355,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;
@@ -1362,13 +1370,14 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" big file");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1379,13 +1388,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 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;
@@ -1396,13 +1405,13 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" file with userblock");
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 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;
@@ -1415,7 +1424,7 @@ int main (void)
*-------------------------------------------------------------------------
*/
TESTING(" latest file format options");
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
pack_options.latest=1;
pack_options.grp_compact=10;
@@ -1429,7 +1438,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;
@@ -1445,7 +1454,7 @@ int main (void)
#if defined (H5_HAVE_FILTER_DEFLATE) && defined (H5_HAVE_FILTER_SHUFFLE)
- if (h5repack_init (&pack_options, 0, 0) < 0)
+ if (h5repack_init (&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1",&pack_options) < 0)
GOERROR;
@@ -1455,7 +1464,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;
@@ -1474,7 +1483,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for a user block size and user block filename */
@@ -1485,7 +1494,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;
@@ -1507,7 +1516,7 @@ int main (void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 0, fs_type, fs_size) < 0)
GOERROR;
/* add the options for aligment */
@@ -1518,10 +1527,9 @@ 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 */
{
hsize_t threshold;
@@ -1562,14 +1570,14 @@ int main (void)
*/
TESTING(" file with committed datatypes");
- if(h5repack_init(&pack_options, 0, 0) < 0)
+ if(h5repack_init(&pack_options, 0, 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;