diff options
Diffstat (limited to 'tools/h5diff')
-rw-r--r-- | tools/h5diff/h5diff.c | 16 | ||||
-rw-r--r-- | tools/h5diff/h5difftst.c | 8 |
2 files changed, 15 insertions, 9 deletions
diff --git a/tools/h5diff/h5diff.c b/tools/h5diff/h5diff.c index 4031b88..0d5f587 100644 --- a/tools/h5diff/h5diff.c +++ b/tools/h5diff/h5diff.c @@ -36,6 +36,7 @@ typedef struct options_t double p_relative; /* relative error value */ int n_; /* count */ int n_number_count; /* value */ + int m_; /* do not make the diff on a sequencial match, default yes */ } options_t; /*------------------------------------------------------------------------- @@ -114,6 +115,7 @@ void usage(void) printf("[-n count] Print difference up to count number for each variable\n"); printf("[-d delta] Print difference when it is greater than limit delta\n"); printf("[-p relative] Print differences which are within a relative error value\n"); + printf("[-m ] Print differences on a sequencial match iteration\n"); } @@ -167,8 +169,6 @@ int main(int argc, const char *argv[]) const char *obj1_name = NULL; const char *obj2_name = NULL; - /*do_test_files();*/ - /*------------------------------------------------------------------------- * print the command line options @@ -219,6 +219,9 @@ int main(int argc, const char *argv[]) case 'r': options.r_ = 1; break; + case 'm': + options.m_ = 1; + break; case 'd': /* if it is not another option */ if ( '-' !=argv[i+1][0] ) @@ -726,8 +729,11 @@ void match( hid_t file1_id, const char *file1_name, int nobjects1, info_t *info1 info1[curr1].name, file1_name, info2[curr2].name, file2_name); /* do the diff */ - diff( file1_id, info1[curr1].name, file2_id, info1[curr1].name, options, - info1[curr1].type ); + if ( options.m_ ) + { + diff( file1_id, info1[curr1].name, file2_id, info1[curr1].name, options, + info1[curr1].type ); + } curr1++; curr2++; @@ -769,7 +775,7 @@ void match( hid_t file1_id, const char *file1_name, int nobjects1, info_t *info1 while ( curr2<nobjects2 ) { printf( "<%s> is in <%s>, but not in <%s>\n", info2[curr2].name, - file1_name, file2_name); + file2_name, file1_name); curr2++; } } diff --git a/tools/h5diff/h5difftst.c b/tools/h5diff/h5difftst.c index 912ec33..c795b55 100644 --- a/tools/h5diff/h5difftst.c +++ b/tools/h5diff/h5difftst.c @@ -738,10 +738,10 @@ int do_test_files(void) *------------------------------------------------------------------------- */ - write_dataset(file3_id,1,dims1_1,"dset3",H5T_NATIVE_INT,0); - write_dataset(file4_id,1,dims1_1,"dset3",H5T_NATIVE_INT,0); - write_dataset(file3_id,1,dims1_1,"dset4",H5T_NATIVE_INT,0); - write_dataset(file4_id,1,dims1_1,"dset5",H5T_NATIVE_INT,0); + write_dataset(file3_id,1,dims1_1,"dset_A",H5T_NATIVE_INT,0); + write_dataset(file4_id,1,dims1_1,"dset_A",H5T_NATIVE_INT,0); + write_dataset(file3_id,1,dims1_1,"dset_B",H5T_NATIVE_INT,0); + write_dataset(file4_id,1,dims1_1,"dset_C",H5T_NATIVE_INT,0); |