diff options
Diffstat (limited to 'tools/h5repack')
-rw-r--r-- | tools/h5repack/h5repack.c | 7 | ||||
-rw-r--r-- | tools/h5repack/h5repack.h | 17 | ||||
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 46 | ||||
-rw-r--r-- | tools/h5repack/h5repack_main.c | 30 | ||||
-rw-r--r-- | tools/h5repack/h5repack_verify.c | 111 | ||||
-rw-r--r-- | tools/h5repack/h5repacktst.c | 229 |
6 files changed, 300 insertions, 140 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index d8a503c..e6b95a0 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -90,8 +90,8 @@ int h5repack(const char* infile, *------------------------------------------------------------------------- */ -int h5repack_init (pack_opt_t *options, - int verbose) +int +h5repack_init(pack_opt_t *options, int verbose, H5F_file_space_type_t strategy, hsize_t threshold) { int k, n; memset(options,0,sizeof(pack_opt_t)); @@ -106,6 +106,9 @@ int h5repack_init (pack_opt_t *options, options->filter_g[n].cd_values[k] = 0; } + options->fs_strategy = strategy; + options->fs_threshold = threshold; + return (options_table_init(&(options->op_tbl))); } diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index cb3d75a..16f438c 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -112,6 +112,8 @@ typedef struct { hsize_t ublock_size; /* user block size */ hsize_t threshold; /* alignment threshold for H5Pset_alignment */ hsize_t alignment ; /* alignment for H5Pset_alignment */ + H5F_file_space_type_t fs_strategy; /* File space handling strategy */ + hsize_t fs_threshold; /* Free space section threshold */ } pack_opt_t; @@ -125,14 +127,13 @@ typedef struct { extern "C" { #endif -int h5repack (const char* infile, const char* outfile, pack_opt_t *options); -int h5repack_addfilter (const char* str, pack_opt_t *options); -int h5repack_addlayout (const char* str, pack_opt_t *options); -int h5repack_init (pack_opt_t *options, int verbose); -int h5repack_end (pack_opt_t *options); -int h5repack_verify (const char *fname,pack_opt_t *options); -int h5repack_cmp_pl (const char *fname1, - const char *fname2); +int h5repack(const char* infile, const char* outfile, pack_opt_t *options); +int h5repack_addfilter(const char* str, pack_opt_t *options); +int h5repack_addlayout(const char* str, pack_opt_t *options); +int h5repack_init(pack_opt_t *options, int verbose, H5F_file_space_type_t strategy, hsize_t threshold); +int h5repack_end(pack_opt_t *options); +int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options); +int h5repack_cmp_pl(const char *fname1, const char *fname2); #ifdef __cplusplus diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 0fb8fc8..77c03d2 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -104,7 +104,7 @@ int copy_objects(const char* fnamein, goto out; } - /* get user block size */ + /* get user block size and file space strategy/threshold */ { hid_t fcpl_in; /* file creation property list ID for input file */ @@ -120,6 +120,24 @@ int copy_objects(const char* fnamein, goto out; } + if(!options->fs_strategy) + { + if(H5Pget_file_space(fcpl_in, &options->fs_strategy, NULL) < 0) + { + error_msg(progname, "failed to retrieve file space strategy\n"); + goto out; + } + } + + if(!options->fs_threshold) + { + if(H5Pget_file_space(fcpl_in, NULL, &options->fs_threshold) < 0) + { + error_msg(progname, "failed to retrieve file space threshold\n"); + goto out; + } + } + if(H5Pclose(fcpl_in) < 0) { error_msg(progname, "failed to close property list\n"); @@ -316,6 +334,32 @@ int copy_objects(const char* fnamein, } + /* either use the FCPL already created or create a new one */ + if(fcpl != H5P_DEFAULT) + { + /* set file space strategy and free space threshold */ + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + { + error_msg(progname, "failed to set file space strategy & threshold\n"); + goto out; + } + } + else + { + /* create a file creation property list */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + { + error_msg(progname, "fail to create a file creation property list\n"); + goto out; + } + + /* set file space strategy and free space threshold */ + if(H5Pset_file_space(fcpl, options->fs_strategy, options->fs_threshold) < 0) + { + error_msg(progname, "failed to set file space strategy & threshold \n"); + goto out; + } + } /*------------------------------------------------------------------------- * create the output file diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 63aba1f..b6e645a3 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -38,7 +38,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:"; +static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:S:T:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -58,6 +58,8 @@ static struct long_options l_opts[] = { { "alignment", require_arg, 'a' }, { "infile", require_arg, 'i' }, /* -i for backward compability */ { "outfile", require_arg, 'o' }, /* -o for backward compability */ + { "fs_strategy", require_arg, 'S' }, + { "fs_threshold", require_arg, 'T' }, { NULL, 0, '\0' } }; @@ -104,7 +106,7 @@ int main(int argc, const char **argv) int ret=-1; /* initialize options */ - h5repack_init (&options,0); + h5repack_init (&options, 0, 0, (hsize_t)0); parse_command_line(argc, argv, &options); @@ -180,6 +182,8 @@ static void usage(const char *prog) printf(" -a A, --alignment=A Alignment value for H5Pset_alignment\n"); printf(" -f FILT, --filter=FILT Filter type\n"); printf(" -l LAYT, --layout=LAYT Layout type\n"); + printf(" -S STRGY, --fs_strategy=STRGY File-space-handling strategy\n"); + printf(" -T THRD, --fs_threshold=THRD Free-space section threshold\n"); printf("\n"); @@ -193,7 +197,18 @@ static void usage(const char *prog) printf(" a power of 2 (1024 default)\n"); printf(" F - is the shared object header message type, any of <dspace|dtype|fill|\n"); printf(" pline|attr>. If F is not specified, S applies to all messages\n"); - + printf("\n"); + printf(" STRGY is an integer value listed below:\n"); + printf(" 1: Use persistent free-space managers, aggregators and virtual file driver for allocation\n"); + printf(" 2: Use non-persistent free-space managers, aggregators and virtual file driver for allocation\n"); + printf(" 3: Use aggregators and virtual file driver for allocation\n"); + printf(" 4: Use virtual file driver for allocation\n"); + printf(" A value of 0 retains the existing file-space-handling strategy used in the library.\n"); + printf(" The library default is 2.\n"); + printf("\n"); + printf(" THRD is the minimum size of free-space sections to track by the free-space managers.\n"); + printf(" A value of 0 retains the existing free-space section threshold used in the library.\n"); + printf(" The library default is 1.\n"); printf("\n"); printf(" FILT - is a string with the format:\n"); @@ -429,6 +444,15 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options) } break; + case 'S': + + options->fs_strategy = atol( opt_arg ); + break; + + case 'T': + + options->fs_threshold = (hsize_t)atol( opt_arg ); + break; } /* switch */ diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index 83985c9..fe94148 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -44,20 +44,25 @@ static int verify_filters(hid_t pid, hid_t tid, int nfilters, filter_info_t *fil *------------------------------------------------------------------------- */ -int h5repack_verify(const char *fname, - pack_opt_t *options) +int +h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options) { - hid_t fid; /* file ID */ - hid_t did; /* dataset ID */ - hid_t pid; /* dataset creation property list ID */ - hid_t sid; /* space ID */ - hid_t tid; /* type ID */ + hid_t fidin; /* file ID for input file*/ + hid_t fidout; /* file ID for output file*/ + hid_t did; /* dataset ID */ + hid_t pid; /* dataset creation property list ID */ + hid_t sid; /* space ID */ + hid_t tid; /* type ID */ unsigned int i; trav_table_t *travt = NULL; int ok = 1; + hid_t fcpl_in; /* file creation property for input file */ + hid_t fcpl_out; /* file creation property for output file */ + H5F_file_space_type_t in_strat, out_strat; /* file space handling strategy for in/output file */ + hsize_t in_thresh, out_thresh; /* free space section threshold for in/output file */ - /* open the file */ - if((fid = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) + /* open the output file */ + if((fidout = H5Fopen(out_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) return -1; for(i = 0; i < options->op_tbl->nelems; i++) @@ -69,7 +74,7 @@ int h5repack_verify(const char *fname, * open *------------------------------------------------------------------------- */ - if((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) + if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0) goto error; if((sid = H5Dget_space(did)) < 0) goto error; @@ -121,7 +126,7 @@ int h5repack_verify(const char *fname, trav_table_init(&travt); /* get the list of objects in the file */ - if(h5trav_gettable(fid, travt) < 0) + if(h5trav_gettable(fidout, travt) < 0) goto error; for(i = 0; i < travt->nobjs; i++) @@ -135,7 +140,7 @@ int h5repack_verify(const char *fname, * open *------------------------------------------------------------------------- */ - if((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) + if((did = H5Dopen2(fidout, name, H5P_DEFAULT)) < 0) goto error; if((sid = H5Dget_space(did)) < 0) goto error; @@ -191,21 +196,95 @@ int h5repack_verify(const char *fname, } /*------------------------------------------------------------------------- - * close + * Verify that file space strategy and free space threshold + * are set as expected *------------------------------------------------------------------------- */ - if (H5Fclose(fid) < 0) - return -1; + /* open the input file */ + if((fidin = H5Fopen(in_fname, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0 ) + goto error; + + /* Get file creation property list for input file */ + if((fcpl_in = H5Fget_create_plist(fidin)) < 0) { + error_msg(progname, "failed to retrieve file creation property list\n"); + goto error; + } + + /* Get file space management info for input file */ + if(H5Pget_file_space(fcpl_in, &in_strat, &in_thresh) < 0) { + error_msg(progname, "failed to retrieve file space strategy & threshold\n"); + goto error; + } + + /* Output file is already opened */ + /* Get file creation property list for output file */ + if((fcpl_out = H5Fget_create_plist(fidout)) < 0) { + error_msg(progname, "failed to retrieve file creation property list\n"); + goto error; + } + + /* Get file space management info for output file */ + if(H5Pget_file_space(fcpl_out, &out_strat, &out_thresh) < 0) { + error_msg(progname, "failed to retrieve file space strategy & threshold\n"); + goto error; + } + + /* + * If the strategy option is not set, + * file space handling strategy should be the same for both + * input & output files. + * If the strategy option is set, + * the output file's file space handling strategy should be the same + * as what is set via the strategy option + */ + if(!options->fs_strategy && out_strat != in_strat) { + error_msg(progname, "file space strategy not set as unexpected\n"); + goto error; + + } else if(options->fs_strategy && out_strat!= options->fs_strategy) { + error_msg(progname, "file space strategy not set as unexpectec\n"); + goto error; + } + + /* + * If the threshold option is not set, + * the free space section threshold should be the same for both + * input & output files. + * If the threshold option is set, + * the output file's free space section threshold should be the same + * as what is set via the threshold option. + */ + if(!options->fs_threshold && out_thresh != in_thresh) { + error_msg(progname, "free space threshold not set as unexpected\n"); + goto error; + + } else if(options->fs_threshold && out_thresh != options->fs_threshold) { + error_msg(progname, "free space threshold not set as unexpectec\n"); + goto error; + } + + /* Closing */ + if (H5Pclose(fcpl_in) < 0) + goto error; + if (H5Pclose(fcpl_out) < 0) + goto error; + if (H5Fclose(fidin) < 0) + goto error; + if (H5Fclose(fidout) < 0) + goto error; return ok; error: H5E_BEGIN_TRY { + H5Pclose(fcpl_in); + H5Pclose(fcpl_out); H5Pclose(pid); H5Sclose(sid); H5Dclose(did); - H5Fclose(fid); + H5Fclose(fidin); + H5Fclose(fidout); if (travt) trav_table_free(travt); } H5E_END_TRY; 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; |