diff options
103 files changed, 1616 insertions, 972 deletions
@@ -1482,24 +1482,14 @@ ./tools/testfiles/h5diff_14.txt ./tools/testfiles/h5diff_15.txt ./tools/testfiles/h5diff_16.txt +./tools/testfiles/h5diff_17.txt +./tools/testfiles/h5diff_18.txt ./tools/testfiles/h5diff_20.txt ./tools/testfiles/h5diff_21.txt ./tools/testfiles/h5diff_22.txt ./tools/testfiles/h5diff_23.txt ./tools/testfiles/h5diff_24.txt ./tools/testfiles/h5diff_25.txt -./tools/testfiles/h5diff_30.txt -./tools/testfiles/h5diff_31.txt -./tools/testfiles/h5diff_32.txt -./tools/testfiles/h5diff_33.txt -./tools/testfiles/h5diff_34.txt -./tools/testfiles/h5diff_35.txt -./tools/testfiles/h5diff_36.txt -./tools/testfiles/h5diff_37.txt -./tools/testfiles/h5diff_38.txt -./tools/testfiles/h5diff_40.txt -./tools/testfiles/h5diff_41.txt -./tools/testfiles/h5diff_42.txt ./tools/testfiles/h5diff_50.txt ./tools/testfiles/h5diff_51.txt ./tools/testfiles/h5diff_52.txt @@ -1540,13 +1530,9 @@ ./tools/testfiles/h5diff_629.txt ./tools/testfiles/h5diff_70.txt ./tools/testfiles/h5diff_80.txt -./tools/testfiles/test1.h5 -./tools/testfiles/test3.h5 -./tools/testfiles/test4.h5 -./tools/testfiles/test5.h5 -./tools/testfiles/h5repack_info.txt +# h5repack sources ./tools/h5repack/Dependencies ./tools/h5repack/h5repack_opttable.c ./tools/h5repack/h5repack_verify.c @@ -1567,7 +1553,13 @@ ./tools/h5repack/testh5repack_main.c ./tools/h5repack/h5repack.h +# h5repack test files +./tools/testfiles/test1.h5 +./tools/testfiles/test3.h5 +./tools/testfiles/test4.h5 +./tools/testfiles/test5.h5 +./tools/testfiles/h5repack_info.txt - +# windows ./windows/all.zip ./windows/all_withf90.zip diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c index 8dbce22..ff3b2e1 100644 --- a/tools/h5diff/h5diff_main.c +++ b/tools/h5diff/h5diff_main.c @@ -16,11 +16,6 @@ #include <stdlib.h> #include <assert.h> -/* Due to alignment issue in Alpha clusters, options must be declared here - * not as a local variable in main(). - */ -diff_opt_t options = {0,0,0,0,0,0,0,0}; - static void usage(void); static int check_n_input( const char* ); static int check_f_input( const char* ); @@ -40,7 +35,12 @@ static int check_f_input( const char* ); * * Comments: * - * Modifications: + * Modifications: July 2004 + * Introduced the four modes: + * Normal mode: print the number of differences found and where they occured + * Report mode: print the above plus the differences + * Verbose mode: print the above plus a list of objects and warnings + * Quiet mode: do not print output * *------------------------------------------------------------------------- */ @@ -53,7 +53,11 @@ int main(int argc, const char *argv[]) const char *fname2 = NULL; const char *objname1 = NULL; const char *objname2 = NULL; - int nfound=0, ret; + hsize_t nfound=0; + int ret; + diff_opt_t options; + + memset(&options, 0, sizeof (diff_opt_t)); /*------------------------------------------------------------------------- * initial check of command line options @@ -98,10 +102,14 @@ int main(int argc, const char *argv[]) usage(); break; case 'v': - options.verbose = 1; + options.m_verbose = 1; + break; + case 'q': + /* use quiet mode; supress the message "0 differences found" */ + options.m_quiet = 1; break; case 'r': - options.r = 1; + options.m_report = 1; break; case 'd': /* if it is not another option */ @@ -189,24 +197,36 @@ int main(int argc, const char *argv[]) }/*for*/ + nfound = h5diff(fname1,fname2,objname1,objname2,&options); + /*------------------------------------------------------------------------- - * print the command line options + * print how many differences were found *------------------------------------------------------------------------- */ - - if (options.verbose) + if (!options.m_quiet) { - printf("$h5diff"); - for (i=1; i<argc ; i++) + if (options.cmn_objs==0) + { + printf("No common objects found. Files are not comparable.\n"); + if (!options.m_verbose) + printf("Use -v for a list of objects.\n"); + } + else { - printf(" %s", argv[i] ); + if (!options.err_stat) + print_found(nfound); } - printf("\n"); } - nfound = h5diff(fname1,fname2,objname1,objname2,&options); - if (options.verbose) printf("\n"); +/*------------------------------------------------------------------------- + * exit code + * >0 if differences, 0 if no differences, <0 if error + *------------------------------------------------------------------------- + */ + ret= (nfound==0 ? 0 : 1 ); + if (options.err_stat) + ret=-1; return ret; } @@ -256,8 +276,6 @@ int check_n_input( const char *str ) * * Return: 1 for ok, -1 for fail * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * * Date: May 9, 2003 * * Comments: @@ -292,10 +310,6 @@ int check_f_input( const char *str ) * * Return: void * - * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu - * - * Date: May 9, 2003 - * *------------------------------------------------------------------------- */ static @@ -309,8 +323,9 @@ void usage(void) printf("[obj2] Name of an HDF5 object, in absolute path\n"); printf("[OPTIONS] are:\n"); printf("[-h] Print out this information\n"); - printf("[-v] Verbose mode\n"); - printf("[-r] Print only what objects differ, not the differences\n"); + printf("[-r] Report mode. Print the differences\n"); + printf("[-v] Verbose mode. Print the differences, list of objects, warnings\n"); + printf("[-q] Quiet mode. Do not do output\n"); printf("[-n count] Print difference up to count number\n"); printf("[-d delta] Print difference when it is greater than limit delta\n"); printf("[-p relative] Print difference when it is greater than a relative limit\n"); @@ -322,20 +337,31 @@ void usage(void) printf("The -d compare criteria is |a - b| > delta\n"); printf("The -p compare criteria is |1 - b/a| > relative\n"); printf("\n"); - printf("Examples:\n"); + printf("h5diff has four modes of output:\n"); + printf(" Normal mode: print the number of differences found and where they occured\n"); + printf(" Report mode: print the above plus the differences\n"); + printf(" Verbose mode: print the above plus a list of objects and warnings\n"); + printf(" Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found)\n"); printf("\n"); - printf("1) h5diff file1 file2 /a/b /a/c\n"); + printf("Examples of use:\n"); printf("\n"); - printf(" Compares object '/a/b' in file1 with '/a/c' in file2\n"); + printf("1) h5diff file1 file2 /g1/dset1 /g1/dset2\n"); printf("\n"); - printf("2) h5diff file1 file2 /a/b\n"); + printf(" Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n"); printf("\n"); - printf(" Compares object '/a/b' in both files\n"); + printf("2) h5diff file1 file2 /g1/dset1\n"); + printf("\n"); + printf(" Compares object '/g1/dset1' in both files\n"); printf("\n"); printf("3) h5diff file1 file2\n"); printf("\n"); printf(" Compares all objects in both files\n"); printf("\n"); + printf("Note) file1 and file2 can be the same file. Use\n"); + printf("\n"); + printf(" h5diff file1 file1 /g1/dset1 /g1/dset2\n"); + printf("\n"); + printf(" to compare '/g1/dset1' and '/g1/dset2' in the same file\n"); exit(0); } diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 23cbfaa..91a2eb5 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -102,23 +102,29 @@ TOOLTEST() { # 1.0 TOOLTEST h5diff_10.txt -h -# 1.1 -TOOLTEST h5diff_11.txt file1.h5 file2.h5 g1/dset1 g1/dset2 +# 1.1 normal mode +TOOLTEST h5diff_11.txt file1.h5 file2.h5 -# 1.2 -TOOLTEST h5diff_12.txt file1.h5 file2.h5 -v -n 2 g1/dset1 g1/dset2 +# 1.2 normal mode with objects +TOOLTEST h5diff_12.txt file1.h5 file2.h5 g1/dset1 g1/dset2 -# 1.3 -TOOLTEST h5diff_13.txt file1.h5 file2.h5 -v -d 5 g1/dset3 g1/dset4 +# 1.3 report mode +TOOLTEST h5diff_13.txt file1.h5 file2.h5 -r -# 1.4 -TOOLTEST h5diff_14.txt file1.h5 file2.h5 -v -p 0.05 g1/dset3 g1/dset4 +# 1.4 report mode with objects +TOOLTEST h5diff_14.txt file1.h5 file2.h5 -r g1/dset1 g1/dset2 -# 1.5 -TOOLTEST h5diff_15.txt file1.h5 file2.h5 -v -r g1/dset1 g1/dset2 +# 1.5 with -d +TOOLTEST h5diff_15.txt file1.h5 file2.h5 -r -d 5 g1/dset3 g1/dset4 -# 1.6 -TOOLTEST h5diff_16.txt file1.h5 file2.h5 +# 1.6 with -p +TOOLTEST h5diff_16.txt file1.h5 file2.h5 -r -p 0.05 g1/dset3 g1/dset4 + +# 1.7 verbose mode +TOOLTEST h5diff_17.txt file1.h5 file2.h5 -v + +# 1.8 quiet mode +TOOLTEST h5diff_18.txt file1.h5 file2.h5 -q # ############################################################################## # # not comparable types @@ -190,31 +196,31 @@ TOOLTEST h5diff_601.txt file1.h5 file2.h5 -x # ############################################################################## # 6.2: no value -TOOLTEST h5diff_602.txt file1.h5 file2.h5 -d g1/dset3 g1/dset4 +TOOLTEST h5diff_602.txt file1.h5 file2.h5 -d g1/dset3 g1/dset4 # 6.3: negative value -TOOLTEST h5diff_603.txt file1.h5 file2.h5 -d -4 g1/dset3 g1/dset4 +TOOLTEST h5diff_603.txt file1.h5 file2.h5 -d -4 g1/dset3 g1/dset4 # 6.4: zero -TOOLTEST h5diff_604.txt file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4 +TOOLTEST h5diff_604.txt file1.h5 file2.h5 -d 0 g1/dset3 g1/dset4 # 6.5: non number -TOOLTEST h5diff_605.txt file1.h5 file2.h5 -d u g1/dset3 g1/dset4 +TOOLTEST h5diff_605.txt file1.h5 file2.h5 -d u g1/dset3 g1/dset4 # 6.6: hexadecimal TOOLTEST h5diff_606.txt file1.h5 file2.h5 -d 0x1 g1/dset3 g1/dset4 # 6.7: string -TOOLTEST h5diff_607.txt file1.h5 file2.h5 -d "1" g1/dset3 g1/dset4 +TOOLTEST h5diff_607.txt file1.h5 file2.h5 -d "1" g1/dset3 g1/dset4 # 6.8: repeated option -TOOLTEST h5diff_608.txt file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4 +TOOLTEST h5diff_608.txt file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4 # 6.9: number larger than biggest difference -TOOLTEST h5diff_609.txt file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4 +TOOLTEST h5diff_609.txt file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4 # 6.10: number smaller than smallest difference -TOOLTEST h5diff_610.txt file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 +TOOLTEST h5diff_610.txt file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 # ############################################################################## @@ -223,7 +229,7 @@ TOOLTEST h5diff_610.txt file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4 # 6.11: no value -TOOLTEST h5diff_611.txt file1.h5 file2.h5 -p g1/dset3 g1/dset4 +TOOLTEST h5diff_611.txt file1.h5 file2.h5 -r -p g1/dset3 g1/dset4 # 6.12: negative value TOOLTEST h5diff_612.txt file1.h5 file2.h5 -p -4 g1/dset3 g1/dset4 @@ -293,13 +299,13 @@ TOOLTEST h5diff_629.txt file1.h6 file2.h6 # # attributes # ############################################################################## -TOOLTEST h5diff_70.txt file5.h5 file6.h5 +TOOLTEST h5diff_70.txt file5.h5 file6.h5 -v # ############################################################################## # # all dataset datatypes # ############################################################################## -TOOLTEST h5diff_80.txt file7.h5 file8.h5 +TOOLTEST h5diff_80.txt file7.h5 file8.h5 -v diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 7ba5a6c..f9cb295 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -234,9 +234,6 @@ static int check_options(pack_opt_t *options) { int i, k, j, has_cp=0, has_ck=0; - unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block; - /*------------------------------------------------------------------------- * objects to layout *------------------------------------------------------------------------- @@ -337,8 +334,17 @@ static int check_options(pack_opt_t *options) default: break; case H5Z_FILTER_SZIP: + { + + unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; + unsigned szip_pixels_per_block; szip_pixels_per_block=pack.filter[j].cd_values[0]; + + if (pack.filter[j].szip_coding==0) + szip_options_mask=H5_SZIP_NN_OPTION_MASK; + else + szip_options_mask=H5_SZIP_EC_OPTION_MASK; /* check szip parameters */ if ( pack.chunk.rank!=-1 /* @@ -364,6 +370,7 @@ static int check_options(pack_opt_t *options) } + } break; } /* switch */ diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h index db89534..4691a74 100644 --- a/tools/h5repack/h5repack.h +++ b/tools/h5repack/h5repack.h @@ -21,7 +21,9 @@ #include "h5diff.h" #include "h5tools.h" +#if 0 #define CHECK_SZIP +#endif #define H5FOPENERROR "unable to open file" @@ -58,6 +60,11 @@ typedef struct { typedef struct { H5Z_filter_t filtn; /* filter identification number */ int cd_values[CDVALUES]; /* filter client data values */ + /* extra input for szip, selects the coding method + entropy coding method: EC=0 + nearest neighbor coding method: NN=1 + */ + int szip_coding; } filter_info_t; /* chunk lengths along each dimension and rank */ @@ -192,17 +199,6 @@ int apply_filters(const char* name, /* object name from traverse list */ int has_filter(hid_t dcpl_id, H5Z_filter_t filtnin); -int check_szip_params( unsigned bits_per_pixel, - unsigned pixels_per_block, - unsigned pixels_per_scanline, - hsize_t image_pixels); - -int check_szip(hid_t type_id, /* dataset datatype */ - int rank, /* chunk rank */ - hsize_t *dims, /* chunk dims */ - unsigned szip_options_mask /*IN*/, - unsigned *szip_pixels_per_block /*IN,OUT*/, - pack_opt_t *options); int can_read(const char* name, /* object name from traverse list */ hid_t dcpl_id, /* dataset creation property list */ @@ -337,6 +333,22 @@ int make_attr(hid_t loc_id, *------------------------------------------------------------------------- */ +#if defined (CHECK_SZIP) + +int check_szip_params( unsigned bits_per_pixel, + unsigned pixels_per_block, + unsigned pixels_per_scanline, + hsize_t image_pixels); + +int check_szip(hid_t type_id, /* dataset datatype */ + int rank, /* chunk rank */ + hsize_t *dims, /* chunk dims */ + unsigned szip_options_mask /*IN*/, + unsigned *szip_pixels_per_block /*IN,OUT*/, + pack_opt_t *options); + + + typedef struct { int compression_mode; @@ -368,6 +380,7 @@ typedef struct #define NN_MODE 1 #endif +#endif /* CHECK_SZIP */ #endif /* H5REPACK_H__ */ diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in index e4d65de..98b46ba 100755 --- a/tools/h5repack/h5repack.sh.in +++ b/tools/h5repack/h5repack.sh.in @@ -25,7 +25,7 @@ USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" H5REPACK=h5repack # The tool name H5REPACK_BIN=`pwd`/$H5REPACK # The path of the tool binary -H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF=../h5diff/h5diff # The h5diff tool name H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary nerrors=0 @@ -68,9 +68,9 @@ DIFFTEST() { VERIFY $@ if [ "`uname -s`" = "TFLOPS O/S" ]; then - $RUNSERIAL $H5DIFF_BIN $@ + $RUNSERIAL $H5DIFF_BIN $@ -q else - $RUNSERIAL $H5DIFF_BIN "$@" + $RUNSERIAL $H5DIFF_BIN "$@" -q fi RET=$? if [ $RET != 0 ] ; then @@ -151,7 +151,7 @@ else fi # szip with individual object -arg="test4.h5 -f dset2:SZIP=8 -l dset2:CHUNK=20x10" +arg="test4.h5 -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else @@ -159,7 +159,7 @@ else fi # szip for all -arg="test4.h5 -f SZIP=8" +arg="test4.h5 -f SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" ; then SKIP $arg else @@ -200,7 +200,7 @@ else fi # all filters -arg="test4.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8 -f dset2:GZIP=1 -l dset2:CHUNK=20x10" +arg="test4.h5 -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_SHUFFLE != "yes" -o $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else @@ -285,7 +285,7 @@ fi #filter conversions -arg="test_deflate.h5 -f dset_deflate:SZIP=8" +arg="test_deflate.h5 -f dset_deflate:SZIP=8,NN" if test $USE_FILTER_SZIP_ENCODER != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" ; then SKIP $arg else diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 870f3c7..5937eb8 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -19,6 +19,96 @@ #include "H5private.h" #include "h5repack.h" +#if 0 +#define PRINT_DEBUG +#endif + +/*------------------------------------------------------------------------- + * Function: print_obj + * + * Purpose: print name and filters of an object + * + *------------------------------------------------------------------------- + */ +static void print_obj(hid_t dcpl, char *name) +{ + char str[255]; +#if defined (PRINT_DEBUG ) + char temp[255]; +#endif + int nfilters; /* number of filters */ + unsigned filt_flags; /* filter flags */ + H5Z_filter_t filtn; /* filter identification number */ + unsigned cd_values[20]; /* filter client data values */ + size_t cd_nelmts; /* filter client number of values */ + char f_name[256]; /* filter name */ + int i; + + strcpy(str,"\0"); + + /* get information about input filters */ + if ((nfilters = H5Pget_nfilters(dcpl))<0) + return; + + for ( i=0; i<nfilters; i++) + { + cd_nelmts = NELMTS(cd_values); + filtn = H5Pget_filter(dcpl, + (unsigned)i, + &filt_flags, + &cd_nelmts, + cd_values, + sizeof(f_name), + f_name); + switch (filtn) + { + default: + break; + case H5Z_FILTER_DEFLATE: + strcat(str,"GZIP "); + +#if defined (PRINT_DEBUG) + { + unsigned level=cd_values[0]; + sprintf(temp,"(%d)",level); + strcat(str,temp); + } +#endif + + break; + case H5Z_FILTER_SZIP: + strcat(str,"SZIP "); + +#if defined (PRINT_DEBUG) + { + unsigned options_mask=cd_values[0]; /* from dcpl, not filt*/ + unsigned ppb=cd_values[1]; + sprintf(temp,"(%d,",ppb); + strcat(str,temp); + if (options_mask & H5_SZIP_EC_OPTION_MASK) + strcpy(temp,"EC) "); + else if (options_mask & H5_SZIP_NN_OPTION_MASK) + strcpy(temp,"NN) "); + } + strcat(str,temp); + +#endif + + break; + case H5Z_FILTER_SHUFFLE: + strcat(str,"SHUF "); + break; + case H5Z_FILTER_FLETCHER32: + strcat(str,"FLET "); + break; + } /* switch */ + }/*i*/ + + printf(" %-10s %s %s\n", "dataset",str,name ); + +} + + /*------------------------------------------------------------------------- * Function: copy_objects * @@ -112,46 +202,6 @@ out: } -/*------------------------------------------------------------------------- - * Function: print_obj - * - * Purpose: print name and filters of an object - * - *------------------------------------------------------------------------- - */ - - -void print_obj(pack_info_t *obj, char *name) -{ - char str[26]; /*5x5+1*/ - int i; - - strcpy(str,"\0"); - - for ( i=0; i<obj->nfilters; i++) - { - switch (obj->filter[i].filtn) - { - default: - break; - case H5Z_FILTER_DEFLATE: - strcat(str,"GZIP "); - break; - case H5Z_FILTER_SZIP: - strcat(str,"SZIP "); - break; - case H5Z_FILTER_SHUFFLE: - strcat(str,"SHUF "); - break; - case H5Z_FILTER_FLETCHER32: - strcat(str,"FLET "); - break; - } /* switch */ - }/*i*/ - - printf(" %-10s %s %s\n", "dataset",str,name ); - -} /*------------------------------------------------------------------------- @@ -262,9 +312,6 @@ int do_copy_objects(hid_t fidin, if ((msize=H5Tget_size(mtype_id))==0) goto error; - if (options->verbose) - print_filters(dcpl_id); - /*------------------------------------------------------------------------- * check for external files *------------------------------------------------------------------------- @@ -370,7 +417,7 @@ int do_copy_objects(hid_t fidin, free(buf); if (options->verbose && wrote) - print_obj(&obj,travt->objs[i].name ); + print_obj(dcpl_id,travt->objs[i].name ); diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index 96390cf..9b172d3 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -122,8 +122,6 @@ int apply_filters(const char* name, /* object name from traverse list */ unsigned aggression; /* the deflate level */ hsize_t nelmts; /* number of elements in dataset */ size_t size; /* size of datatype in bytes */ - unsigned szip_options_mask=H5_SZIP_NN_OPTION_MASK; - unsigned szip_pixels_per_block; int i; /* check first if the object is to be filtered */ @@ -205,15 +203,23 @@ int apply_filters(const char* name, /* object name from traverse list */ *------------------------------------------------------------------------- */ case H5Z_FILTER_SZIP: - szip_pixels_per_block=obj->filter[i].cd_values[0]; - + { + unsigned options_mask; + unsigned pixels_per_block; + + pixels_per_block=obj->filter[i].cd_values[0]; + if (obj->filter[i].szip_coding==0) + options_mask=H5_SZIP_NN_OPTION_MASK; + else + options_mask=H5_SZIP_EC_OPTION_MASK; + #if defined (CHECK_SZIP) /* check szip parameters */ if (check_szip(type_id, obj->chunk.rank, obj->chunk.chunk_lengths, - szip_options_mask, - &szip_pixels_per_block, + options_mask, + &pixels_per_block, options)==1) { #endif @@ -221,9 +227,10 @@ int apply_filters(const char* name, /* object name from traverse list */ /* set up for szip data */ if(H5Pset_chunk(dcpl_id,obj->chunk.rank,obj->chunk.chunk_lengths)<0) return -1; - if (H5Pset_szip(dcpl_id, szip_options_mask, szip_pixels_per_block)<0) + if (H5Pset_szip(dcpl_id,options_mask,pixels_per_block)<0) return -1; + #if defined (CHECK_SZIP) } else @@ -234,6 +241,7 @@ int apply_filters(const char* name, /* object name from traverse list */ #endif + } break; /*------------------------------------------------------------------------- @@ -291,7 +299,7 @@ int print_filters(hid_t dcpl_id) unsigned cd_values[20]; /* filter client data values */ size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ - char f_name[256]; /* filter/file name */ + char f_name[256]; /* filter name */ char s[64]; /* temporary string buffer */ int i; @@ -326,6 +334,9 @@ int print_filters(hid_t dcpl_id) } +#if defined (CHECK_SZIP) + + /*------------------------------------------------------------------------- * Function: check_szip * @@ -548,3 +559,6 @@ int check_szip_params( unsigned bits_per_pixel, return 1; } +#endif /* CHECK_SZIP */ + + diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 810d30f..442af99 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -17,9 +17,25 @@ static void usage(void); -/* -h5repack main program -*/ +/*------------------------------------------------------------------------- + * Function: main + * + * Purpose: h5repack main program + * + * Return: 1, error, 0, no error + * + * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu + * + * Date: May 9, 2003 + * + * Comments: + * + * Modifications: July 2004 + * Introduced the extra EC or NN option for SZIP + * + *------------------------------------------------------------------------- + */ + int main(int argc, char **argv) { @@ -33,6 +49,10 @@ int main(int argc, char **argv) for ( i = 1; i < argc; i++) { + if (strcmp(argv[i], "-h") == 0) { + usage(); + exit(0); + } if (strcmp(argv[i], "-i") == 0) { infile = argv[++i]; } @@ -76,11 +96,15 @@ int main(int argc, char **argv) else if (argv[i][0] == '-') { usage(); + exit(1); } } if (infile == NULL || outfile == NULL) + { usage(); + exit(1); + } /* pack it */ ret=h5repack(infile,outfile,&options); @@ -112,8 +136,9 @@ void usage(void) printf("-i input Input HDF5 File\n"); printf("-o output Output HDF5 File\n"); printf("[-h] Print usage message\n"); + printf("[-v] Verbose mode. Print output (list of objects, filters, warnings)\n"); printf("[-f 'filter'] Filter type: 'filter' is a string with the format\n"); - printf(" <list of objects> : <name of filter> <filter parameters>\n"); + printf(" <list of objects> : <name of filter> = <filter parameters>\n"); printf(" <list of objects> is a comma separated list of object names\n"); printf(" meaning apply compression only to those objects.\n"); printf(" if no object names are specified, the filter is applied to all objects\n"); @@ -124,8 +149,10 @@ void usage(void) printf(" FLET, to apply the HDF5 checksum filter\n"); printf(" NONE, to remove the filter\n"); printf(" <filter parameters> is optional compression info\n"); - printf(" GZIP, the deflation level\n"); - printf(" SZIP, the pixels per block parameter\n"); + printf(" SHUF (no parameter)\n"); + printf(" FLET (no parameter)\n"); + printf(" GZIP=<deflation level> from 1-9\n"); + printf(" SZIP=<pixels per block,coding> (pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN')\n"); printf("[-l 'layout'] Layout type. 'layout' is a string with the format\n"); printf(" <list of objects> : <layout type>\n"); printf(" <list of objects> is a comma separated list of object names,\n"); @@ -143,8 +170,20 @@ void usage(void) printf("-m number Do not apply the filter to objects which size in bytes is smaller than number.\n"); printf(" If no size is specified a minimum of 1024 bytes is assumed.\n"); printf("\n"); - - exit(1); + printf("Examples of use:\n"); + printf("\n"); + printf("1) h5repack -i file1 -o file2 -f GZIP=1 -v\n"); + printf("\n"); + printf(" Applies GZIP compression to all objects in file1 and saves the output in file2\n"); + printf("\n"); + printf("2) h5repack -i file1 -o file2 -f dset1:SZIP=8,NN -v\n"); + printf("\n"); + printf(" Applies SZIP compression only to object 'dset1'\n"); + printf("\n"); + printf("3) h5repack -i file1 -o file2 -l dset1,dset2:CHUNK=20x10 -v\n"); + printf("\n"); + printf(" Applies chunked layout to objects 'dset1' and 'dset2'\n"); + printf("\n"); } diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c index 71cf1a8..cf76e82 100644 --- a/tools/h5repack/h5repack_opttable.c +++ b/tools/h5repack/h5repack_opttable.c @@ -35,7 +35,8 @@ void init_packobject(pack_info_t *obj) strcpy(obj->path,"\0"); for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++) { - obj->filter[j].filtn = -1; + obj->filter[j].filtn = -1; + obj->filter[j].szip_coding = -1; for ( k=0; k<CDVALUES; k++) obj->filter[j].cd_values[k] = -1; } @@ -109,7 +110,7 @@ static void aux_tblinsert_layout(pack_opttbl_t *table, static int aux_inctable(pack_opttbl_t *table, int n_objs ) { - int i, j, k; + int i; table->size += n_objs; table->objs = (pack_info_t*)realloc(table->objs, table->size * sizeof(pack_info_t)); @@ -119,17 +120,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs ) } for (i = table->nelems; i < table->size; i++) { - strcpy(table->objs[i].path,"\0"); - for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++) - { - table->objs[i].filter[j].filtn = -1; - for ( k=0; k<CDVALUES; k++) - table->objs[i].filter[j].cd_values[k] = -1; - } - table->objs[i].chunk.rank = -1; - table->objs[i].refobj_id = -1; - table->objs[i].layout = H5D_LAYOUT_ERROR; - table->objs[i].nfilters = 0; + init_packobject(&table->objs[i]); } return 0; } @@ -146,7 +137,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs ) int options_table_init( pack_opttbl_t **tbl ) { - int i, j, k; + int i; pack_opttbl_t* table = (pack_opttbl_t*) malloc(sizeof(pack_opttbl_t)); if (table==NULL) { printf("Error: not enough memory for options table\n"); @@ -163,17 +154,7 @@ int options_table_init( pack_opttbl_t **tbl ) for ( i=0; i<table->size; i++) { - strcpy(table->objs[i].path,"\0"); - for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++) - { - table->objs[i].filter[j].filtn = -1; - for ( k=0; k<CDVALUES; k++) - table->objs[i].filter[j].cd_values[k] = -1; - } - table->objs[i].chunk.rank = -1; - table->objs[i].refobj_id = -1; - table->objs[i].layout = H5D_LAYOUT_ERROR; - table->objs[i].nfilters = 0; + init_packobject(&table->objs[i]); } *tbl = table; diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c index 96f7bce..e6974c0 100644 --- a/tools/h5repack/h5repack_parse.c +++ b/tools/h5repack/h5repack_parse.c @@ -56,10 +56,11 @@ obj_list_t* parse_filter(const char *str, unsigned i, u; char c; size_t len=strlen(str); - int j, m, n, k, end_obj=-1, no_param=0; + int j, m, n, k, l, end_obj=-1, no_param=0; char sobj[MAX_NC_NAME]; char scomp[10]; char stype[5]; + char smask[3]; obj_list_t* obj_list=NULL; unsigned pixels_per_block; @@ -132,17 +133,74 @@ obj_list_t* parse_filter(const char *str, if ( c=='=') { /*one more parameter */ scomp[k]='\0'; /*cut space */ - /* here we could have 1, 2 or 3 digits */ - for ( m=0,u=i+1; u<len; u++,m++) { - c = str[u]; - if (!isdigit(c)){ - if (obj_list) free(obj_list); - printf("Input Error: Compression parameter not digit in <%s>\n",str); - exit(1); - } - stype[m]=c; - } - stype[m]='\0'; + /*SZIP is a special case , it can be + SZIP=8,EC + SZIP=8,NN + */ + + if (strcmp(scomp,"SZIP")==0) + { + l=-1; /* mask index check */ + for ( m=0,u=i+1; u<len; u++,m++) + { + if (str[u]==',') + { + stype[m]='\0'; /* end digit of szip */ + l=0; /* start EC or NN search */ + u++; /* skip ',' */ + } + c = str[u]; + if (!isdigit(c) && l==-1){ + if (obj_list) free(obj_list); + printf("Input Error: Compression parameter not digit in <%s>\n",str); + exit(1); + } + if (l==-1) + stype[m]=c; + else + { + smask[l]=c; + l++; + if (l==2) + { + smask[l]='\0'; + i=len-1; /* end */ + (*n_objs)--; /* we counted an extra ',' */ + if (strcmp(smask,"NN")==0) + filt->szip_coding=0; + else if (strcmp(smask,"EC")==0) + filt->szip_coding=1; + else + { + printf("Input Error: szip mask must be 'NN' or 'EC' \n"); + exit(1); + } + + } + } + + } /* u */ + } /*if */ + + else + { + /* here we could have 1 or 2 digits */ + for ( m=0,u=i+1; u<len; u++,m++) + { + c = str[u]; + if (!isdigit(c)){ + if (obj_list) free(obj_list); + printf("Input Error: Compression parameter not digit in <%s>\n",str); + exit(1); + } + stype[m]=c; + } /* u */ + + stype[m]='\0'; + } /*if */ + + + filt->cd_values[j++]=atoi(stype); i+=m; /* jump */ } @@ -249,6 +307,11 @@ obj_list_t* parse_filter(const char *str, printf("Input Error: pixels_per_block is too large in <%s>\n",str); exit(1); } + if ( (strcmp(smask,"NN")!=0) && (strcmp(smask,"EC")!=0) ) { + if (obj_list) free(obj_list); + printf("Input Error: szip mask must be 'NN' or 'EC' \n"); + exit(1); + } break; }; diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index 4f69d5f..94fa561 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -182,11 +182,6 @@ int h5repack_verify(const char *fname, goto error; if ((dcpl_id=H5Dget_create_plist(dset_id))<0) goto error; - - if (options->verbose) { - printf(" %-10s %s\n", "dataset",name ); - print_filters(dcpl_id); - } /*------------------------------------------------------------------------- * filter check @@ -252,11 +247,7 @@ int h5repack_verify(const char *fname, goto error; if ((dcpl_id=H5Dget_create_plist(dset_id))<0) goto error; - - if (options->verbose) { - printf(" %-10s %s\n", "dataset",name ); - print_filters(dcpl_id); - } + /*------------------------------------------------------------------------- * filter check *------------------------------------------------------------------------- diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c index 1a85bc5..af19db2 100644 --- a/tools/h5repack/testh5repack_main.c +++ b/tools/h5repack/testh5repack_main.c @@ -58,7 +58,7 @@ int main (void) * it returns RET==0 if the objects have the same data *------------------------------------------------------------------------- */ - + /*------------------------------------------------------------------------- * file with all kinds of dataset datatypes *------------------------------------------------------------------------- @@ -212,7 +212,7 @@ int main (void) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset2:SZIP=8",&pack_options)<0) + if (h5repack_addfilter("dset2:SZIP=8,EC",&pack_options)<0) TEST_ERROR; if (h5repack_addlayout("dset2:CHUNK=20x10",&pack_options)<0) TEST_ERROR; @@ -240,7 +240,7 @@ TESTING(" adding szip filter to all"); #if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("SZIP=8",&pack_options)<0) + if (h5repack_addfilter("SZIP=8,NN",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0) TEST_ERROR; @@ -400,7 +400,7 @@ TESTING(" addding shuffle filter to all"); #endif #if defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP) - if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0) + if (h5repack_addfilter("dset1:SZIP=8,NN",&pack_options)<0) TEST_ERROR; #endif @@ -901,21 +901,26 @@ TESTING(" addding shuffle filter to all"); SKIPPED(); #endif - /*------------------------------------------------------------------------- - * test the NONE global option + * file with all filters + * dset_all + * dset_deflate + * dset_szip + * dset_shuffle + * dset_fletcher32 *------------------------------------------------------------------------- */ + - TESTING(" removing all filters"); + TESTING(" filter conversion from deflate to szip"); #if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \ && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("NONE",&pack_options)<0) + if (h5repack_addfilter("dset_deflate:SZIP=8,NN",&pack_options)<0) TEST_ERROR; if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0) TEST_ERROR; @@ -930,54 +935,59 @@ TESTING(" addding shuffle filter to all"); #else SKIPPED(); #endif - - TESTING(" filter conversion from deflate to szip"); -/*------------------------------------------------------------------------- - * filter conversion from deflate to szip - *------------------------------------------------------------------------- - */ -#if (defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP)) && defined(H5_HAVE_FILTER_DEFLATE) + + TESTING(" filter conversion from szip to deflate"); + +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \ + && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) + if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset_deflate:SZIP=8",&pack_options)<0) + if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0) TEST_ERROR; - if (h5repack(FNAME8,FNAME8OUT,&pack_options)<0) + if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0) TEST_ERROR; - if (h5diff(FNAME8,FNAME8OUT,NULL,NULL,&diff_options) == 1) + if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1) TEST_ERROR; - if (h5repack_verify(FNAME8OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11OUT,&pack_options)<=0) TEST_ERROR; if (h5repack_end (&pack_options)<0) TEST_ERROR; + PASSED(); #else SKIPPED(); #endif - TESTING(" filter conversion from szip to deflate"); + /*------------------------------------------------------------------------- - * filter conversion from szip to deflate + * test the NONE global option *------------------------------------------------------------------------- */ -#if (defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP)) && defined(H5_HAVE_FILTER_DEFLATE) + + TESTING(" removing all filters"); + +#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_HAVE_FILTER_DEFLATE) \ + && defined (H5_HAVE_FILTER_FLETCHER32) && defined (H5_HAVE_FILTER_SHUFFLE) + if (h5repack_init (&pack_options, 0)<0) TEST_ERROR; - if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0) + if (h5repack_addfilter("NONE",&pack_options)<0) TEST_ERROR; - if (h5repack(FNAME7,FNAME7OUT,&pack_options)<0) + if (h5repack(FNAME11,FNAME11OUT,&pack_options)<0) TEST_ERROR; - if (h5diff(FNAME7,FNAME7OUT,NULL,NULL,&diff_options) == 1) + if (h5diff(FNAME11,FNAME11OUT,NULL,NULL,&diff_options) == 1) TEST_ERROR; - if (h5repack_verify(FNAME7OUT,&pack_options)<=0) + if (h5repack_verify(FNAME11OUT,&pack_options)<=0) TEST_ERROR; if (h5repack_end (&pack_options)<0) TEST_ERROR; + PASSED(); #else SKIPPED(); #endif - - + /*------------------------------------------------------------------------- * end diff --git a/tools/h5repack/testh5repack_make.c b/tools/h5repack/testh5repack_make.c index 249512c..b0293e3 100644 --- a/tools/h5repack/testh5repack_make.c +++ b/tools/h5repack/testh5repack_make.c @@ -586,7 +586,7 @@ int make_fletcher32(hid_t loc_id) /*------------------------------------------------------------------------- - * checksum + * fletcher32 *------------------------------------------------------------------------- */ #if defined (H5_HAVE_FILTER_FLETCHER32) @@ -625,7 +625,7 @@ out: /*------------------------------------------------------------------------- * Function: make_all * - * Purpose: make a dataset with the all filters + * Purpose: make a file with all filters * *------------------------------------------------------------------------- */ @@ -683,6 +683,69 @@ int make_all(hid_t loc_id) goto out; /*------------------------------------------------------------------------- + * fletcher32 + *------------------------------------------------------------------------- + */ +#if defined (H5_HAVE_FILTER_FLETCHER32) + /* remove the filters from the dcpl */ + if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0) + goto out; + /* set the checksum filter */ + if (H5Pset_fletcher32(dcpl)<0) + goto out; + if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf)<0) + goto out; +#endif + +/*------------------------------------------------------------------------- + * SZIP + *------------------------------------------------------------------------- + */ + /* Make sure encoding is enabled */ +#if defined (H5_SZIP_CAN_ENCODE) && defined (H5_HAVE_FILTER_SZIP) + /* remove the filters from the dcpl */ + if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0) + goto out; + /* set szip data */ + if(H5Pset_szip (dcpl,szip_options_mask,szip_pixels_per_block)<0) + goto out; + if (make_dset(loc_id,"dset_szip",sid,dcpl,buf)<0) + goto out; +#endif + +/*------------------------------------------------------------------------- + * shuffle + *------------------------------------------------------------------------- + */ +#if defined (H5_HAVE_FILTER_SHUFFLE) + /* remove the filters from the dcpl */ + if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0) + goto out; + /* set the shuffle filter */ + if (H5Pset_shuffle(dcpl)<0) + goto out; + if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf)<0) + goto out; +#endif + +/*------------------------------------------------------------------------- + * GZIP + *------------------------------------------------------------------------- + */ +#if defined (H5_HAVE_FILTER_DEFLATE) + /* remove the filters from the dcpl */ + if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0) + goto out; + /* set deflate data */ + if(H5Pset_deflate(dcpl, 1)<0) + goto out; + if (make_dset(loc_id,"dset_deflate",sid,dcpl,buf)<0) + goto out; +#endif + + + +/*------------------------------------------------------------------------- * close space and dcpl *------------------------------------------------------------------------- */ diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 5ddf455..818bc40 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -16,13 +16,28 @@ #include "h5diff.h" #include "H5private.h" + + +/*------------------------------------------------------------------------- + * Function: print_objname + * + * Purpose: print object name only when: + * 1) verbose mode + * 2) when diff was found (normal mode) + *------------------------------------------------------------------------- + */ +int print_objname(diff_opt_t *options, hsize_t nfound) +{ + return ( (options->m_verbose || nfound) && !options->m_quiet) ?1:0; +} + /*------------------------------------------------------------------------- * Function: h5diff * * Purpose: public function, can be called in an application program. * return differences between 2 HDF5 files * - * Return: Number of differences found; -1 for error. + * Return: Number of differences found. * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -31,17 +46,25 @@ *------------------------------------------------------------------------- */ -int h5diff(const char *fname1, - const char *fname2, - const char *objname1, - const char *objname2, - diff_opt_t *options) +hsize_t h5diff(const char *fname1, + const char *fname2, + const char *objname1, + const char *objname2, + diff_opt_t *options) { int nobjects1, nobjects2; trav_info_t *info1=NULL; trav_info_t *info2=NULL; hid_t file1_id, file2_id; - int nfound=0; + hsize_t nfound=0; + + if (options->m_quiet && + (options->m_verbose || options->m_report)) + { + printf("Error: -q (quiet mode) cannot be added to verbose or report modes\n"); + options->err_stat=1; + return 0; + } /*------------------------------------------------------------------------- * open the files first; if they are not valid, no point in continuing @@ -50,31 +73,40 @@ int h5diff(const char *fname1, /* disable error reporting */ H5E_BEGIN_TRY { - /* Open the files */ if ((file1_id=H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT))<0 ) { printf("h5diff: <%s>: unable to open file\n", fname1 ); - nfound = -1; + options->err_stat=1; + goto out; } if ((file2_id=H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT))<0 ) { printf("h5diff: <%s>: unable to open file\n", fname2 ); - nfound = -1; + options->err_stat=1; + goto out; } /* enable error reporting */ } H5E_END_TRY; - if (nfound<0) - return -1; + /*------------------------------------------------------------------------- * get the number of objects in the files *------------------------------------------------------------------------- */ - nobjects1 = h5trav_getinfo( file1_id, NULL, 0 ); nobjects2 = h5trav_getinfo( file2_id, NULL, 0 ); + if (nobjects1<0 || nobjects2<0) + { + printf("Error: Could not get get file contents\n"); + options->err_stat=1; + goto out; + } + + assert(nobjects1>0); + assert(nobjects2>0); + /*------------------------------------------------------------------------- * get the list of objects in the files *------------------------------------------------------------------------- @@ -84,7 +116,10 @@ int h5diff(const char *fname1, info2 = (trav_info_t*) malloc( nobjects2 * sizeof(trav_info_t)); if (info1==NULL || info2==NULL) { - nfound=-1; + printf("Error: Not enough memory for object list\n"); + options->err_stat=1; + if (info1) h5trav_freeinfo(info1,nobjects1); + if (info2) h5trav_freeinfo(info2,nobjects1); goto out; } @@ -99,6 +134,7 @@ int h5diff(const char *fname1, if ( objname1 ) { assert(objname2); + options->cmn_objs=1; /* eliminate warning */ nfound=diff_compare(file1_id,fname1,objname1,nobjects1,info1, file2_id,fname2,objname2,nobjects2,info2,options); } @@ -120,12 +156,13 @@ int h5diff(const char *fname1, out: /* close */ - H5Fclose(file1_id); - H5Fclose(file2_id); - - return nfound; + H5E_BEGIN_TRY { + H5Fclose(file1_id); + H5Fclose(file2_id); + } H5E_END_TRY; + return nfound; } @@ -145,13 +182,13 @@ out: * *------------------------------------------------------------------------- */ -int diff_match( hid_t file1_id, - int nobjects1, - trav_info_t *info1, - hid_t file2_id, - int nobjects2, - trav_info_t *info2, - diff_opt_t *options ) +hsize_t diff_match( hid_t file1_id, + int nobjects1, + trav_info_t *info1, + hid_t file2_id, + int nobjects2, + trav_info_t *info2, + diff_opt_t *options ) { int more_names_exist = (nobjects1>0 && nobjects2>0) ? 1 : 0; trav_table_t *table=NULL; @@ -160,7 +197,8 @@ int diff_match( hid_t file1_id, int curr2=0; unsigned infile[2]; char c1, c2; - int nfound=0, i; + hsize_t nfound=0; + int i; /*------------------------------------------------------------------------- * build the list @@ -168,7 +206,6 @@ int diff_match( hid_t file1_id, */ trav_table_init( &table ); - while ( more_names_exist ) { /* criteria is string compare */ @@ -226,7 +263,7 @@ int diff_match( hid_t file1_id, *------------------------------------------------------------------------- */ - if (options->verbose) + if (options->m_verbose) { printf("\n"); printf("file1 file2\n"); @@ -249,12 +286,15 @@ int diff_match( hid_t file1_id, for (i = 0; i < table->nobjs; i++) { if ( table->objs[i].flags[0] && table->objs[i].flags[1] ) + { + options->cmn_objs=1; nfound+=diff( file1_id, table->objs[i].name, file2_id, table->objs[i].name, options, table->objs[i].type ); + } } /* free table */ @@ -294,21 +334,21 @@ int diff_match( hid_t file1_id, *------------------------------------------------------------------------- */ -int diff_compare( hid_t file1_id, - const char *file1_name, - const char *obj1_name, - int nobjects1, - trav_info_t *info1, - hid_t file2_id, - const char *file2_name, - const char *obj2_name, - int nobjects2, - trav_info_t *info2, - diff_opt_t *options ) +hsize_t diff_compare( hid_t file1_id, + const char *file1_name, + const char *obj1_name, + int nobjects1, + trav_info_t *info1, + hid_t file2_id, + const char *file2_name, + const char *obj2_name, + int nobjects2, + trav_info_t *info2, + diff_opt_t *options ) { - int f1=0, f2=0; - int nfound=0; + int f1=0, f2=0; + hsize_t nfound=0; int i = h5trav_getindex( obj1_name, nobjects1, info1 ); int j = h5trav_getindex( obj2_name, nobjects2, info2 ); @@ -323,20 +363,23 @@ int diff_compare( hid_t file1_id, printf( "Object <%s> could not be found in <%s>\n", obj2_name, file2_name ); f2=1; } - if ( f1 || f2 ) - return -1; + if ( f1 || f2 ) { + options->err_stat=1; + return 0; + } /* use the name with "/" first, as obtained by iterator function */ obj1_name=info1[i].name; obj2_name=info2[j].name; /* objects are not the same type */ - if ( info1[i].type != info2[j].type && options->verbose) + if ( info1[i].type != info2[j].type) { + if (options->m_verbose) printf("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n", obj1_name, get_type(info1[i].type), obj2_name, get_type(info2[j].type) ); - return 1; + return 0; } nfound=diff( file1_id, obj1_name, file2_id, obj2_name, options, info1[i].type ); @@ -364,23 +407,23 @@ int diff_compare( hid_t file1_id, *------------------------------------------------------------------------- */ -int diff( hid_t file1_id, - const char *path1, - hid_t file2_id, - const char *path2, - diff_opt_t *options, - H5G_obj_t1 type ) +hsize_t diff( hid_t file1_id, + const char *path1, + hid_t file2_id, + const char *path2, + diff_opt_t *options, + H5G_obj_t1 type ) { - hid_t type1_id=-1; - hid_t type2_id=-1; - hid_t grp1_id=-1; - hid_t grp2_id=-1; + hid_t type1_id; + hid_t type2_id; + hid_t grp1_id; + hid_t grp2_id; int ret; H5G_stat_t sb1; H5G_stat_t sb2; char *buf1=NULL; char *buf2=NULL; - int nfound=-1; + hsize_t nfound=0; switch ( type ) { @@ -389,9 +432,9 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ case H5G_DATASET: - if (options->verbose) - printf( "Dataset: <%s> and <%s>\n",path1,path2); - nfound=diff_dataset(file1_id,file2_id,path1,path2,options); + nfound=diff_dataset(file1_id,file2_id,path1,path2,options); + if (print_objname(options,nfound)) + printf( "Dataset: <%s> and <%s>\n",path1,path2); break; /*------------------------------------------------------------------------- @@ -399,9 +442,6 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ case H5G_TYPE: - if (options->verbose) - printf( "Datatype: <%s> and <%s>\n",path1,path2); - if ((type1_id = H5Topen(file1_id, path1))<0) goto out; if ((type2_id = H5Topen(file2_id, path2))<0) @@ -412,6 +452,9 @@ int diff( hid_t file1_id, /* if H5Tequal is > 0 then the datatypes refer to the same datatype */ nfound = (ret>0) ? 0 : 1; + + if (print_objname(options,nfound)) + printf( "Datatype: <%s> and <%s>\n",path1,path2); /*------------------------------------------------------------------------- * compare attributes @@ -419,7 +462,7 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ if (path1) - nfound=diff_attr(type1_id,type2_id,path1,path2,options); + diff_attr(type1_id,type2_id,path1,path2,options); if ( H5Tclose(type1_id)<0) goto out; @@ -433,9 +476,6 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ case H5G_GROUP: - if (options->verbose) - printf( "Group: <%s> and <%s>\n",path1,path2); - if ((grp1_id = H5Gopen(file1_id, path1))<0) goto out; if ((grp2_id = H5Gopen(file2_id, path2))<0) @@ -445,6 +485,9 @@ int diff( hid_t file1_id, /* if "path1" != "path2" then the groups are "different" */ nfound = (ret!=0) ? 1 : 0; + + if (print_objname(options,nfound)) + printf( "Group: <%s> and <%s>\n",path1,path2); /*------------------------------------------------------------------------- * compare attributes @@ -452,7 +495,7 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ if (path1) - nfound=diff_attr(grp1_id,grp2_id,path1,path2,options); + diff_attr(grp1_id,grp2_id,path1,path2,options); if ( H5Gclose(grp1_id)<0) goto out; @@ -467,9 +510,6 @@ int diff( hid_t file1_id, *------------------------------------------------------------------------- */ case H5G_LINK: - if (options->verbose) - printf( "Link: <%s> and <%s>\n",path1,path2); - if (H5Gget_objinfo(file1_id,path1,FALSE,&sb1)<0) goto out; if (H5Gget_objinfo(file1_id,path1,FALSE,&sb2)<0) @@ -488,6 +528,9 @@ int diff( hid_t file1_id, /* if "buf1" != "buf2" then the links are "different" */ nfound = (ret!=0) ? 1 : 0; + if (print_objname(options,nfound)) + printf( "Link: <%s> and <%s>\n",path1,path2); + if (buf1) { free(buf1); buf1=NULL; @@ -503,7 +546,7 @@ int diff( hid_t file1_id, default: nfound=0; - if (options->verbose) { + if (options->m_verbose) { printf("Comparison not supported: <%s> and <%s> are of type %s\n", path1, path2, get_type(type) ); } diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 09a96fd..57e8f66 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -51,14 +51,18 @@ */ typedef struct { - int r; /* report only what objects differ */ - int d; /* delta */ - double delta; /* delta value */ - int p; /* relative error */ - double percent; /* relative error value */ - int n; /* count */ - int count; /* count value */ - int verbose; /* print information */ + int m_quiet; /* quiet mide: no output at all */ + int m_report; /* report mode: print the data */ + int m_verbose; /* verbose mode: print the data, list of objcets, warnings */ + int d; /* delta, absolute value to compare */ + double delta; /* delta value */ + int p; /* relative error to compare*/ + double percent; /* relative error value */ + int n; /* count, compare up to count */ + int count; /* count value */ + int err_stat; /* an error ocurred (1, error, 0, no error) */ + int cmn_objs; /* do we have comparable objects */ + } diff_opt_t; @@ -72,11 +76,11 @@ typedef struct { extern "C" { #endif -int h5diff(const char *fname1, - const char *fname2, - const char *objname1, - const char *objname2, - diff_opt_t *options); +hsize_t h5diff(const char *fname1, + const char *fname2, + const char *objname1, + const char *objname2, + diff_opt_t *options); #ifdef __cplusplus @@ -91,56 +95,56 @@ int h5diff(const char *fname1, */ -int diff_dataset( hid_t file1_id, - hid_t file2_id, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options ); +hsize_t diff_dataset( hid_t file1_id, + hid_t file2_id, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *options ); + +hsize_t diff_datasetid( hid_t dset1_id, + hid_t dset2_id, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *options ); -int diff_datasetid( hid_t dset1_id, - hid_t dset2_id, - const char *obj1_name, - const char *obj2_name, +hsize_t diff( hid_t file1_id, + const char *path1, + hid_t file2_id, + const char *path2, + diff_opt_t *options, + H5G_obj_t1 type ); + +hsize_t diff_compare( hid_t file1_id, + const char *file1_name, + const char *obj1_name, + int nobjects1, + trav_info_t *info1, + hid_t file2_id, + const char *file2_name, + const char *obj2_name, + int nobjects2, + trav_info_t *info2, + diff_opt_t *options ); + +hsize_t diff_match( hid_t file1_id, + int nobjects1, + trav_info_t *info1, + hid_t file2_id, + int nobjects2, + trav_info_t *info2, diff_opt_t *options ); -int diff( hid_t file1_id, - const char *path1, - hid_t file2_id, - const char *path2, - diff_opt_t *options, - H5G_obj_t1 type ); - -int diff_compare( hid_t file1_id, - const char *file1_name, - const char *obj1_name, - int nobjects1, - trav_info_t *info1, - hid_t file2_id, - const char *file2_name, - const char *obj2_name, - int nobjects2, - trav_info_t *info2, - diff_opt_t *options ); - -int diff_match( hid_t file1_id, - int nobjects1, - trav_info_t *info1, - hid_t file2_id, - int nobjects2, - trav_info_t *info2, - diff_opt_t *options ); - -int diff_array( void *_mem1, - void *_mem2, - hsize_t nelmts, - int rank, - hsize_t *dims, - diff_opt_t *options, - const char *name1, - const char *name2, - hid_t m_type, - hid_t container1_id, - hid_t container2_id); /* dataset where the reference came from*/ +hsize_t diff_array( void *_mem1, + void *_mem2, + hsize_t nelmts, + int rank, + hsize_t *dims, + diff_opt_t *options, + const char *name1, + const char *name2, + hid_t m_type, + hid_t container1_id, + hid_t container2_id); /* dataset where the reference came from*/ int diff_can_type( hid_t f_type1, /* file data type */ @@ -169,6 +173,7 @@ int diff_attr(hid_t loc1_id, *------------------------------------------------------------------------- */ +void print_found(hsize_t nfound); void print_type(hid_t type); const char* diff_basename(const char *name); const char* get_type(int type); @@ -184,15 +189,52 @@ void print_pos( int *ph, const char *obj1, const char *obj2 ); +int print_objname(diff_opt_t *options, hsize_t nfound); + + #if defined (H5DIFF_DEBUG) void print_sizes( const char *obj1, const char *obj2, hid_t f_type1, hid_t f_type2, hid_t m_type1, hid_t m_type2 ); #endif -#ifdef NOT_YET -void diff_list( const char *filename, int nobjects, trav_info_t *info ); -#endif /* NOT_YET */ + +hsize_t diff_native_uchar(unsigned char *mem1, + unsigned char *mem2, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); + + +hsize_t diff_char(unsigned char *mem1, + unsigned char *mem2, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph); + +hsize_t diff_datum(void *_mem1, + void *_mem2, + hid_t m_type, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + hid_t container1_id, + hid_t container2_id, /*where the reference came from*/ + int *ph); /*print header */ diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 25ebf83..51d87d0 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -16,54 +16,28 @@ #include "h5diff.h" #include "H5private.h" -static int diff_datum(void *_mem1, - void *_mem2, - hid_t m_type, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - hid_t container1_id, - hid_t container2_id, - int *ph); - -static int diff_native_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); - -static int diff_char(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph); - +/* local functions */ +static void close_obj(H5G_obj_t1 obj_type, hid_t obj_id); +static int diff_region(hid_t region1_id, hid_t region2_id); static hbool_t is_zero(const void *_mem, size_t size); -static void close_obj(H5G_obj_t1 obj_type, hid_t obj_id); -static int diff_region(hid_t region1_id, hid_t region2_id); - +/*------------------------------------------------------------------------- + * Function: print_data + * + * Purpose: print data only in report or verbose modes + *------------------------------------------------------------------------- + */ +static int print_data(diff_opt_t *options) +{ + return (options->m_report || options->m_verbose==1)?1:0; +} /*------------------------------------------------------------------------- * Function: diff_array * * Purpose: compare two memory buffers; * - * Return: number of differences found, -1 on error + * Return: number of differences found * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -72,19 +46,19 @@ static int diff_region(hid_t region1_id, hid_t region2_id); *------------------------------------------------------------------------- */ -int diff_array( void *_mem1, - void *_mem2, - hsize_t nelmts, - int rank, - hsize_t *dims, - diff_opt_t *options, - const char *name1, - const char *name2, - hid_t m_type, - hid_t container1_id, - hid_t container2_id) /* dataset where the reference came from*/ +hsize_t diff_array( void *_mem1, + void *_mem2, + hsize_t nelmts, + int rank, + hsize_t *dims, + diff_opt_t *options, + const char *name1, + const char *name2, + hid_t m_type, + hid_t container1_id, + hid_t container2_id) /* dataset where the reference came from*/ { - int nfound=0; /* number of differences found */ + hsize_t nfound=0; /* number of differences found */ size_t size; /* size of datum */ unsigned char *mem1 = (unsigned char*)_mem1; unsigned char *mem2 = (unsigned char*)_mem2; @@ -164,7 +138,7 @@ int diff_array( void *_mem1, * * Purpose: Compare the values pointed to in _MEM1 and _MEM2 of type M_TYPE * - * Return: number of differences found, -1 on error + * Return: number of differences found * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -197,20 +171,19 @@ int diff_array( void *_mem1, *------------------------------------------------------------------------- */ -static -int diff_datum( void *_mem1, - void *_mem2, - hid_t m_type, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - hid_t container1_id, - hid_t container2_id, /*where the reference came from*/ - int *ph) /*print header */ +hsize_t diff_datum(void *_mem1, + void *_mem2, + hid_t m_type, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + hid_t container1_id, + hid_t container2_id, /*where the reference came from*/ + int *ph) /*print header */ { char fmt_llong[255], fmt_ullong[255]; char fmt_llongp[255], fmt_ullongp[255]; @@ -234,7 +207,8 @@ int diff_datum( void *_mem1, hid_t obj2_id; H5G_stat_t sb1; H5G_stat_t sb2; - int nfound=0; /* differences found */ + hsize_t nfound=0; /* differences found */ + int ret; /* Build default formats for long long types */ sprintf(fmt_llong, "%%%sd %%%sd %%%sd\n", @@ -381,7 +355,7 @@ int diff_datum( void *_mem1, if (HDstrcmp(enum_name1,enum_name2)!=0) { nfound=1; - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -501,17 +475,22 @@ int diff_datum( void *_mem1, hid_t region2_id; if ((obj1_id = H5Rdereference(container1_id, H5R_DATASET_REGION, _mem1))<0) - return -1; + ret= -1; if ((obj2_id = H5Rdereference(container2_id, H5R_DATASET_REGION, _mem2))<0) - return -1; + ret= -1; if (H5Gget_objinfo(obj1_id, ".", FALSE, &sb1)<0) - return -1; + ret= -1; if (H5Gget_objinfo(obj2_id, ".", FALSE, &sb2)<0) - return -1; + ret= -1; if ((region1_id = H5Rget_region(container1_id, H5R_DATASET_REGION, _mem1))<0) - return -1; + ret= -1; if ((region2_id = H5Rget_region(container2_id, H5R_DATASET_REGION, _mem2))<0) - return -1; + ret= -1; + + if (ret==-1) { + options->err_stat=1; + return 0; + } if (diff_region(region1_id,region2_id)) { @@ -535,9 +514,13 @@ int diff_datum( void *_mem1, { if ((obj1_type = H5Rget_obj_type(container1_id, H5R_OBJECT, _mem1))<0) - return -1; + ret= -1; if ((obj2_type = H5Rget_obj_type(container2_id, H5R_OBJECT, _mem2))<0) - return -1; + ret= -1; + if (ret==-1) { + options->err_stat=1; + return 0; + } /* check object type */ if (obj1_type!=obj2_type) @@ -547,9 +530,13 @@ int diff_datum( void *_mem1, } if ((obj1_id = H5Rdereference(container1_id, H5R_OBJECT, _mem1))<0) - return -1; + ret= -1; if ((obj2_id = H5Rdereference(container2_id, H5R_OBJECT, _mem2))<0) - return -1; + ret= -1; + if (ret==-1) { + options->err_stat=1; + return 0; + } /*deep compare */ @@ -597,7 +584,7 @@ int diff_datum( void *_mem1, { if (abs(temp1_char-temp2_char) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -611,7 +598,7 @@ int diff_datum( void *_mem1, { if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -627,7 +614,7 @@ int diff_datum( void *_mem1, if ( temp1_char!=0 && abs(1-temp2_char/temp1_char) > options->percent && abs(temp1_char-temp2_char) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -639,7 +626,7 @@ int diff_datum( void *_mem1, } else if (temp1_char != temp2_char) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -667,7 +654,7 @@ int diff_datum( void *_mem1, { if (abs(temp1_uchar-temp2_uchar) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -681,7 +668,7 @@ int diff_datum( void *_mem1, { if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -697,7 +684,7 @@ int diff_datum( void *_mem1, if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options->percent && abs(temp1_uchar-temp2_uchar) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -709,7 +696,7 @@ int diff_datum( void *_mem1, } else if (temp1_uchar != temp2_uchar) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -739,7 +726,7 @@ int diff_datum( void *_mem1, { if (abs(temp1_short-temp2_short) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -753,7 +740,7 @@ int diff_datum( void *_mem1, { if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -769,7 +756,7 @@ int diff_datum( void *_mem1, if ( temp1_short!=0 && abs(1-temp2_short/temp1_short) > options->percent && abs(temp1_short-temp2_short) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -781,7 +768,7 @@ int diff_datum( void *_mem1, } else if (temp1_short != temp2_short) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -812,7 +799,7 @@ int diff_datum( void *_mem1, if (abs(temp1_ushort-temp2_ushort) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -827,7 +814,7 @@ int diff_datum( void *_mem1, if ( temp1_ushort!=0 && abs(1-temp2_ushort/temp1_ushort) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -844,7 +831,7 @@ int diff_datum( void *_mem1, abs(temp1_ushort-temp2_ushort) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -857,7 +844,7 @@ int diff_datum( void *_mem1, else if (temp1_ushort != temp2_ushort) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -889,7 +876,7 @@ int diff_datum( void *_mem1, if (abs(temp1_int-temp2_int) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -904,7 +891,7 @@ int diff_datum( void *_mem1, if ( temp1_int!=0 && abs(1-temp2_int/temp1_int) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -921,7 +908,7 @@ int diff_datum( void *_mem1, abs(temp1_int-temp2_int) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -934,7 +921,7 @@ int diff_datum( void *_mem1, else if (temp1_int != temp2_int) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -966,7 +953,7 @@ int diff_datum( void *_mem1, if (abs((int)(temp1_uint-temp2_uint)) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -981,7 +968,7 @@ int diff_datum( void *_mem1, if ( temp1_uint!=0 && abs((int)(1-temp2_uint/temp1_uint)) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -998,7 +985,7 @@ int diff_datum( void *_mem1, abs((int)(temp1_uint-temp2_uint)) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1011,7 +998,7 @@ int diff_datum( void *_mem1, else if (temp1_uint != temp2_uint) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1044,7 +1031,7 @@ int diff_datum( void *_mem1, if (labs(temp1_long-temp2_long) > (long)options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1059,7 +1046,7 @@ int diff_datum( void *_mem1, if ( temp1_long!=0 && labs(1-temp2_long/temp1_long) > (long)options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1076,7 +1063,7 @@ int diff_datum( void *_mem1, labs(temp1_long-temp2_long) > (long)options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1089,7 +1076,7 @@ int diff_datum( void *_mem1, else if (temp1_long != temp2_long) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1121,7 +1108,7 @@ int diff_datum( void *_mem1, if (labs((long)(temp1_ulong-temp2_ulong)) > (long)options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1136,7 +1123,7 @@ int diff_datum( void *_mem1, if ( temp1_ulong!=0 && labs((long)(1-temp2_ulong/temp1_ulong)) > (long)options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1153,7 +1140,7 @@ int diff_datum( void *_mem1, labs((long)(temp1_ulong-temp2_ulong)) > (long)options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1166,7 +1153,7 @@ int diff_datum( void *_mem1, else if (temp1_ulong != temp2_ulong) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1197,7 +1184,7 @@ int diff_datum( void *_mem1, if (labs((long)(temp1_llong-temp2_llong)) > (long)options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1212,7 +1199,7 @@ int diff_datum( void *_mem1, if ( temp1_llong!=0 && labs((long)(1-temp2_llong/temp1_llong)) > (long)options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1229,7 +1216,7 @@ int diff_datum( void *_mem1, labs((long)(temp1_llong-temp2_llong)) > (long)options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1242,7 +1229,7 @@ int diff_datum( void *_mem1, else if (temp1_llong != temp2_llong) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1273,7 +1260,7 @@ int diff_datum( void *_mem1, if (labs((long)(temp1_ullong-temp2_ullong)) > (long)options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1289,7 +1276,7 @@ int diff_datum( void *_mem1, if ( temp1_ullong!=0 && labs((long)(1-temp2_ullong/temp1_ullong)) > (long)options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1307,7 +1294,7 @@ int diff_datum( void *_mem1, labs((long)(temp1_ullong-temp2_ullong)) > (long)options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1321,7 +1308,7 @@ int diff_datum( void *_mem1, else if (temp1_ullong != temp2_ullong) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1358,7 +1345,7 @@ int diff_datum( void *_mem1, if (fabs(temp1_float-temp2_float) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1373,7 +1360,7 @@ int diff_datum( void *_mem1, if ( temp1_float!=0 && fabs(1-temp2_float/temp1_float) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1390,7 +1377,7 @@ int diff_datum( void *_mem1, fabs(temp1_float-temp2_float) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1403,7 +1390,7 @@ int diff_datum( void *_mem1, else if (temp1_float != temp2_float) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1433,7 +1420,7 @@ int diff_datum( void *_mem1, if (fabs(temp1_double-temp2_double) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1448,7 +1435,7 @@ int diff_datum( void *_mem1, if ( temp1_double!=0 && fabs(1-temp2_double/temp1_double) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1465,7 +1452,7 @@ int diff_datum( void *_mem1, fabs(temp1_double-temp2_double) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1478,7 +1465,7 @@ int diff_datum( void *_mem1, else if (temp1_double != temp2_double) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1514,19 +1501,18 @@ int diff_datum( void *_mem1, *------------------------------------------------------------------------- */ -static -int diff_native_uchar(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +hsize_t diff_native_uchar(unsigned char *mem1, + unsigned char *mem2, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph) { - int nfound=0; /* differences found */ + hsize_t nfound=0; /* differences found */ unsigned char temp1_uchar; unsigned char temp2_uchar; @@ -1538,7 +1524,7 @@ int diff_native_uchar(unsigned char *mem1, { if (abs(temp1_uchar-temp2_uchar) > options->delta) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1552,7 +1538,7 @@ int diff_native_uchar(unsigned char *mem1, { if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options->percent ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1568,7 +1554,7 @@ int diff_native_uchar(unsigned char *mem1, if ( temp1_uchar!=0 && abs(1-temp2_uchar/temp1_uchar) > options->percent && abs(temp1_uchar-temp2_uchar) > options->delta ) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,1,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1580,7 +1566,7 @@ int diff_native_uchar(unsigned char *mem1, } else if (temp1_uchar != temp2_uchar) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); @@ -1607,19 +1593,18 @@ int diff_native_uchar(unsigned char *mem1, *------------------------------------------------------------------------- */ -static -int diff_char(unsigned char *mem1, - unsigned char *mem2, - hsize_t i, - int rank, - hsize_t *acc, - hsize_t *pos, - diff_opt_t *options, - const char *obj1, - const char *obj2, - int *ph) +hsize_t diff_char(unsigned char *mem1, + unsigned char *mem2, + hsize_t i, + int rank, + hsize_t *acc, + hsize_t *pos, + diff_opt_t *options, + const char *obj1, + const char *obj2, + int *ph) { - int nfound=0; /* differences found */ + hsize_t nfound=0; /* differences found */ unsigned char temp1_uchar; unsigned char temp2_uchar; @@ -1628,7 +1613,7 @@ int diff_char(unsigned char *mem1, if (temp1_uchar != temp2_uchar) { - if ( options->r==0 ) + if ( print_data(options) ) { print_pos(ph,0,i,acc,pos,rank,obj1,obj2); printf(SPACES); diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 65e16ba..bf3a874 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -28,7 +28,6 @@ * Return: * 0 : no differences found * 1 : differences found - * -1 : error ocurred * * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu * @@ -63,8 +62,10 @@ int diff_attr(hid_t loc1_id, hsize_t dims2[H5S_MAX_RANK];/* dimensions of dataset */ char name1[255]; char name2[255]; - int n1, n2, i, j, nfound; + int n1, n2, i, j; int ret=0; + hsize_t nfound; + int cmp=1; if ((n1 = H5Aget_num_attrs(loc1_id))<0) goto error; @@ -99,7 +100,7 @@ int diff_attr(hid_t loc1_id, if (HDstrcmp(name1,name2)!=0) { - if (options->verbose) + if (options->m_verbose) { printf("Different name for attributes: <%s> and <%s>\n", name1, name2); } @@ -144,7 +145,13 @@ int diff_attr(hid_t loc1_id, name1, name2, options)!=1) - goto error; + cmp=0; +/*------------------------------------------------------------------------- + * only attempt to compare if possible + *------------------------------------------------------------------------- + */ + if (cmp) + { /*------------------------------------------------------------------------- * read to memory @@ -180,9 +187,6 @@ int diff_attr(hid_t loc1_id, * array compare *------------------------------------------------------------------------- */ - - if (options->verbose) - printf( "Attribute: <%s> and <%s>\n",name1,name2); sprintf(name1,"%s of <%s>",name1,path1); sprintf(name2,"%s of <%s>",name2,path2); nfound = diff_array(buf1, @@ -196,8 +200,18 @@ int diff_attr(hid_t loc1_id, mtype1_id, attr1_id, attr2_id); - if (options->verbose && nfound) - printf("%d differences found\n", nfound ); + + }/*cmp*/ + +/*------------------------------------------------------------------------- + * print how many differences were found + *------------------------------------------------------------------------- + */ + if (print_objname(options,nfound)) + { + printf( "Attribute: <%s> and <%s>\n",name1,name2); + print_found(nfound); + } /*------------------------------------------------------------------------- @@ -236,7 +250,9 @@ error: if (buf2) HDfree(buf2); } H5E_END_TRY; - return -1; + + options->err_stat=1; + return 0; } diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 55a0f73..69acfbd 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -30,47 +30,43 @@ * *------------------------------------------------------------------------- */ -int diff_dataset( hid_t file1_id, - hid_t file2_id, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options ) +hsize_t diff_dataset( hid_t file1_id, + hid_t file2_id, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *options ) { - hid_t dset1_id =-1; - hid_t dset2_id =-1; - hid_t dcpl1_id=-1; - hid_t dcpl2_id=-1; - int gout=0, nfound=0; - - - /* disable error reporting */ - H5E_BEGIN_TRY { + hid_t dset1_id=-1; + hid_t dset2_id=-1; + hid_t dcpl1_id=-1; + hid_t dcpl2_id=-1; + hsize_t nfound=0; /*------------------------------------------------------------------------- * open the handles *------------------------------------------------------------------------- */ - + /* disable error reporting */ + H5E_BEGIN_TRY { /* Open the datasets */ if ( (dset1_id = H5Dopen(file1_id,obj1_name)) < 0 ) { printf("Cannot open dataset <%s>\n", obj1_name ); - gout=1; + goto error; } if ( (dset2_id = H5Dopen(file2_id,obj2_name)) < 0 ) { printf("Cannot open dataset <%s>\n", obj2_name ); - gout=1; + goto error; } /* enable error reporting */ } H5E_END_TRY; - if (gout) - goto out; + if ((dcpl1_id=H5Dget_create_plist(dset1_id))<0) - goto out; + goto error; if ((dcpl2_id=H5Dget_create_plist(dset2_id))<0) - goto out; + goto error; /*------------------------------------------------------------------------- * check if the dataset creation property list has filters that @@ -79,8 +75,8 @@ int diff_dataset( hid_t file1_id, * 2) the internal filters might be turned off *------------------------------------------------------------------------- */ - if ((h5tools_canreadf((options->verbose?obj1_name:NULL),dcpl1_id)==1) && - (h5tools_canreadf((options->verbose?obj2_name:NULL),dcpl2_id)==1)) + if ((h5tools_canreadf((options->m_verbose?obj1_name:NULL),dcpl1_id)==1) && + (h5tools_canreadf((options->m_verbose?obj2_name:NULL),dcpl2_id)==1)) { nfound=diff_datasetid(dset1_id, dset2_id, @@ -92,7 +88,19 @@ int diff_dataset( hid_t file1_id, * close *------------------------------------------------------------------------- */ -out: + /* disable error reporting */ + H5E_BEGIN_TRY { + H5Pclose(dcpl1_id); + H5Pclose(dcpl2_id); + H5Dclose(dset1_id); + H5Dclose(dset2_id); + /* enable error reporting */ + } H5E_END_TRY; + + return nfound; + +error: + options->err_stat=1; /* disable error reporting */ H5E_BEGIN_TRY { H5Pclose(dcpl1_id); @@ -123,11 +131,11 @@ out: * *------------------------------------------------------------------------- */ -int diff_datasetid( hid_t dset1_id, - hid_t dset2_id, - const char *obj1_name, - const char *obj2_name, - diff_opt_t *options ) +hsize_t diff_datasetid( hid_t dset1_id, + hid_t dset2_id, + const char *obj1_name, + const char *obj2_name, + diff_opt_t *options ) { hid_t space1_id =-1; hid_t space2_id =-1; @@ -142,36 +150,37 @@ int diff_datasetid( hid_t dset1_id, hsize_t dims2[H5S_MAX_RANK]; hsize_t maxdim1[H5S_MAX_RANK]; hsize_t maxdim2[H5S_MAX_RANK]; - int nfound=0; /* number of differences found */ const char *name1=NULL; /* relative names */ const char *name2=NULL; hsize_t storage_size1; hsize_t storage_size2; + hsize_t nfound=0; /* number of differences found */ + int cmp=1; /* do diff or not */ int i; /* Get the dataspace handle */ if ( (space1_id = H5Dget_space(dset1_id)) < 0 ) - goto out; + goto error; /* Get rank */ if ( (rank1 = H5Sget_simple_extent_ndims(space1_id)) < 0 ) - goto out; + goto error; /* Get the dataspace handle */ if ( (space2_id = H5Dget_space(dset2_id)) < 0 ) - goto out; + goto error; /* Get rank */ if ( (rank2 = H5Sget_simple_extent_ndims(space2_id)) < 0 ) - goto out; + goto error; /* Get dimensions */ if ( H5Sget_simple_extent_dims(space1_id,dims1,maxdim1) < 0 ) - goto out; + goto error; /* Get dimensions */ if ( H5Sget_simple_extent_dims(space2_id,dims2,maxdim2) < 0 ) - goto out; + goto error; /*------------------------------------------------------------------------- * Get the file data type @@ -180,11 +189,11 @@ int diff_datasetid( hid_t dset1_id, /* Get the data type */ if ( (f_type1 = H5Dget_type(dset1_id)) < 0 ) - goto out; + goto error; /* Get the data type */ if ( (f_type2 = H5Dget_type(dset2_id)) < 0 ) - goto out; + goto error; /*------------------------------------------------------------------------- @@ -196,9 +205,9 @@ int diff_datasetid( hid_t dset1_id, storage_size2=H5Dget_storage_size(dset2_id); if (storage_size1<=0 && storage_size2<=0) { - if (options->verbose && obj1_name && obj2_name) + if (options->m_verbose && obj1_name && obj2_name) printf("<%s> and <%s> are empty datasets\n", obj1_name, obj2_name); - goto out; + cmp=0; } @@ -218,15 +227,11 @@ int diff_datasetid( hid_t dset1_id, obj1_name, obj2_name, options)!=1) - goto out; - - - + cmp=0; /*------------------------------------------------------------------------- * get number of elements *------------------------------------------------------------------------- */ - nelmts1 = 1; for (i = 0; i < rank1; i++) { @@ -246,7 +251,7 @@ int diff_datasetid( hid_t dset1_id, *------------------------------------------------------------------------- */ - if ( (H5Tequal(f_type1, f_type2)==0) && options->verbose && obj1_name) + if ( (H5Tequal(f_type1, f_type2)==0) && options->m_verbose && obj1_name) { printf("Warning: Different storage datatype\n"); printf("<%s> has file datatype ", obj1_name); @@ -282,11 +287,11 @@ int diff_datasetid( hid_t dset1_id, sign2=H5Tget_sign(m_type2); if ( sign1 != sign2 ) { - if (options->verbose && obj1_name) { + if (options->m_verbose && obj1_name) { printf("Comparison not supported: <%s> has sign %s ", obj1_name, get_sign(sign1)); printf("and <%s> has sign %s\n", obj2_name, get_sign(sign2)); } - goto out; + cmp=0; } /*------------------------------------------------------------------------- @@ -316,13 +321,20 @@ int diff_datasetid( hid_t dset1_id, } assert(m_size1==m_size2); +/*------------------------------------------------------------------------- + * only attempt to compare if possible + *------------------------------------------------------------------------- + */ + if (cmp) + { + buf1 = (void *) HDmalloc((unsigned) (nelmts1*m_size1)); buf2 = (void *) HDmalloc((unsigned) (nelmts2*m_size2)); if ( buf1 == NULL || buf2 == NULL ) { printf( "cannot read into memory\n" ); - goto out; + goto error; } /*------------------------------------------------------------------------- @@ -331,10 +343,10 @@ int diff_datasetid( hid_t dset1_id, */ if ( H5Dread(dset1_id,m_type1,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf1) < 0 ) - goto out; + goto error; if ( H5Dread(dset2_id,m_type2,H5S_ALL,H5S_ALL,H5P_DEFAULT,buf2) < 0 ) - goto out; + goto error; /*------------------------------------------------------------------------- * array compare @@ -355,10 +367,6 @@ int diff_datasetid( hid_t dset1_id, m_type1, dset1_id, dset2_id); - - if (options->verbose && nfound) - printf("%d differences found\n", nfound ); - /*------------------------------------------------------------------------- * compare attributes * the if condition refers to cases when the dataset is a referenced object @@ -366,18 +374,36 @@ int diff_datasetid( hid_t dset1_id, */ if (obj1_name) - nfound=diff_attr(dset1_id,dset2_id,obj1_name,obj2_name,options); + diff_attr(dset1_id,dset2_id,obj1_name,obj2_name,options); + + }/*cmp*/ /*------------------------------------------------------------------------- * close *------------------------------------------------------------------------- */ - -out: - + + if ( buf1) HDfree(buf1); if ( buf2) HDfree(buf2); + /* close */ + /* disable error reporting */ + H5E_BEGIN_TRY { + H5Sclose(space1_id); + H5Sclose(space2_id); + H5Tclose(f_type1); + H5Tclose(f_type2); + H5Tclose(m_type1); + H5Tclose(m_type2); + /* enable error reporting */ + } H5E_END_TRY; + return nfound; + +error: + options->err_stat=1; + if ( buf1) HDfree(buf1); + if ( buf2) HDfree(buf2); /* close */ /* disable error reporting */ H5E_BEGIN_TRY { @@ -443,7 +469,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ if ( tclass1 != tclass2 ) { - if (options->verbose && obj1_name) { + if (options->m_verbose && obj1_name) { printf("Comparison not possible: <%s> is of class %s and <%s> is of class %s\n", obj1_name, get_class(tclass1), obj2_name, get_class(tclass2) ); @@ -473,7 +499,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ break; default: /*H5T_TIME */ - if (options->verbose && obj1_name ) + if (options->m_verbose && obj1_name ) printf("Comparison not supported: <%s> and <%s> are of class %s\n", obj1_name,obj2_name,get_class(tclass2) ); return 0; @@ -484,7 +510,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ *------------------------------------------------------------------------- */ - if ( (H5Tequal(f_type1, f_type2)==0) && options->verbose && obj1_name) + if ( (H5Tequal(f_type1, f_type2)==0) && options->m_verbose && obj1_name) { printf("Warning: Different storage datatype\n"); printf("<%s> has file datatype ", obj1_name); @@ -502,7 +528,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ if ( rank1 != rank2 ) { - if (options->verbose && obj1_name) { + if (options->m_verbose && obj1_name) { printf("Comparison not supported: <%s> has rank %d, dimensions ", obj1_name, rank1); print_dims(rank1,dims1); printf(", max dimensions "); @@ -540,7 +566,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ if (dim_diff==1) { - if (options->verbose && obj1_name) { + if (options->m_verbose && obj1_name) { printf("Comparison not supported: <%s> has rank %d, dimensions ", obj1_name, rank1); print_dims(rank1,dims1); if (maxdim1 && maxdim2) { @@ -562,7 +588,7 @@ int diff_can_type( hid_t f_type1, /* file data type */ */ if (maxdim1 && maxdim2 && maxdim_diff==1 && obj1_name ) { - if (options->verbose) { + if (options->m_verbose) { printf( "Warning: Different maximum dimensions\n"); printf("<%s> has max dimensions ", obj1_name); print_dims(rank1,maxdim1); diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c index 7af48c4..bbd1747 100644 --- a/tools/lib/h5diff_util.c +++ b/tools/lib/h5diff_util.c @@ -333,6 +333,18 @@ get_class(H5T_class_t tclass) } } +/*------------------------------------------------------------------------- + * Function: print_found + * + * Purpose: print number of differences found + * + *------------------------------------------------------------------------- + */ +void print_found(hsize_t nfound) +{ + HDfprintf(stdout,"%Hu differences found\n",nfound); +} + /*------------------------------------------------------------------------- * Function: print_sizes diff --git a/tools/testfiles/file1.h5 b/tools/testfiles/file1.h5 Binary files differindex 14863a3..fc8333b 100644 --- a/tools/testfiles/file1.h5 +++ b/tools/testfiles/file1.h5 diff --git a/tools/testfiles/file2.h5 b/tools/testfiles/file2.h5 Binary files differindex 5c569a0..e89e5ba 100644 --- a/tools/testfiles/file2.h5 +++ b/tools/testfiles/file2.h5 diff --git a/tools/testfiles/file3.h5 b/tools/testfiles/file3.h5 Binary files differindex 8fcd803..b868013 100644 --- a/tools/testfiles/file3.h5 +++ b/tools/testfiles/file3.h5 diff --git a/tools/testfiles/file4.h5 b/tools/testfiles/file4.h5 Binary files differindex 29369c0..443ea85 100644 --- a/tools/testfiles/file4.h5 +++ b/tools/testfiles/file4.h5 diff --git a/tools/testfiles/file5.h5 b/tools/testfiles/file5.h5 Binary files differindex e5c0c96..7c6d7e3 100644 --- a/tools/testfiles/file5.h5 +++ b/tools/testfiles/file5.h5 diff --git a/tools/testfiles/file6.h5 b/tools/testfiles/file6.h5 Binary files differindex a65c081..1010aa4 100644 --- a/tools/testfiles/file6.h5 +++ b/tools/testfiles/file6.h5 diff --git a/tools/testfiles/file7.h5 b/tools/testfiles/file7.h5 Binary files differindex d7f03b2..b1da8f2 100644 --- a/tools/testfiles/file7.h5 +++ b/tools/testfiles/file7.h5 diff --git a/tools/testfiles/file8.h5 b/tools/testfiles/file8.h5 Binary files differindex f21783d..7291401 100644 --- a/tools/testfiles/file8.h5 +++ b/tools/testfiles/file8.h5 diff --git a/tools/testfiles/h5diff_10.txt b/tools/testfiles/h5diff_10.txt index f291c68..44622f3 100644 --- a/tools/testfiles/h5diff_10.txt +++ b/tools/testfiles/h5diff_10.txt @@ -9,8 +9,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -22,17 +23,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_11.txt b/tools/testfiles/h5diff_11.txt index 73fe62f..056e486 100644 --- a/tools/testfiles/h5diff_11.txt +++ b/tools/testfiles/h5diff_11.txt @@ -1,9 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 g1/dset1 g1/dset2' +Expected output for 'h5diff file1.h5 file2.h5' ############################# -position dset1 dset2 difference ------------------------------------------------------------- -[ 0 1 ] 1.000000 1.100000 0.100000 -[ 1 0 ] 1.000000 1.010000 0.010000 -[ 1 1 ] 1.000000 1.001000 0.001000 -[ 2 0 ] 1.000000 1.000100 0.000100 +Dataset: </g1/dset1> and </g1/dset1> +4 differences found diff --git a/tools/testfiles/h5diff_12.txt b/tools/testfiles/h5diff_12.txt index ad9afa4..d4605b2 100644 --- a/tools/testfiles/h5diff_12.txt +++ b/tools/testfiles/h5diff_12.txt @@ -1,11 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -v -n 2 g1/dset1 g1/dset2' +Expected output for 'h5diff file1.h5 file2.h5 g1/dset1 g1/dset2' ############################# -$h5diff file1.h5 file2.h5 -v -n 2 g1/dset1 g1/dset2 Dataset: </g1/dset1> and </g1/dset2> -position dset1 dset2 difference ------------------------------------------------------------- -[ 0 1 ] 1.000000 1.100000 0.100000 -[ 1 0 ] 1.000000 1.010000 0.010000 -2 differences found - +4 differences found diff --git a/tools/testfiles/h5diff_13.txt b/tools/testfiles/h5diff_13.txt index 406b01a..8d5c69e 100644 --- a/tools/testfiles/h5diff_13.txt +++ b/tools/testfiles/h5diff_13.txt @@ -1,15 +1,11 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -v -d 5 g1/dset3 g1/dset4' +Expected output for 'h5diff file1.h5 file2.h5 -r' ############################# -$h5diff file1.h5 file2.h5 -v -d 5 g1/dset3 g1/dset4 -Dataset: </g1/dset3> and </g1/dset4> -position dset3 dset4 difference +position dset1 dset1 difference ------------------------------------------------------------ -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 -[ 1 1 ] 100.000000 80.000000 20.000000 -[ 2 0 ] 100.000000 140.000000 40.000000 -[ 2 1 ] 100.000000 200.000000 100.000000 -6 differences found - +[ 0 1 ] 1.000000 1.100000 0.100000 +[ 1 0 ] 1.000000 1.010000 0.010000 +[ 1 1 ] 1.000000 1.001000 0.001000 +[ 2 0 ] 1.000000 1.000100 0.000100 +Dataset: </g1/dset1> and </g1/dset1> +4 differences found diff --git a/tools/testfiles/h5diff_14.txt b/tools/testfiles/h5diff_14.txt index 8efcf83..33683d3 100644 --- a/tools/testfiles/h5diff_14.txt +++ b/tools/testfiles/h5diff_14.txt @@ -1,15 +1,11 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -v -p 0.05 g1/dset3 g1/dset4' +Expected output for 'h5diff file1.h5 file2.h5 -r g1/dset1 g1/dset2' ############################# -$h5diff file1.h5 file2.h5 -v -p 0.05 g1/dset3 g1/dset4 -Dataset: </g1/dset3> and </g1/dset4> -position dset3 dset4 difference relative ------------------------------------------------------------------------- -[ 0 0 ] 100 110 10 0.1 -[ 0 1 ] 110 100 10 0.09090909091 -[ 1 0 ] 100 90 10 0.1 -[ 1 1 ] 100 80 20 0.2 -[ 2 0 ] 100 140 40 0.4 -[ 2 1 ] 100 200 100 1 -6 differences found - +position dset1 dset2 difference +------------------------------------------------------------ +[ 0 1 ] 1.000000 1.100000 0.100000 +[ 1 0 ] 1.000000 1.010000 0.010000 +[ 1 1 ] 1.000000 1.001000 0.001000 +[ 2 0 ] 1.000000 1.000100 0.000100 +Dataset: </g1/dset1> and </g1/dset2> +4 differences found diff --git a/tools/testfiles/h5diff_15.txt b/tools/testfiles/h5diff_15.txt index 961c652..e2aeb88 100644 --- a/tools/testfiles/h5diff_15.txt +++ b/tools/testfiles/h5diff_15.txt @@ -1,7 +1,13 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -v -r g1/dset1 g1/dset2' +Expected output for 'h5diff file1.h5 file2.h5 -r -d 5 g1/dset3 g1/dset4' ############################# -$h5diff file1.h5 file2.h5 -v -r g1/dset1 g1/dset2 -Dataset: </g1/dset1> and </g1/dset2> -4 differences found - +position dset3 dset4 difference +------------------------------------------------------------ +[ 0 0 ] 100.000000 110.000000 10.000000 +[ 0 1 ] 110.000000 100.000000 10.000000 +[ 1 0 ] 100.000000 90.000000 10.000000 +[ 1 1 ] 100.000000 80.000000 20.000000 +[ 2 0 ] 100.000000 140.000000 40.000000 +[ 2 1 ] 100.000000 200.000000 100.000000 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_16.txt b/tools/testfiles/h5diff_16.txt index a397ae4..1aa2f72 100644 --- a/tools/testfiles/h5diff_16.txt +++ b/tools/testfiles/h5diff_16.txt @@ -1,9 +1,13 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5' +Expected output for 'h5diff file1.h5 file2.h5 -r -p 0.05 g1/dset3 g1/dset4' ############################# -position dset1 dset1 difference ------------------------------------------------------------- -[ 0 1 ] 1.000000 1.100000 0.100000 -[ 1 0 ] 1.000000 1.010000 0.010000 -[ 1 1 ] 1.000000 1.001000 0.001000 -[ 2 0 ] 1.000000 1.000100 0.000100 +position dset3 dset4 difference relative +------------------------------------------------------------------------ +[ 0 0 ] 100 110 10 0.1 +[ 0 1 ] 110 100 10 0.09090909091 +[ 1 0 ] 100 90 10 0.1 +[ 1 1 ] 100 80 20 0.2 +[ 2 0 ] 100 140 40 0.4 +[ 2 1 ] 100 200 100 1 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_17.txt b/tools/testfiles/h5diff_17.txt new file mode 100644 index 0000000..6f7a360 --- /dev/null +++ b/tools/testfiles/h5diff_17.txt @@ -0,0 +1,23 @@ +############################# +Expected output for 'h5diff file1.h5 file2.h5 -v' +############################# + +file1 file2 +--------------------------------------- + x x /g1 + x x /g1/dset1 + x /g1/dset2 + x /g1/dset3 + x /g1/dset4 + x /g2 + +Group: </g1> and </g1> +position dset1 dset1 difference +------------------------------------------------------------ +[ 0 1 ] 1.000000 1.100000 0.100000 +[ 1 0 ] 1.000000 1.010000 0.010000 +[ 1 1 ] 1.000000 1.001000 0.001000 +[ 2 0 ] 1.000000 1.000100 0.000100 +Dataset: </g1/dset1> and </g1/dset1> +Group: </> and </> +4 differences found diff --git a/tools/testfiles/h5diff_18.txt b/tools/testfiles/h5diff_18.txt new file mode 100644 index 0000000..6e914e4 --- /dev/null +++ b/tools/testfiles/h5diff_18.txt @@ -0,0 +1,3 @@ +############################# +Expected output for 'h5diff file1.h5 file2.h5 -q' +############################# diff --git a/tools/testfiles/h5diff_20.txt b/tools/testfiles/h5diff_20.txt index 6896f3e..e524fd6 100644 --- a/tools/testfiles/h5diff_20.txt +++ b/tools/testfiles/h5diff_20.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v dset group' ############################# -$h5diff file3.h5 file3.h5 -v dset group Comparison not possible: </dset> is of type H5G_DATASET and </group> is of type H5G_GROUP - +0 differences found diff --git a/tools/testfiles/h5diff_21.txt b/tools/testfiles/h5diff_21.txt index 15f91b6..a22a665 100644 --- a/tools/testfiles/h5diff_21.txt +++ b/tools/testfiles/h5diff_21.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v dset link' ############################# -$h5diff file3.h5 file3.h5 -v dset link Comparison not possible: </dset> is of type H5G_DATASET and </link> is of type H5G_LINK - +0 differences found diff --git a/tools/testfiles/h5diff_22.txt b/tools/testfiles/h5diff_22.txt index a518e7e..1c4b45a 100644 --- a/tools/testfiles/h5diff_22.txt +++ b/tools/testfiles/h5diff_22.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v dset type' ############################# -$h5diff file3.h5 file3.h5 -v dset type Comparison not possible: </dset> is of type H5G_DATASET and </type> is of type H5G_TYPE - +0 differences found diff --git a/tools/testfiles/h5diff_23.txt b/tools/testfiles/h5diff_23.txt index ee20e1d..d709dc6 100644 --- a/tools/testfiles/h5diff_23.txt +++ b/tools/testfiles/h5diff_23.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v group group' ############################# -$h5diff file3.h5 file3.h5 -v group group Group: </group> and </group> - +0 differences found diff --git a/tools/testfiles/h5diff_24.txt b/tools/testfiles/h5diff_24.txt index dc1ebb0..467038a 100644 --- a/tools/testfiles/h5diff_24.txt +++ b/tools/testfiles/h5diff_24.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v type type' ############################# -$h5diff file3.h5 file3.h5 -v type type Datatype: </type> and </type> - +0 differences found diff --git a/tools/testfiles/h5diff_25.txt b/tools/testfiles/h5diff_25.txt index 1bbffac..dabfe91 100644 --- a/tools/testfiles/h5diff_25.txt +++ b/tools/testfiles/h5diff_25.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file3.h5 file3.h5 -v link link' ############################# -$h5diff file3.h5 file3.h5 -v link link Link: </link> and </link> - +0 differences found diff --git a/tools/testfiles/h5diff_30.txt b/tools/testfiles/h5diff_30.txt deleted file mode 100644 index d405bbf..0000000 --- a/tools/testfiles/h5diff_30.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 string' -############################# -$h5diff file4.h5 file4.h5 string -Comparison not supported -</string> is of class H5T_STRING and </string> is of class H5T_STRING - - diff --git a/tools/testfiles/h5diff_31.txt b/tools/testfiles/h5diff_31.txt deleted file mode 100644 index 153a8ff..0000000 --- a/tools/testfiles/h5diff_31.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 bitfield' -############################# -$h5diff file4.h5 file4.h5 bitfield -Comparison not supported -</bitfield> is of class H5T_BITFIELD and </bitfield> is of class H5T_BITFIELD - - diff --git a/tools/testfiles/h5diff_32.txt b/tools/testfiles/h5diff_32.txt deleted file mode 100644 index 6d68444..0000000 --- a/tools/testfiles/h5diff_32.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 opaque' -############################# -$h5diff file4.h5 file4.h5 opaque -Comparison not supported -</opaque> is of class H5T_OPAQUE and </opaque> is of class H5T_OPAQUE - - diff --git a/tools/testfiles/h5diff_33.txt b/tools/testfiles/h5diff_33.txt deleted file mode 100644 index d8243ad..0000000 --- a/tools/testfiles/h5diff_33.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 compound' -############################# -$h5diff file4.h5 file4.h5 compound -Comparison not supported -</compound> is of class H5T_COMPOUND and </compound> is of class H5T_COMPOUND - - diff --git a/tools/testfiles/h5diff_34.txt b/tools/testfiles/h5diff_34.txt deleted file mode 100644 index 199278e..0000000 --- a/tools/testfiles/h5diff_34.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 ref' -############################# -$h5diff file4.h5 file4.h5 ref -Comparison not supported -</ref> is of class H5T_REFERENCE and </ref> is of class H5T_REFERENCE - - diff --git a/tools/testfiles/h5diff_35.txt b/tools/testfiles/h5diff_35.txt deleted file mode 100644 index e5d8f2c..0000000 --- a/tools/testfiles/h5diff_35.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 enum' -############################# -$h5diff file4.h5 file4.h5 enum -Comparison not supported -</enum> is of class H5T_ENUM and </enum> is of class H5T_ENUM - - diff --git a/tools/testfiles/h5diff_36.txt b/tools/testfiles/h5diff_36.txt deleted file mode 100644 index 3f8bfa0..0000000 --- a/tools/testfiles/h5diff_36.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 vlen' -############################# -$h5diff file4.h5 file4.h5 vlen -Comparison not supported -</vlen> is of class H5T_VLEN and </vlen> is of class H5T_VLEN - - diff --git a/tools/testfiles/h5diff_37.txt b/tools/testfiles/h5diff_37.txt deleted file mode 100644 index f2125a7..0000000 --- a/tools/testfiles/h5diff_37.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 array' -############################# -$h5diff file4.h5 file4.h5 array -Comparison not supported -</array> is of class H5T_ARRAY and </array> is of class H5T_ARRAY - - diff --git a/tools/testfiles/h5diff_38.txt b/tools/testfiles/h5diff_38.txt deleted file mode 100644 index 6e18309..0000000 --- a/tools/testfiles/h5diff_38.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file4.h5 file4.h5 integer float' -############################# -$h5diff file4.h5 file4.h5 integer float -Comparison not supported -</integer> is of class H5T_INTEGER and </float> is of class H5T_FLOAT - - diff --git a/tools/testfiles/h5diff_40.txt b/tools/testfiles/h5diff_40.txt deleted file mode 100644 index b904cc5..0000000 --- a/tools/testfiles/h5diff_40.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file5.h5 file5.h5 dset1 dset2' -############################# -$h5diff file5.h5 file5.h5 dset1 dset2 -Comparison not supported -</dset1> has rank 1, dimensions [ 7 ] , max dimensions [ 7 ] -</dset2> has rank 4, dimensions [ 2 2 2 2 ] , max dimensions [ 2 2 2 2 ] - diff --git a/tools/testfiles/h5diff_41.txt b/tools/testfiles/h5diff_41.txt deleted file mode 100644 index 75e7de1..0000000 --- a/tools/testfiles/h5diff_41.txt +++ /dev/null @@ -1,8 +0,0 @@ -############################# -Expected output for 'h5diff file5.h5 file5.h5 dset3 dset4' -############################# -$h5diff file5.h5 file5.h5 dset3 dset4 -Comparison not supported -</dset3> has rank 4, dimensions [ 2 2 2 2 ] , max dimensions [ 2 2 2 2 ] -</dset4> has rank 4, dimensions [ 2 2 2 3 ] , max dimensions [ 2 2 2 3 ] - diff --git a/tools/testfiles/h5diff_42.txt b/tools/testfiles/h5diff_42.txt deleted file mode 100644 index 28add4f..0000000 --- a/tools/testfiles/h5diff_42.txt +++ /dev/null @@ -1,11 +0,0 @@ -############################# -Expected output for 'h5diff file5.h5 file5.h5 dset5 dset6' -############################# -$h5diff file5.h5 file5.h5 dset5 dset6 -Warning: Different maximum dimensions -</dset5> has max dimensions [ 2 2 2 2 ] -</dset6> has max dimensions [ 2 2 2 3 ] -Comparing </dset5> with </dset6> -0 differences found - - diff --git a/tools/testfiles/h5diff_50.txt b/tools/testfiles/h5diff_50.txt index 9fc3c7f..af07a2a 100644 --- a/tools/testfiles/h5diff_50.txt +++ b/tools/testfiles/h5diff_50.txt @@ -1,8 +1,6 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset0a dset0b' ############################# -$h5diff file4.h5 file4.h5 -v dset0a dset0b -Dataset: </dset0a> and </dset0b> Warning: Different storage datatype </dset0a> has file datatype H5T_STD_I16LE </dset0b> has file datatype H5T_STD_I32LE @@ -15,5 +13,5 @@ position dset0a dset0b difference [ 1 1 ] 1 4 3 [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 +Dataset: </dset0a> and </dset0b> 4 differences found - diff --git a/tools/testfiles/h5diff_51.txt b/tools/testfiles/h5diff_51.txt index 858ace2..216c921 100644 --- a/tools/testfiles/h5diff_51.txt +++ b/tools/testfiles/h5diff_51.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset1a dset1b' ############################# -$h5diff file4.h5 file4.h5 -v dset1a dset1b -Dataset: </dset1a> and </dset1b> position dset1a dset1b difference ------------------------------------------------------------ [ 1 0 ] 1 3 2 [ 1 1 ] 1 4 3 [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 +Dataset: </dset1a> and </dset1b> 4 differences found - diff --git a/tools/testfiles/h5diff_52.txt b/tools/testfiles/h5diff_52.txt index d3999ad..f1e824f 100644 --- a/tools/testfiles/h5diff_52.txt +++ b/tools/testfiles/h5diff_52.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset2a dset2b' ############################# -$h5diff file4.h5 file4.h5 -v dset2a dset2b -Dataset: </dset2a> and </dset2b> position dset2a dset2b difference ------------------------------------------------------------ [ 1 0 ] 1 3 2 [ 1 1 ] 1 4 3 [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 +Dataset: </dset2a> and </dset2b> 4 differences found - diff --git a/tools/testfiles/h5diff_53.txt b/tools/testfiles/h5diff_53.txt index e7e899e..115985a 100644 --- a/tools/testfiles/h5diff_53.txt +++ b/tools/testfiles/h5diff_53.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset3a dset4b' ############################# -$h5diff file4.h5 file4.h5 -v dset3a dset4b -Dataset: </dset3a> and </dset4b> position dset3a dset4b difference ------------------------------------------------------------ [ 1 0 ] 1 3 2 [ 1 1 ] 1 4 3 [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 +Dataset: </dset3a> and </dset4b> 4 differences found - diff --git a/tools/testfiles/h5diff_54.txt b/tools/testfiles/h5diff_54.txt index bd21628..42f3d38 100644 --- a/tools/testfiles/h5diff_54.txt +++ b/tools/testfiles/h5diff_54.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset4a dset4b' ############################# -$h5diff file4.h5 file4.h5 -v dset4a dset4b -Dataset: </dset4a> and </dset4b> position dset4a dset4b difference ------------------------------------------------------------ [ 1 0 ] 1 3 2 [ 1 1 ] 1 4 3 [ 2 0 ] 1 5 4 [ 2 1 ] 1 6 5 +Dataset: </dset4a> and </dset4b> 4 differences found - diff --git a/tools/testfiles/h5diff_55.txt b/tools/testfiles/h5diff_55.txt index 69de2c1..b52d080 100644 --- a/tools/testfiles/h5diff_55.txt +++ b/tools/testfiles/h5diff_55.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset5a dset5b' ############################# -$h5diff file4.h5 file4.h5 -v dset5a dset5b -Dataset: </dset5a> and </dset5b> position dset5a dset5b difference ------------------------------------------------------------ [ 1 0 ] 1.000000 3.000000 2.000000 [ 1 1 ] 1.000000 4.000000 3.000000 [ 2 0 ] 1.000000 5.000000 4.000000 [ 2 1 ] 1.000000 6.000000 5.000000 +Dataset: </dset5a> and </dset5b> 4 differences found - diff --git a/tools/testfiles/h5diff_56.txt b/tools/testfiles/h5diff_56.txt index 0426f4d..888aebb 100644 --- a/tools/testfiles/h5diff_56.txt +++ b/tools/testfiles/h5diff_56.txt @@ -1,13 +1,11 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset6a dset6b' ############################# -$h5diff file4.h5 file4.h5 -v dset6a dset6b -Dataset: </dset6a> and </dset6b> position dset6a dset6b difference ------------------------------------------------------------ [ 1 0 ] 1.000000 3.000000 2.000000 [ 1 1 ] 1.000000 4.000000 3.000000 [ 2 0 ] 1.000000 5.000000 4.000000 [ 2 1 ] 1.000000 6.000000 5.000000 +Dataset: </dset6a> and </dset6b> 4 differences found - diff --git a/tools/testfiles/h5diff_57.txt b/tools/testfiles/h5diff_57.txt index 6794e73..0502f82 100644 --- a/tools/testfiles/h5diff_57.txt +++ b/tools/testfiles/h5diff_57.txt @@ -1,8 +1,6 @@ ############################# Expected output for 'h5diff file4.h5 file4.h5 -v dset7a dset7b' ############################# -$h5diff file4.h5 file4.h5 -v dset7a dset7b -Dataset: </dset7a> and </dset7b> Warning: Different storage datatype </dset7a> has file datatype H5T_STD_I8LE </dset7b> has file datatype H5T_STD_U8LE @@ -10,4 +8,5 @@ Warning: Different storage datatype </dset7a> has file datatype H5T_STD_I8LE </dset7b> has file datatype H5T_STD_U8LE Comparison not supported: </dset7a> has sign H5T_SGN_2 and </dset7b> has sign H5T_SGN_NONE - +Dataset: </dset7a> and </dset7b> +0 differences found diff --git a/tools/testfiles/h5diff_600.txt b/tools/testfiles/h5diff_600.txt index 50254b0..ec56f73 100644 --- a/tools/testfiles/h5diff_600.txt +++ b/tools/testfiles/h5diff_600.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_601.txt b/tools/testfiles/h5diff_601.txt index 2896b76..285ed72 100644 --- a/tools/testfiles/h5diff_601.txt +++ b/tools/testfiles/h5diff_601.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_602.txt b/tools/testfiles/h5diff_602.txt index 160b9e9b..d7d3883 100644 --- a/tools/testfiles/h5diff_602.txt +++ b/tools/testfiles/h5diff_602.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_603.txt b/tools/testfiles/h5diff_603.txt index 5630fd6..c386e09 100644 --- a/tools/testfiles/h5diff_603.txt +++ b/tools/testfiles/h5diff_603.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_604.txt b/tools/testfiles/h5diff_604.txt index 58f3259..5ae0b91 100644 --- a/tools/testfiles/h5diff_604.txt +++ b/tools/testfiles/h5diff_604.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_605.txt b/tools/testfiles/h5diff_605.txt index bef85ea..887e3b2 100644 --- a/tools/testfiles/h5diff_605.txt +++ b/tools/testfiles/h5diff_605.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_606.txt b/tools/testfiles/h5diff_606.txt index fe5308c..0566ec7 100644 --- a/tools/testfiles/h5diff_606.txt +++ b/tools/testfiles/h5diff_606.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_607.txt b/tools/testfiles/h5diff_607.txt index 01cf531..fa296f7 100644 --- a/tools/testfiles/h5diff_607.txt +++ b/tools/testfiles/h5diff_607.txt @@ -1,11 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 -[ 1 1 ] 100.000000 80.000000 20.000000 -[ 2 0 ] 100.000000 140.000000 40.000000 -[ 2 1 ] 100.000000 200.000000 100.000000 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_608.txt b/tools/testfiles/h5diff_608.txt index 983f569..073322f 100644 --- a/tools/testfiles/h5diff_608.txt +++ b/tools/testfiles/h5diff_608.txt @@ -1,11 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -d 1 -d 2 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 -[ 1 1 ] 100.000000 80.000000 20.000000 -[ 2 0 ] 100.000000 140.000000 40.000000 -[ 2 1 ] 100.000000 200.000000 100.000000 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_609.txt b/tools/testfiles/h5diff_609.txt index 279122f..1312380 100644 --- a/tools/testfiles/h5diff_609.txt +++ b/tools/testfiles/h5diff_609.txt @@ -1,3 +1,4 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -d 200 g1/dset3 g1/dset4' ############################# +0 differences found diff --git a/tools/testfiles/h5diff_610.txt b/tools/testfiles/h5diff_610.txt index 01cf531..fa296f7 100644 --- a/tools/testfiles/h5diff_610.txt +++ b/tools/testfiles/h5diff_610.txt @@ -1,11 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -d 1 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 -[ 1 1 ] 100.000000 80.000000 20.000000 -[ 2 0 ] 100.000000 140.000000 40.000000 -[ 2 1 ] 100.000000 200.000000 100.000000 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_611.txt b/tools/testfiles/h5diff_611.txt index 10dec8f..f18b753 100644 --- a/tools/testfiles/h5diff_611.txt +++ b/tools/testfiles/h5diff_611.txt @@ -1,5 +1,5 @@ ############################# -Expected output for 'h5diff file1.h5 file2.h5 -p g1/dset3 g1/dset4' +Expected output for 'h5diff file1.h5 file2.h5 -r -p g1/dset3 g1/dset4' ############################# <-p g1/dset3> is not a valid option Usage: h5diff file1 file2 [OPTIONS] [obj1[obj2]] @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_612.txt b/tools/testfiles/h5diff_612.txt index 803b64e..9666af3 100644 --- a/tools/testfiles/h5diff_612.txt +++ b/tools/testfiles/h5diff_612.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_613.txt b/tools/testfiles/h5diff_613.txt index 61e1d91..5043115 100644 --- a/tools/testfiles/h5diff_613.txt +++ b/tools/testfiles/h5diff_613.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_614.txt b/tools/testfiles/h5diff_614.txt index a0a8b49..4f1783c 100644 --- a/tools/testfiles/h5diff_614.txt +++ b/tools/testfiles/h5diff_614.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_615.txt b/tools/testfiles/h5diff_615.txt index 2f19008..fb04fed 100644 --- a/tools/testfiles/h5diff_615.txt +++ b/tools/testfiles/h5diff_615.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_616.txt b/tools/testfiles/h5diff_616.txt index efaf8a3..0f71910 100644 --- a/tools/testfiles/h5diff_616.txt +++ b/tools/testfiles/h5diff_616.txt @@ -1,7 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -p 0.21 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference relative ------------------------------------------------------------------------- -[ 2 0 ] 100 140 40 0.4 -[ 2 1 ] 100 200 100 1 +Dataset: </g1/dset3> and </g1/dset4> +2 differences found diff --git a/tools/testfiles/h5diff_617.txt b/tools/testfiles/h5diff_617.txt index 267c992..ef74c72 100644 --- a/tools/testfiles/h5diff_617.txt +++ b/tools/testfiles/h5diff_617.txt @@ -1,7 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -p 0.21 -p 0.22 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference relative ------------------------------------------------------------------------- -[ 2 0 ] 100 140 40 0.4 -[ 2 1 ] 100 200 100 1 +Dataset: </g1/dset3> and </g1/dset4> +2 differences found diff --git a/tools/testfiles/h5diff_618.txt b/tools/testfiles/h5diff_618.txt index 78d3ca2..d436346 100644 --- a/tools/testfiles/h5diff_618.txt +++ b/tools/testfiles/h5diff_618.txt @@ -1,3 +1,4 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -p 2 g1/dset3 g1/dset4' ############################# +0 differences found diff --git a/tools/testfiles/h5diff_619.txt b/tools/testfiles/h5diff_619.txt index 8ef4136..18d1efb 100644 --- a/tools/testfiles/h5diff_619.txt +++ b/tools/testfiles/h5diff_619.txt @@ -1,11 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -p 0.005 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference relative ------------------------------------------------------------------------- -[ 0 0 ] 100 110 10 0.1 -[ 0 1 ] 110 100 10 0.09090909091 -[ 1 0 ] 100 90 10 0.1 -[ 1 1 ] 100 80 20 0.2 -[ 2 0 ] 100 140 40 0.4 -[ 2 1 ] 100 200 100 1 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_620.txt b/tools/testfiles/h5diff_620.txt index 2d01f76de..9201dd1 100644 --- a/tools/testfiles/h5diff_620.txt +++ b/tools/testfiles/h5diff_620.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_621.txt b/tools/testfiles/h5diff_621.txt index 11a3e16..2566846 100644 --- a/tools/testfiles/h5diff_621.txt +++ b/tools/testfiles/h5diff_621.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_622.txt b/tools/testfiles/h5diff_622.txt index 5d082eb..20613a5 100644 --- a/tools/testfiles/h5diff_622.txt +++ b/tools/testfiles/h5diff_622.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_623.txt b/tools/testfiles/h5diff_623.txt index 6bfe66b..92f3e55 100644 --- a/tools/testfiles/h5diff_623.txt +++ b/tools/testfiles/h5diff_623.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_624.txt b/tools/testfiles/h5diff_624.txt index 9feda50..069c65b 100644 --- a/tools/testfiles/h5diff_624.txt +++ b/tools/testfiles/h5diff_624.txt @@ -10,8 +10,9 @@ file2 File name of the second HDF5 file [obj2] Name of an HDF5 object, in absolute path [OPTIONS] are: [-h] Print out this information -[-v] Verbose mode -[-r] Print only what objects differ, not the differences +[-r] Report mode. Print the differences +[-v] Verbose mode. Print the differences, list of objects, warnings +[-q] Quiet mode. Do not do output [-n count] Print difference up to count number [-d delta] Print difference when it is greater than limit delta [-p relative] Print difference when it is greater than a relative limit @@ -23,17 +24,28 @@ The 'delta' and 'relative' values must be positive numbers The -d compare criteria is |a - b| > delta The -p compare criteria is |1 - b/a| > relative -Examples: +h5diff has four modes of output: + Normal mode: print the number of differences found and where they occured + Report mode: print the above plus the differences + Verbose mode: print the above plus a list of objects and warnings + Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) -1) h5diff file1 file2 /a/b /a/c +Examples of use: - Compares object '/a/b' in file1 with '/a/c' in file2 +1) h5diff file1 file2 /g1/dset1 /g1/dset2 -2) h5diff file1 file2 /a/b + Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2 - Compares object '/a/b' in both files +2) h5diff file1 file2 /g1/dset1 + + Compares object '/g1/dset1' in both files 3) h5diff file1 file2 Compares all objects in both files +Note) file1 and file2 can be the same file. Use + + h5diff file1 file1 /g1/dset1 /g1/dset2 + + to compare '/g1/dset1' and '/g1/dset2' in the same file diff --git a/tools/testfiles/h5diff_625.txt b/tools/testfiles/h5diff_625.txt index 780131f..74477c8 100644 --- a/tools/testfiles/h5diff_625.txt +++ b/tools/testfiles/h5diff_625.txt @@ -1,7 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -n 2 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 +Dataset: </g1/dset3> and </g1/dset4> +2 differences found diff --git a/tools/testfiles/h5diff_626.txt b/tools/testfiles/h5diff_626.txt index e1e38d6..85eb7dc 100644 --- a/tools/testfiles/h5diff_626.txt +++ b/tools/testfiles/h5diff_626.txt @@ -1,8 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -n 2 -n 3 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 +Dataset: </g1/dset3> and </g1/dset4> +3 differences found diff --git a/tools/testfiles/h5diff_627.txt b/tools/testfiles/h5diff_627.txt index 30e6c50..999bbc3 100644 --- a/tools/testfiles/h5diff_627.txt +++ b/tools/testfiles/h5diff_627.txt @@ -1,11 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -n 200 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 -[ 0 1 ] 110.000000 100.000000 10.000000 -[ 1 0 ] 100.000000 90.000000 10.000000 -[ 1 1 ] 100.000000 80.000000 20.000000 -[ 2 0 ] 100.000000 140.000000 40.000000 -[ 2 1 ] 100.000000 200.000000 100.000000 +Dataset: </g1/dset3> and </g1/dset4> +6 differences found diff --git a/tools/testfiles/h5diff_628.txt b/tools/testfiles/h5diff_628.txt index 008b4d3..604df64 100644 --- a/tools/testfiles/h5diff_628.txt +++ b/tools/testfiles/h5diff_628.txt @@ -1,6 +1,5 @@ ############################# Expected output for 'h5diff file1.h5 file2.h5 -n 1 g1/dset3 g1/dset4' ############################# -position dset3 dset4 difference ------------------------------------------------------------- -[ 0 0 ] 100.000000 110.000000 10.000000 +Dataset: </g1/dset3> and </g1/dset4> +1 differences found diff --git a/tools/testfiles/h5diff_629.txt b/tools/testfiles/h5diff_629.txt index 8d7ced3..8f25c6e 100644 --- a/tools/testfiles/h5diff_629.txt +++ b/tools/testfiles/h5diff_629.txt @@ -2,4 +2,5 @@ Expected output for 'h5diff file1.h6 file2.h6' ############################# h5diff: <file1.h6>: unable to open file -h5diff: <file2.h6>: unable to open file +No common objects found. Files are not comparable. +Use -v for a list of objects. diff --git a/tools/testfiles/h5diff_70.txt b/tools/testfiles/h5diff_70.txt index a0413de..0fc1e09 100644 --- a/tools/testfiles/h5diff_70.txt +++ b/tools/testfiles/h5diff_70.txt @@ -1,35 +1,56 @@ ############################# -Expected output for 'h5diff file5.h5 file6.h5' +Expected output for 'h5diff file5.h5 file6.h5 -v' ############################# + +file1 file2 +--------------------------------------- + x x /dset + x x /g1 + +</dset> and </dset> are empty datasets +Dataset: </dset> and </dset> +Group: </g1> and </g1> position string of </g1> string of </g1> difference ------------------------------------------------------------ [ 0 ] a z [ 0 ] b z [ 1 ] d z [ 1 ] e z +Attribute: <string of </g1>> and <string of </g1>> +4 differences found position bitfield of </g1> bitfield of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <bitfield of </g1>> and <bitfield of </g1>> +2 differences found position opaque of </g1> opaque of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <opaque of </g1>> and <opaque of </g1>> +2 differences found position compound of </g1> compound of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 0 ] 2.000000 0.000000 2.000000 [ 1 ] 3 0 3 [ 1 ] 4.000000 0.000000 4.000000 +Attribute: <compound of </g1>> and <compound of </g1>> +4 differences found position enum of </g1> enum of </g1> difference ------------------------------------------------------------ [ 0 ] RED GREEN [ 1 ] RED GREEN +Attribute: <enum of </g1>> and <enum of </g1>> +2 differences found position vlen of </g1> vlen of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 [ 1 ] 3 0 3 +Attribute: <vlen of </g1>> and <vlen of </g1>> +3 differences found position array of </g1> array of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -38,14 +59,20 @@ position array of </g1> array of </g1> difference [ 1 ] 4 0 4 [ 1 ] 5 0 5 [ 1 ] 6 0 6 +Attribute: <array of </g1>> and <array of </g1>> +6 differences found position integer of </g1> integer of </g1> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <integer of </g1>> and <integer of </g1>> +2 differences found position float of </g1> float of </g1> difference ------------------------------------------------------------ [ 0 ] 1.000000 0.000000 1.000000 [ 1 ] 2.000000 0.000000 2.000000 +Attribute: <float of </g1>> and <float of </g1>> +2 differences found position string2D of </g1> string2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] a z @@ -60,6 +87,8 @@ position string2D of </g1> string2D of </g1> difference [ 2 0 ] j z [ 2 1 ] k z [ 2 1 ] l z +Attribute: <string2D of </g1>> and <string2D of </g1>> +12 differences found position bitfield2D of </g1> bitfield2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -68,6 +97,8 @@ position bitfield2D of </g1> bitfield2D of </g1> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <bitfield2D of </g1>> and <bitfield2D of </g1>> +6 differences found position opaque2D of </g1> opaque2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -76,6 +107,8 @@ position opaque2D of </g1> opaque2D of </g1> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <opaque2D of </g1>> and <opaque2D of </g1>> +6 differences found position compound2D of </g1> compound2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -90,6 +123,8 @@ position compound2D of </g1> compound2D of </g1> difference [ 2 0 ] 10.000000 0.000000 10.000000 [ 2 1 ] 11 0 11 [ 2 1 ] 12.000000 0.000000 12.000000 +Attribute: <compound2D of </g1>> and <compound2D of </g1>> +12 differences found position enum2D of </g1> enum2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] RED GREEN @@ -98,6 +133,8 @@ position enum2D of </g1> enum2D of </g1> difference [ 1 1 ] RED GREEN [ 2 0 ] RED GREEN [ 2 1 ] RED GREEN +Attribute: <enum2D of </g1>> and <enum2D of </g1>> +6 differences found position vlen2D of </g1> vlen2D of </g1> difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 @@ -111,6 +148,8 @@ position vlen2D of </g1> vlen2D of </g1> difference [ 2 1 ] 9 0 9 [ 2 1 ] 10 0 10 [ 2 1 ] 11 0 11 +Attribute: <vlen2D of </g1>> and <vlen2D of </g1>> +11 differences found position array2D of </g1> array2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -131,6 +170,8 @@ position array2D of </g1> array2D of </g1> difference [ 2 1 ] 16 0 16 [ 2 1 ] 17 0 17 [ 2 1 ] 18 0 18 +Attribute: <array2D of </g1>> and <array2D of </g1>> +18 differences found position integer2D of </g1> integer2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -139,6 +180,8 @@ position integer2D of </g1> integer2D of </g1> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <integer2D of </g1>> and <integer2D of </g1>> +6 differences found position float2D of </g1> float2D of </g1> difference ------------------------------------------------------------ [ 0 0 ] 1.000000 0.000000 1.000000 @@ -147,6 +190,8 @@ position float2D of </g1> float2D of </g1> difference [ 1 1 ] 4.000000 0.000000 4.000000 [ 2 0 ] 5.000000 0.000000 5.000000 [ 2 1 ] 6.000000 0.000000 6.000000 +Attribute: <float2D of </g1>> and <float2D of </g1>> +6 differences found position string3D of </g1> string3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] a z @@ -196,6 +241,8 @@ position string3D of </g1> string3D of </g1> difference [ 3 2 0 ] W z [ 3 2 1 ] X z [ 3 2 1 ] Z z +Attribute: <string3D of </g1>> and <string3D of </g1>> +47 differences found position bitfield3D of </g1> bitfield3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -222,6 +269,8 @@ position bitfield3D of </g1> bitfield3D of </g1> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <bitfield3D of </g1>> and <bitfield3D of </g1>> +24 differences found position opaque3D of </g1> opaque3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -248,6 +297,8 @@ position opaque3D of </g1> opaque3D of </g1> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <opaque3D of </g1>> and <opaque3D of </g1>> +24 differences found position compound3D of </g1> compound3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -298,6 +349,8 @@ position compound3D of </g1> compound3D of </g1> difference [ 3 2 0 ] 46.000000 0.000000 46.000000 [ 3 2 1 ] 47 0 47 [ 3 2 1 ] 48.000000 0.000000 48.000000 +Attribute: <compound3D of </g1>> and <compound3D of </g1>> +48 differences found position enum3D of </g1> enum3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] GREEN RED @@ -324,6 +377,8 @@ position enum3D of </g1> enum3D of </g1> difference [ 3 1 1 ] GREEN RED [ 3 2 0 ] GREEN RED [ 3 2 1 ] GREEN RED +Attribute: <enum3D of </g1>> and <enum3D of </g1>> +24 differences found position vlen3D of </g1> vlen3D of </g1> difference ------------------------------------------------------------ [ 0 0 1 ] 1 0 1 @@ -385,6 +440,8 @@ position vlen3D of </g1> vlen3D of </g1> difference [ 3 2 1 ] 57 0 57 [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 +Attribute: <vlen3D of </g1>> and <vlen3D of </g1>> +59 differences found position array3D of </g1> array3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -459,6 +516,8 @@ position array3D of </g1> array3D of </g1> difference [ 3 2 1 ] 70 0 70 [ 3 2 1 ] 71 0 71 [ 3 2 1 ] 72 0 72 +Attribute: <array3D of </g1>> and <array3D of </g1>> +72 differences found position integer3D of </g1> integer3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -485,6 +544,8 @@ position integer3D of </g1> integer3D of </g1> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <integer3D of </g1>> and <integer3D of </g1>> +24 differences found position float3D of </g1> float3D of </g1> difference ------------------------------------------------------------ [ 0 0 0 ] 1.000000 0.000000 1.000000 @@ -511,35 +572,50 @@ position float3D of </g1> float3D of </g1> difference [ 3 1 1 ] 22.000000 0.000000 22.000000 [ 3 2 0 ] 23.000000 0.000000 23.000000 [ 3 2 1 ] 24.000000 0.000000 24.000000 +Attribute: <float3D of </g1>> and <float3D of </g1>> +24 differences found +Group: </> and </> position string of </> string of </> difference ------------------------------------------------------------ [ 0 ] a z [ 0 ] b z [ 1 ] d z [ 1 ] e z +Attribute: <string of </>> and <string of </>> +4 differences found position bitfield of </> bitfield of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <bitfield of </>> and <bitfield of </>> +2 differences found position opaque of </> opaque of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <opaque of </>> and <opaque of </>> +2 differences found position compound of </> compound of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 0 ] 2.000000 0.000000 2.000000 [ 1 ] 3 0 3 [ 1 ] 4.000000 0.000000 4.000000 +Attribute: <compound of </>> and <compound of </>> +4 differences found position enum of </> enum of </> difference ------------------------------------------------------------ [ 0 ] RED GREEN [ 1 ] RED GREEN +Attribute: <enum of </>> and <enum of </>> +2 differences found position vlen of </> vlen of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 [ 1 ] 3 0 3 +Attribute: <vlen of </>> and <vlen of </>> +3 differences found position array of </> array of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -548,14 +624,20 @@ position array of </> array of </> difference [ 1 ] 4 0 4 [ 1 ] 5 0 5 [ 1 ] 6 0 6 +Attribute: <array of </>> and <array of </>> +6 differences found position integer of </> integer of </> difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Attribute: <integer of </>> and <integer of </>> +2 differences found position float of </> float of </> difference ------------------------------------------------------------ [ 0 ] 1.000000 0.000000 1.000000 [ 1 ] 2.000000 0.000000 2.000000 +Attribute: <float of </>> and <float of </>> +2 differences found position string2D of </> string2D of </> difference ------------------------------------------------------------ [ 0 0 ] a z @@ -570,6 +652,8 @@ position string2D of </> string2D of </> difference [ 2 0 ] j z [ 2 1 ] k z [ 2 1 ] l z +Attribute: <string2D of </>> and <string2D of </>> +12 differences found position bitfield2D of </> bitfield2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -578,6 +662,8 @@ position bitfield2D of </> bitfield2D of </> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <bitfield2D of </>> and <bitfield2D of </>> +6 differences found position opaque2D of </> opaque2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -586,6 +672,8 @@ position opaque2D of </> opaque2D of </> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <opaque2D of </>> and <opaque2D of </>> +6 differences found position compound2D of </> compound2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -600,6 +688,8 @@ position compound2D of </> compound2D of </> difference [ 2 0 ] 10.000000 0.000000 10.000000 [ 2 1 ] 11 0 11 [ 2 1 ] 12.000000 0.000000 12.000000 +Attribute: <compound2D of </>> and <compound2D of </>> +12 differences found position enum2D of </> enum2D of </> difference ------------------------------------------------------------ [ 0 0 ] RED GREEN @@ -608,6 +698,8 @@ position enum2D of </> enum2D of </> difference [ 1 1 ] RED GREEN [ 2 0 ] RED GREEN [ 2 1 ] RED GREEN +Attribute: <enum2D of </>> and <enum2D of </>> +6 differences found position vlen2D of </> vlen2D of </> difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 @@ -621,6 +713,8 @@ position vlen2D of </> vlen2D of </> difference [ 2 1 ] 9 0 9 [ 2 1 ] 10 0 10 [ 2 1 ] 11 0 11 +Attribute: <vlen2D of </>> and <vlen2D of </>> +11 differences found position array2D of </> array2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -641,6 +735,8 @@ position array2D of </> array2D of </> difference [ 2 1 ] 16 0 16 [ 2 1 ] 17 0 17 [ 2 1 ] 18 0 18 +Attribute: <array2D of </>> and <array2D of </>> +18 differences found position integer2D of </> integer2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -649,6 +745,8 @@ position integer2D of </> integer2D of </> difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Attribute: <integer2D of </>> and <integer2D of </>> +6 differences found position float2D of </> float2D of </> difference ------------------------------------------------------------ [ 0 0 ] 1.000000 0.000000 1.000000 @@ -657,6 +755,8 @@ position float2D of </> float2D of </> difference [ 1 1 ] 4.000000 0.000000 4.000000 [ 2 0 ] 5.000000 0.000000 5.000000 [ 2 1 ] 6.000000 0.000000 6.000000 +Attribute: <float2D of </>> and <float2D of </>> +6 differences found position string3D of </> string3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] a z @@ -706,6 +806,8 @@ position string3D of </> string3D of </> difference [ 3 2 0 ] W z [ 3 2 1 ] X z [ 3 2 1 ] Z z +Attribute: <string3D of </>> and <string3D of </>> +47 differences found position bitfield3D of </> bitfield3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -732,6 +834,8 @@ position bitfield3D of </> bitfield3D of </> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <bitfield3D of </>> and <bitfield3D of </>> +24 differences found position opaque3D of </> opaque3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -758,6 +862,8 @@ position opaque3D of </> opaque3D of </> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <opaque3D of </>> and <opaque3D of </>> +24 differences found position compound3D of </> compound3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -808,6 +914,8 @@ position compound3D of </> compound3D of </> difference [ 3 2 0 ] 46.000000 0.000000 46.000000 [ 3 2 1 ] 47 0 47 [ 3 2 1 ] 48.000000 0.000000 48.000000 +Attribute: <compound3D of </>> and <compound3D of </>> +48 differences found position enum3D of </> enum3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] GREEN RED @@ -834,6 +942,8 @@ position enum3D of </> enum3D of </> difference [ 3 1 1 ] GREEN RED [ 3 2 0 ] GREEN RED [ 3 2 1 ] GREEN RED +Attribute: <enum3D of </>> and <enum3D of </>> +24 differences found position vlen3D of </> vlen3D of </> difference ------------------------------------------------------------ [ 0 0 1 ] 1 0 1 @@ -895,6 +1005,8 @@ position vlen3D of </> vlen3D of </> difference [ 3 2 1 ] 57 0 57 [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 +Attribute: <vlen3D of </>> and <vlen3D of </>> +59 differences found position array3D of </> array3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -969,6 +1081,8 @@ position array3D of </> array3D of </> difference [ 3 2 1 ] 70 0 70 [ 3 2 1 ] 71 0 71 [ 3 2 1 ] 72 0 72 +Attribute: <array3D of </>> and <array3D of </>> +72 differences found position integer3D of </> integer3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -995,6 +1109,8 @@ position integer3D of </> integer3D of </> difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Attribute: <integer3D of </>> and <integer3D of </>> +24 differences found position float3D of </> float3D of </> difference ------------------------------------------------------------ [ 0 0 0 ] 1.000000 0.000000 1.000000 @@ -1021,3 +1137,6 @@ position float3D of </> float3D of </> difference [ 3 1 1 ] 22.000000 0.000000 22.000000 [ 3 2 0 ] 23.000000 0.000000 23.000000 [ 3 2 1 ] 24.000000 0.000000 24.000000 +Attribute: <float3D of </>> and <float3D of </>> +24 differences found +0 differences found diff --git a/tools/testfiles/h5diff_80.txt b/tools/testfiles/h5diff_80.txt index 0bdf1ee..420b2dc 100644 --- a/tools/testfiles/h5diff_80.txt +++ b/tools/testfiles/h5diff_80.txt @@ -1,10 +1,48 @@ ############################# -Expected output for 'h5diff file7.h5 file8.h5' +Expected output for 'h5diff file7.h5 file8.h5 -v' ############################# + +file1 file2 +--------------------------------------- + x x /dset + x x /g1 + x x /g1/array + x x /g1/array2D + x x /g1/array3D + x x /g1/bitfield + x x /g1/bitfield2D + x x /g1/bitfield3D + x x /g1/compound + x x /g1/compound2D + x x /g1/compound3D + x x /g1/enum + x x /g1/enum2D + x x /g1/enum3D + x x /g1/float + x x /g1/float2D + x x /g1/float3D + x x /g1/integer + x x /g1/integer2D + x x /g1/integer3D + x x /g1/opaque + x x /g1/opaque2D + x x /g1/opaque3D + x x /g1/reference + x x /g1/reference2D + x x /g1/reference3D + x x /g1/string + x x /g1/string2D + x x /g1/string3D + x x /g1/vlen + x x /g1/vlen2D + x x /g1/vlen3D + position dset dset difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </dset> and </dset> +Group: </g1> and </g1> position array array difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -13,6 +51,7 @@ position array array difference [ 1 ] 4 0 4 [ 1 ] 5 0 5 [ 1 ] 6 0 6 +Dataset: </g1/array> and </g1/array> position array2D array2D difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -33,6 +72,7 @@ position array2D array2D difference [ 2 1 ] 16 0 16 [ 2 1 ] 17 0 17 [ 2 1 ] 18 0 18 +Dataset: </g1/array2D> and </g1/array2D> position array3D array3D difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -107,10 +147,12 @@ position array3D array3D difference [ 3 2 1 ] 70 0 70 [ 3 2 1 ] 71 0 71 [ 3 2 1 ] 72 0 72 +Dataset: </g1/array3D> and </g1/array3D> position bitfield bitfield difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/bitfield> and </g1/bitfield> position bitfield2D bitfield2D difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -119,6 +161,7 @@ position bitfield2D bitfield2D difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Dataset: </g1/bitfield2D> and </g1/bitfield2D> position bitfield3D bitfield3D difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -145,12 +188,14 @@ position bitfield3D bitfield3D difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Dataset: </g1/bitfield3D> and </g1/bitfield3D> position compound compound difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 0 ] 2.000000 0.000000 2.000000 [ 1 ] 3 0 3 [ 1 ] 4.000000 0.000000 4.000000 +Dataset: </g1/compound> and </g1/compound> position compound2D compound2D difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -165,6 +210,7 @@ position compound2D compound2D difference [ 2 0 ] 10.000000 0.000000 10.000000 [ 2 1 ] 11 0 11 [ 2 1 ] 12.000000 0.000000 12.000000 +Dataset: </g1/compound2D> and </g1/compound2D> position compound3D compound3D difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -215,13 +261,20 @@ position compound3D compound3D difference [ 3 2 0 ] 46.000000 0.000000 46.000000 [ 3 2 1 ] 47 0 47 [ 3 2 1 ] 48.000000 0.000000 48.000000 +Dataset: </g1/compound3D> and </g1/compound3D> position enum enum difference ------------------------------------------------------------ [ 0 ] RED GREEN +Dataset: </g1/enum> and </g1/enum> +</g1/enum2D> and </g1/enum2D> are empty datasets +Dataset: </g1/enum2D> and </g1/enum2D> +</g1/enum3D> and </g1/enum3D> are empty datasets +Dataset: </g1/enum3D> and </g1/enum3D> position float float difference ------------------------------------------------------------ [ 0 ] 1.000000 0.000000 1.000000 [ 1 ] 2.000000 0.000000 2.000000 +Dataset: </g1/float> and </g1/float> position float2D float2D difference ------------------------------------------------------------ [ 0 0 ] 1.000000 0.000000 1.000000 @@ -230,6 +283,7 @@ position float2D float2D difference [ 1 1 ] 4.000000 0.000000 4.000000 [ 2 0 ] 5.000000 0.000000 5.000000 [ 2 1 ] 6.000000 0.000000 6.000000 +Dataset: </g1/float2D> and </g1/float2D> position float3D float3D difference ------------------------------------------------------------ [ 0 0 0 ] 1.000000 0.000000 1.000000 @@ -256,10 +310,12 @@ position float3D float3D difference [ 3 1 1 ] 22.000000 0.000000 22.000000 [ 3 2 0 ] 23.000000 0.000000 23.000000 [ 3 2 1 ] 24.000000 0.000000 24.000000 +Dataset: </g1/float3D> and </g1/float3D> position integer integer difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/integer> and </g1/integer> position integer2D integer2D difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -268,6 +324,7 @@ position integer2D integer2D difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Dataset: </g1/integer2D> and </g1/integer2D> position integer3D integer3D difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -294,10 +351,12 @@ position integer3D integer3D difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Dataset: </g1/integer3D> and </g1/integer3D> position opaque opaque difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/opaque> and </g1/opaque> position opaque2D opaque2D difference ------------------------------------------------------------ [ 0 0 ] 1 0 1 @@ -306,6 +365,7 @@ position opaque2D opaque2D difference [ 1 1 ] 4 0 4 [ 2 0 ] 5 0 5 [ 2 1 ] 6 0 6 +Dataset: </g1/opaque2D> and </g1/opaque2D> position opaque3D opaque3D difference ------------------------------------------------------------ [ 0 0 0 ] 1 0 1 @@ -332,6 +392,7 @@ position opaque3D opaque3D difference [ 3 1 1 ] 22 0 22 [ 3 2 0 ] 23 0 23 [ 3 2 1 ] 24 0 24 +Dataset: </g1/opaque3D> and </g1/opaque3D> position difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -340,6 +401,7 @@ position difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/reference> and </g1/reference> position difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -364,6 +426,7 @@ position difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/reference2D> and </g1/reference2D> position difference ------------------------------------------------------------ [ 0 ] 1 0 1 @@ -460,12 +523,14 @@ position difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 +Dataset: </g1/reference3D> and </g1/reference3D> position string string difference ------------------------------------------------------------ [ 0 ] a z [ 0 ] b z [ 1 ] d z [ 1 ] e z +Dataset: </g1/string> and </g1/string> position string2D string2D difference ------------------------------------------------------------ [ 0 0 ] a z @@ -480,6 +545,7 @@ position string2D string2D difference [ 2 0 ] j z [ 2 1 ] k z [ 2 1 ] l z +Dataset: </g1/string2D> and </g1/string2D> position string3D string3D difference ------------------------------------------------------------ [ 0 0 0 ] a z @@ -529,11 +595,13 @@ position string3D string3D difference [ 3 2 0 ] W z [ 3 2 1 ] X z [ 3 2 1 ] Z z +Dataset: </g1/string3D> and </g1/string3D> position vlen vlen difference ------------------------------------------------------------ [ 0 ] 1 0 1 [ 1 ] 2 0 2 [ 1 ] 3 0 3 +Dataset: </g1/vlen> and </g1/vlen> position vlen2D vlen2D difference ------------------------------------------------------------ [ 0 1 ] 1 0 1 @@ -547,6 +615,7 @@ position vlen2D vlen2D difference [ 2 1 ] 9 0 9 [ 2 1 ] 10 0 10 [ 2 1 ] 11 0 11 +Dataset: </g1/vlen2D> and </g1/vlen2D> position vlen3D vlen3D difference ------------------------------------------------------------ [ 0 0 1 ] 1 0 1 @@ -608,3 +677,6 @@ position vlen3D vlen3D difference [ 3 2 1 ] 57 0 57 [ 3 2 1 ] 58 0 58 [ 3 2 1 ] 59 0 59 +Dataset: </g1/vlen3D> and </g1/vlen3D> +Group: </> and </> +491 differences found diff --git a/tools/testfiles/test1.h5 b/tools/testfiles/test1.h5 Binary files differindex 04e01d2..0ca9bb2 100644 --- a/tools/testfiles/test1.h5 +++ b/tools/testfiles/test1.h5 diff --git a/tools/testfiles/test3.h5 b/tools/testfiles/test3.h5 Binary files differindex ad4bbc5..dd3b336 100644 --- a/tools/testfiles/test3.h5 +++ b/tools/testfiles/test3.h5 diff --git a/tools/testfiles/test4.h5 b/tools/testfiles/test4.h5 Binary files differindex aef8a06..2b960c1b 100644 --- a/tools/testfiles/test4.h5 +++ b/tools/testfiles/test4.h5 diff --git a/tools/testfiles/test_all.h5 b/tools/testfiles/test_all.h5 Binary files differindex 2242381..3ff2c2b 100644 --- a/tools/testfiles/test_all.h5 +++ b/tools/testfiles/test_all.h5 diff --git a/tools/testfiles/test_deflate.h5 b/tools/testfiles/test_deflate.h5 Binary files differindex bbb736c..d2765cf 100644 --- a/tools/testfiles/test_deflate.h5 +++ b/tools/testfiles/test_deflate.h5 diff --git a/tools/testfiles/test_fletcher32.h5 b/tools/testfiles/test_fletcher32.h5 Binary files differindex 07a9942..91cb143 100644 --- a/tools/testfiles/test_fletcher32.h5 +++ b/tools/testfiles/test_fletcher32.h5 diff --git a/tools/testfiles/test_shuffle.h5 b/tools/testfiles/test_shuffle.h5 Binary files differindex 8369da8..7154115 100644 --- a/tools/testfiles/test_shuffle.h5 +++ b/tools/testfiles/test_shuffle.h5 diff --git a/tools/testfiles/test_szip.h5 b/tools/testfiles/test_szip.h5 Binary files differindex 7ebec4c..aac5bf0 100644 --- a/tools/testfiles/test_szip.h5 +++ b/tools/testfiles/test_szip.h5 |