summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/h5diff/h5diff_common.c34
-rw-r--r--tools/h5diff/h5diff_main.c4
-rw-r--r--tools/h5diff/h5diffgentest.c111
-rwxr-xr-xtools/h5diff/testh5diff.sh4
-rwxr-xr-xtools/h5repack/h5repack.sh.in4
-rw-r--r--tools/h5repack/h5repacktst.c3
-rw-r--r--tools/lib/h5diff.c352
-rw-r--r--tools/lib/h5diff.h2
-rw-r--r--tools/testfiles/h5diff_10.txt19
-rw-r--r--tools/testfiles/h5diff_19.txt27
-rw-r--r--tools/testfiles/h5diff_600.txt19
-rw-r--r--tools/testfiles/h5diff_602.txt19
-rw-r--r--tools/testfiles/h5diff_603.txt19
-rw-r--r--tools/testfiles/h5diff_604.txt19
-rw-r--r--tools/testfiles/h5diff_605.txt19
-rw-r--r--tools/testfiles/h5diff_606.txt19
-rw-r--r--tools/testfiles/h5diff_611.txt19
-rw-r--r--tools/testfiles/h5diff_612.txt19
-rw-r--r--tools/testfiles/h5diff_613.txt19
-rw-r--r--tools/testfiles/h5diff_614.txt19
-rw-r--r--tools/testfiles/h5diff_615.txt19
-rw-r--r--tools/testfiles/h5diff_620.txt19
-rw-r--r--tools/testfiles/h5diff_621.txt19
-rw-r--r--tools/testfiles/h5diff_622.txt19
-rw-r--r--tools/testfiles/h5diff_623.txt19
-rw-r--r--tools/testfiles/h5diff_624.txt19
26 files changed, 570 insertions, 294 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 357bb32..05111a9 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -31,7 +31,7 @@ const char *progname = "h5diff";
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char *s_opts = "hVrvqn:d:p:";
+static const char *s_opts = "hVrvqn:d:p:c";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
@@ -41,6 +41,7 @@ static struct long_options l_opts[] = {
{ "count", require_arg, 'n' },
{ "delta", require_arg, 'd' },
{ "relative", require_arg, 'p' },
+ { "contents", no_arg, 'c' },
{ NULL, 0, '\0' }
};
@@ -91,6 +92,9 @@ void parse_command_line(int argc,
case 'r':
options->m_report = 1;
break;
+ case 'c':
+ options->m_contents = 1;
+ break;
case 'd':
options->d=1;
@@ -170,7 +174,7 @@ void parse_command_line(int argc,
void print_info(diff_opt_t* options)
{
- if (options->m_quiet || options->err_stat)
+ if (options->m_quiet || options->err_stat || options->m_contents)
return;
if (options->cmn_objs==0)
@@ -318,8 +322,10 @@ void usage(void)
printf(" -V, --version Print version number and exit\n");
printf(" -r, --report Report mode. Print differences\n");
printf(" -v, --verbose Verbose mode. Print differences, list of objects\n");
-
printf(" -q, --quiet Quiet mode. Do not do output\n");
+ printf(" -c, --contents Contents mode. Objects in both files must match\n");
+
+
printf(" -n C, --count=C Print differences up to C number\n");
printf(" -d D, --delta=D Print difference when greater than limit D\n");
printf(" -p R, --relative=R Print difference when greater than relative limit R\n");
@@ -339,6 +345,22 @@ void usage(void)
printf(" -r Report mode: print the above plus the differences\n");
printf(" -v Verbose mode: print the above plus a list of objects and warnings\n");
printf(" -q Quiet mode: do not print output\n");
+ printf(" -c Contents mode: objects in both files must match\n");
+
+ printf("\n");
+
+ printf(" Compare criteria\n");
+ printf("\n");
+ printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n");
+ printf(" with the same absolute path in both files. However,\n");
+ printf(" when the -c flag is present, (contents mode) the objects in file1\n");
+ printf(" must match exactly the objects in file2\n");
+ printf("\n");
+
+ printf(" The compare criteria is:\n");
+ printf(" 1) datasets: numerical array differences 2) groups: name string difference\n");
+ printf(" 3) datatypes: the return value of H5Tequal 2) links: name string difference\n");
+ printf(" of the linked value\n");
printf("\n");
@@ -368,11 +390,7 @@ void usage(void)
printf("\n");
printf(" to compare '/g1/dset1' and '/g1/dset2' in the same file\n");
printf("\n");
- printf(" If no objects [obj1[obj2]] are specified, h5diff only compares objects\n");
- printf(" with the same absolute path in both files. The compare criteria is:\n");
- printf(" 1) datasets: numerical array differences 2) groups: name string difference\n");
- printf(" 3) datatypes: the return value of H5Tequal 2) links: name string difference\n");
- printf(" of the linked value\n");
+
}
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 54a075f..17fe275 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -89,6 +89,10 @@ int main(int argc, const char *argv[])
*/
ret = (nfound == 0 ? 0 : 1 );
+
+ if ( options.m_contents && options.contents == 0 )
+ ret = 1;
+
if(options.err_stat)
ret = -1;
return ret;
diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c
index 74b3aa2..e1a554e 100644
--- a/tools/h5diff/h5diffgentest.c
+++ b/tools/h5diff/h5diffgentest.c
@@ -146,7 +146,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
fprintf(stderr, "empty file (%s) close failed.\n", fname3);
goto out;
}
-
+
/*-------------------------------------------------------------------------
* create two files
*-------------------------------------------------------------------------
@@ -265,7 +265,6 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
*/
{
-#if 1
float data15[6];
float data16[6];
@@ -285,48 +284,9 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1,1,dims1,"fp15",H5T_NATIVE_FLOAT,data15);
write_dset(gid1,1,dims1,"fp16",H5T_NATIVE_FLOAT,data16);
-#else
-
-#define NU_ELMTS 1000000
-
- hsize_t i;
-
- hsize_t dims2[1] = { NU_ELMTS };
-
- float *data15 = malloc (NU_ELMTS * sizeof(float) );
- float *data16 = malloc (NU_ELMTS * sizeof(float) );
-
- data15[0] = (float) sqrt( (double)-1 );
- data15[1] = 1;
- data15[2] = (float) sqrt( (double)-1 );
- data15[3] = 1;
- data15[4] = 1;
- data15[5] = 1;
-
- data16[0] = (float) sqrt( (double)-1 );
- data16[1] = (float) sqrt( (double)-1 );
- data16[2] = 1;
- data16[3] = 1;
- data16[4] = 1;
- data16[5] = 1;
-
- for ( i = 6; i < NU_ELMTS; i++ )
- {
- data15[i] = /*data15[0];*/ 2;
- data16[i] = 1;
- }
-
- write_dset(gid1,1,dims2,"fp15",H5T_NATIVE_FLOAT,data15);
- write_dset(gid1,1,dims2,"fp16",H5T_NATIVE_FLOAT,data16);
-
- free( data15 );
- free( data16 );
-#endif
}
-
-
/*-------------------------------------------------------------------------
* NaNs in H5T_NATIVE_DOUBLE
*-------------------------------------------------------------------------
@@ -354,9 +314,7 @@ int test_basic(const char *fname1, const char *fname2, const char *fname3)
write_dset(gid1,1,dims1,"fp18",H5T_NATIVE_DOUBLE,data18);
}
-
-
-
+
/*-------------------------------------------------------------------------
* close
@@ -783,13 +741,13 @@ int test_datasets(const char *file,
write_dset_in(gid,"/dset",fid,make_diffs);
- /* Close */
+ /* close */
status = H5Dclose(did);
assert(status >= 0);
status = H5Gclose(gid);
assert(status >= 0);
- /* Close file */
+ /* close file */
status = H5Fclose(fid);
assert(status >= 0);
return status;
@@ -2666,31 +2624,35 @@ int write_attr(hid_t loc_id,
hid_t tid,
void *buf)
{
- hid_t aid;
- hid_t sid;
-
- /* create a space */
- if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
- goto out;
-
- /* create the attribute */
- if((aid = H5Acreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
- goto out;
-
- /* write */
- if(buf)
- if(H5Awrite(aid, tid, buf) < 0)
- goto out;
-
- /* close */
- H5Aclose(aid);
- H5Sclose(sid);
-
- return SUCCEED;
-
+ hid_t aid=-1;
+ hid_t sid=-1;
+
+ /* create a space */
+ if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
+ goto out;
+
+ /* create the attribute */
+ if((aid = H5Acreate2(loc_id, name, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ goto out;
+
+ /* write */
+ if(buf)
+ {
+ if(H5Awrite(aid, tid, buf) < 0)
+ goto out;
+ }
+
+ /* close */
+ H5Aclose(aid);
+ H5Sclose(sid);
+
+ return SUCCEED;
+
out:
-
- return FAIL;
+
+ H5Aclose(aid);
+ H5Sclose(sid);
+ return FAIL;
}
/*-------------------------------------------------------------------------
@@ -2708,8 +2670,8 @@ int write_dset( hid_t loc_id,
hid_t tid,
void *buf )
{
- hid_t did;
- hid_t sid;
+ hid_t did=-1;
+ hid_t sid=-1;
/* create a space */
if((sid = H5Screate_simple(rank, dims, NULL)) < 0)
@@ -2721,8 +2683,10 @@ int write_dset( hid_t loc_id,
/* write */
if(buf)
+ {
if(H5Dwrite(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
goto out;
+ }
/* close */
H5Dclose(did);
@@ -2731,6 +2695,9 @@ int write_dset( hid_t loc_id,
return SUCCEED;
out:
+
+ H5Dclose(did);
+ H5Sclose(sid);
return FAIL;
}
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 6685a66..208bb29 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -39,6 +39,7 @@ FILE7=h5diff_dset1.h5
FILE8=h5diff_dset2.h5
FILE9=h5diff_hyper1.h5
FILE10=h5diff_hyper2.h5
+FILE11=h5diff_empty.h5
H5DIFF=h5diff # The tool name
@@ -301,6 +302,9 @@ TOOLTEST h5diff_17.txt -v $FILE1 $FILE2
# 1.8 quiet mode
TOOLTEST h5diff_18.txt -q $FILE1 $FILE2
+# 1.9 contents mode
+TOOLTEST h5diff_19.txt -v -c $FILE1 $FILE11
+
# ##############################################################################
# # not comparable types
# ##############################################################################
diff --git a/tools/h5repack/h5repack.sh.in b/tools/h5repack/h5repack.sh.in
index 77be575..e6d9a98 100755
--- a/tools/h5repack/h5repack.sh.in
+++ b/tools/h5repack/h5repack.sh.in
@@ -93,9 +93,9 @@ DIFFTEST()
{
VERIFY $@
if [ "`uname -s`" = "TFLOPS O/S" ]; then
- $RUNSERIAL $H5DIFF_BIN -q $@
+ $RUNSERIAL $H5DIFF_BIN -q -c $@
else
- $RUNSERIAL $H5DIFF_BIN -q "$@"
+ $RUNSERIAL $H5DIFF_BIN -q -c "$@"
fi
RET=$?
if [ $RET != 0 ] ; then
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 99448c4..3796179 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -152,6 +152,9 @@ int main (void)
memset(&diff_options, 0, sizeof (diff_opt_t));
memset(&pack_options, 0, sizeof (pack_opt_t));
+ /* set h5diff "contents" mode */
+ diff_options.m_contents = 1;
+
/* run tests */
puts("Testing h5repack:");
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 4f4074f..3bd6fb3 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -186,15 +186,17 @@ hsize_t h5diff(const char *fname1,
const char *objname2,
diff_opt_t *options)
{
- trav_info_t *info1;
- trav_info_t *info2;
- hid_t file1_id = (-1), file2_id = (-1);
+ trav_info_t *info1=NULL;
+ trav_info_t *info2=NULL;
+ hid_t file1_id = (-1);
+ hid_t file2_id = (-1);
char filenames[2][1024];
hsize_t nfound = 0;
HDmemset(filenames, 0, 1024 * 2);
- if(options->m_quiet && (options->m_verbose || options->m_report)) {
+ 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;
@@ -206,9 +208,11 @@ hsize_t h5diff(const char *fname1,
*/
/* disable error reporting */
- H5E_BEGIN_TRY {
- /* Open the files */
- if((file1_id = H5Fopen(fname1, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
+ 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);
options->err_stat = 1;
@@ -219,7 +223,8 @@ hsize_t h5diff(const char *fname1,
#endif
goto out;
} /* end if */
- if((file2_id = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
+ if((file2_id = H5Fopen(fname2, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
+ {
printf("h5diff: <%s>: unable to open file\n", fname2);
options->err_stat = 1;
@@ -255,11 +260,12 @@ hsize_t h5diff(const char *fname1,
goto out;
} /* end if */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* object name was supplied
*-------------------------------------------------------------------------
*/
- if(objname1) {
+ if( objname1 )
+ {
#ifdef H5_HAVE_PARALLEL
if(g_Parallel)
/* Let tasks know that they won't be needed */
@@ -267,22 +273,31 @@ hsize_t h5diff(const char *fname1,
#endif
assert(objname2);
options->cmn_objs = 1; /* eliminate warning */
- nfound = diff_compare(file1_id, fname1, objname1, info1,
- file2_id, fname2, objname2, info2,
+ nfound = diff_compare(file1_id,
+ fname1,
+ objname1,
+ info1,
+ file2_id,
+ fname2,
+ objname2,
+ info2,
options);
} /* end if */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* compare all
*-------------------------------------------------------------------------
*/
- else {
+ else
+ {
#ifdef H5_HAVE_PARALLEL
- if(g_Parallel) {
+ if(g_Parallel)
+ {
int i;
- if((HDstrlen(fname1) > 1024) || (HDstrlen(fname2) > 1024)) {
+ if((HDstrlen(fname1) > 1024) || (HDstrlen(fname2) > 1024))
+ {
fprintf(stderr, "The parallel diff only supports path names up to 1024 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -295,7 +310,12 @@ hsize_t h5diff(const char *fname1,
MPI_Send(filenames, (1024 * 2), MPI_CHAR, i, MPI_TAG_PARALLEL, MPI_COMM_WORLD);
} /* end if */
#endif
- nfound = diff_match(file1_id, info1, file2_id, info2, options);
+
+ nfound = diff_match(file1_id,
+ info1,
+ file2_id,
+ info2,
+ options);
} /* end else */
trav_info_free(info1);
@@ -303,7 +323,8 @@ hsize_t h5diff(const char *fname1,
out:
/* close */
- H5E_BEGIN_TRY {
+ H5E_BEGIN_TRY
+ {
H5Fclose(file1_id);
H5Fclose(file2_id);
} H5E_END_TRY;
@@ -332,26 +353,28 @@ out:
*-------------------------------------------------------------------------
*/
hsize_t diff_match(hid_t file1_id,
- trav_info_t * info1,
- hid_t file2_id,
- trav_info_t * info2,
- diff_opt_t * options)
+ trav_info_t *info1,
+ hid_t file2_id,
+ trav_info_t *info2,
+ diff_opt_t *options)
{
trav_table_t *table = NULL;
- size_t curr1, curr2;
- unsigned infile[2];
- hsize_t nfound = 0;
- unsigned i;
+ size_t curr1;
+ size_t curr2;
+ unsigned infile[2];
+ hsize_t nfound = 0;
+ unsigned i;
/*-------------------------------------------------------------------------
* build the list
*-------------------------------------------------------------------------
*/
- trav_table_init(&table);
+ trav_table_init( &table );
curr1 = 0;
curr2 = 0;
- while(curr1 < info1->nused && curr2 < info2->nused) {
+ while(curr1 < info1->nused && curr2 < info2->nused)
+ {
/* criteria is string compare */
int cmp = HDstrcmp(info1->paths[curr1].path, info2->paths[curr2].path);
@@ -363,13 +386,15 @@ hsize_t diff_match(hid_t file1_id,
curr1++;
curr2++;
} /* end if */
- else if(cmp < 0) {
+ else if(cmp < 0)
+ {
infile[0] = 1;
infile[1] = 0;
trav_table_addflags(infile, info1->paths[curr1].path, info1->paths[curr1].type, table);
curr1++;
} /* end else-if */
- else {
+ else
+ {
infile[0] = 0;
infile[1] = 1;
trav_table_addflags(infile, info2->paths[curr2].path, info2->paths[curr2].type, table);
@@ -380,7 +405,8 @@ hsize_t diff_match(hid_t file1_id,
/* list1 did not end */
infile[0] = 1;
infile[1] = 0;
- while(curr1 < info1->nused) {
+ while(curr1 < info1->nused)
+ {
trav_table_addflags(infile, info1->paths[curr1].path, info1->paths[curr1].type, table);
curr1++;
} /* end while */
@@ -388,16 +414,18 @@ hsize_t diff_match(hid_t file1_id,
/* list2 did not end */
infile[0] = 0;
infile[1] = 1;
- while(curr2 < info2->nused) {
+ while(curr2 < info2->nused)
+ {
trav_table_addflags(infile, info2->paths[curr2].path, info2->paths[curr2].type, table);
curr2++;
} /* end while */
- /*-------------------------------------------------------------------------
+ /*-------------------------------------------------------------------------
* print the list
*-------------------------------------------------------------------------
*/
- if(options->m_verbose) {
+ if(options->m_verbose)
+ {
printf("\n");
printf("file1 file2\n");
printf("---------------------------------------\n");
@@ -412,6 +440,35 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
+
+ /*-------------------------------------------------------------------------
+ * contents mode. we do an "absolute" compare criteria, the number of objects
+ * in file1 must be the same as in file2
+ *-------------------------------------------------------------------------
+ */
+ if ( options->m_contents )
+ {
+ /* assume equal contents initially */
+ options->contents = 1;
+
+ /* number of different objects */
+ if ( info1->nused != info2->nused )
+ {
+ options->contents = 0;
+ }
+
+
+ for( i = 0; i < table->nobjs; i++)
+ {
+ if( table->objs[i].flags[0] != table->objs[i].flags[1] )
+ {
+ options->contents = 0;
+ }
+ }
+
+ }
+
+
/*-------------------------------------------------------------------------
* do the diff for common objects
*-------------------------------------------------------------------------
@@ -430,17 +487,21 @@ hsize_t diff_match(hid_t file1_id,
HDmemset(workerTasks, 1, (g_nTasks - 1));
#endif
- for(i = 0; i < table->nobjs; i++) {
- if(table->objs[i].flags[0] && table->objs[i].flags[1]) {
+ for(i = 0; i < table->nobjs; i++)
+ {
+ if( table->objs[i].flags[0] && table->objs[i].flags[1])
+ {
options->cmn_objs = 1;
- if(!g_Parallel) {
+ if(!g_Parallel)
+ {
nfound += diff(file1_id,
table->objs[i].name,
file2_id,
table->objs[i].name, options, table->objs[i].type);
} /* end if */
#ifdef H5_HAVE_PARALLEL
- else {
+ else
+ {
int workerFound = 0;
h5diffdebug("beginning of big else block\n");
@@ -453,7 +514,8 @@ hsize_t diff_match(hid_t file1_id,
*/
/*Set up args to pass to worker task. */
- if(HDstrlen(table->objs[i].name) > 255) {
+ if(HDstrlen(table->objs[i].name) > 255)
+ {
printf("The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */
@@ -464,14 +526,16 @@ hsize_t diff_match(hid_t file1_id,
h5diffdebug2("busyTasks=%d\n", busyTasks);
/* if there are any outstanding print requests, let's handle one. */
- if(busyTasks > 0) {
+ if(busyTasks > 0)
+ {
int incomingMessage;
/* check if any tasks freed up, and didn't need to print. */
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &incomingMessage, &Status);
/* first block*/
- if(incomingMessage) {
+ if(incomingMessage)
+ {
workerTasks[Status.MPI_SOURCE - 1] = 1;
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
@@ -480,7 +544,8 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
/* check to see if the print token was returned. */
- if(!havePrintToken) {
+ if(!havePrintToken)
+ {
/* If we don't have the token, someone is probably sending us output */
print_incoming_data();
@@ -499,10 +564,12 @@ hsize_t diff_match(hid_t file1_id,
} /* end if */
/* check to see if anyone needs the print token. */
- if(havePrintToken) {
+ if(havePrintToken)
+ {
/* check incoming queue for print token requests */
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &incomingMessage, &Status);
- if(incomingMessage) {
+ if(incomingMessage)
+ {
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
havePrintToken = 0;
@@ -513,8 +580,10 @@ hsize_t diff_match(hid_t file1_id,
/* check array of tasks to see which ones are free.
* Manager task never does work, so freeTasks[0] is really
* worker task 0. */
- for(n = 1; (n < g_nTasks) && !workerFound; n++) {
- if(workerTasks[n-1]) {
+ for(n = 1; (n < g_nTasks) && !workerFound; n++)
+ {
+ if(workerTasks[n-1])
+ {
/* send file id's and names to first free worker */
MPI_Send(&args, sizeof(args), MPI_BYTE, n, MPI_TAG_ARGS, MPI_COMM_WORLD);
@@ -528,20 +597,24 @@ hsize_t diff_match(hid_t file1_id,
} /* end for */
h5diffdebug2("workerfound is %d \n", workerFound);
- if(!workerFound) {
+ if(!workerFound)
+ {
/* if they were all busy, we've got to wait for one free up
* before we can move on. If we don't have the token, some
* task is currently printing so we'll wait for that task to
* return it.
*/
- if(!havePrintToken) {
- while(!havePrintToken) {
+ if(!havePrintToken)
+ {
+ while(!havePrintToken)
+ {
int incomingMessage;
print_incoming_data();
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
- if(incomingMessage) {
+ if(incomingMessage)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status);
havePrintToken = 1;
nfound += nFoundbyWorker.nfound;
@@ -552,23 +625,27 @@ hsize_t diff_match(hid_t file1_id,
} /* end while */
} /* end if */
/* if we do have the token, check for task to free up, or wait for a task to request it */
- else {
+ else
+ {
/* But first print all the data in our incoming queue */
print_incoming_data();
MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status);
- if(Status.MPI_TAG == MPI_TAG_DONE) {
+ if(Status.MPI_TAG == MPI_TAG_DONE)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST)
+ {
int incomingMessage;
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
- do {
+ do
+ {
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
print_incoming_data();
@@ -579,7 +656,8 @@ hsize_t diff_match(hid_t file1_id,
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
MPI_Send(&args, sizeof(args), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_ARGS, MPI_COMM_WORLD);
} /* end else-if */
- else {
+ else
+ {
printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
@@ -593,26 +671,32 @@ hsize_t diff_match(hid_t file1_id,
h5diffdebug("done with for loop\n");
#ifdef H5_HAVE_PARALLEL
- if(g_Parallel) {
+ if(g_Parallel)
+ {
/* make sure all tasks are done */
- while(busyTasks > 0) {
+ while(busyTasks > 0)
+ {
MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &Status);
- if(Status.MPI_TAG == MPI_TAG_DONE) {
+ if(Status.MPI_TAG == MPI_TAG_DONE)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
busyTasks--;
} /* end if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_DONE, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
busyTasks--;
havePrintToken = 1;
} /* end else-if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_REQUEST)
+ {
MPI_Recv(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_REQUEST, MPI_COMM_WORLD, &Status);
- if(havePrintToken) {
+ if(havePrintToken)
+ {
int incomingMessage;
MPI_Send(NULL, 0, MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
@@ -629,11 +713,13 @@ hsize_t diff_match(hid_t file1_id,
busyTasks--;
} /* end if */
/* someone else must have it...wait for them to return it, then give it to the task that just asked for it. */
- else {
+ else
+ {
int source = Status.MPI_SOURCE;
int incomingMessage;
- do {
+ do
+ {
MPI_Iprobe(MPI_ANY_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &incomingMessage, &Status);
print_incoming_data();
@@ -647,7 +733,8 @@ hsize_t diff_match(hid_t file1_id,
MPI_Send(NULL, 0, MPI_BYTE, source, MPI_TAG_PRINT_TOK, MPI_COMM_WORLD);
} /* end else */
} /* end else-if */
- else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN) {
+ else if(Status.MPI_TAG == MPI_TAG_TOK_RETURN)
+ {
MPI_Recv(&nFoundbyWorker, sizeof(nFoundbyWorker), MPI_BYTE, Status.MPI_SOURCE, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD, &Status);
nfound += nFoundbyWorker.nfound;
options->not_cmp = options->not_cmp | nFoundbyWorker.not_cmp;
@@ -663,7 +750,8 @@ hsize_t diff_match(hid_t file1_id,
printf("%s", data);
} /* end else-if */
- else {
+ else
+ {
printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
@@ -702,59 +790,64 @@ hsize_t diff_match(hid_t file1_id,
*-------------------------------------------------------------------------
*/
-hsize_t diff_compare (hid_t file1_id,
- const char *file1_name,
- const char *obj1_name,
- trav_info_t * info1,
- hid_t file2_id,
- const char *file2_name,
- const char *obj2_name,
- trav_info_t * info2,
- diff_opt_t * options)
+hsize_t diff_compare(hid_t file1_id,
+ const char *file1_name,
+ const char *obj1_name,
+ trav_info_t *info1,
+ hid_t file2_id,
+ const char *file2_name,
+ const char *obj2_name,
+ trav_info_t *info2,
+ diff_opt_t *options)
{
- int f1 = 0, f2 = 0;
- hsize_t nfound = 0;
-
- ssize_t i = h5trav_getindex (info1, obj1_name);
- ssize_t j = h5trav_getindex (info2, obj2_name);
-
- if (i == -1)
- {
- parallel_print ("Object <%s> could not be found in <%s>\n", obj1_name,
- file1_name);
- f1 = 1;
- }
- if (j == -1)
- {
- parallel_print ("Object <%s> could not be found in <%s>\n", obj2_name,
- file2_name);
- f2 = 1;
- }
- if (f1 || f2)
- {
- options->err_stat = 1;
- return 0;
- }
-
- /* use the name with "/" first, as obtained by iterator function */
- obj1_name = info1->paths[i].path;
- obj2_name = info2->paths[j].path;
-
- /* objects are not the same type */
- if (info1->paths[i].type != info2->paths[j].type)
- {
- if (options->m_verbose)
- parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
- obj1_name, get_type(info1->paths[i].type), obj2_name,
- get_type(info2->paths[j].type));
- options->not_cmp=1;
- return 0;
- }
-
- nfound =
- diff (file1_id, obj1_name, file2_id, obj2_name, options, info1->paths[i].type);
-
- return nfound;
+ int f1 = 0;
+ int f2 = 0;
+ hsize_t nfound = 0;
+
+ ssize_t i = h5trav_getindex (info1, obj1_name);
+ ssize_t j = h5trav_getindex (info2, obj2_name);
+
+ if (i == -1)
+ {
+ parallel_print ("Object <%s> could not be found in <%s>\n", obj1_name,
+ file1_name);
+ f1 = 1;
+ }
+ if (j == -1)
+ {
+ parallel_print ("Object <%s> could not be found in <%s>\n", obj2_name,
+ file2_name);
+ f2 = 1;
+ }
+ if (f1 || f2)
+ {
+ options->err_stat = 1;
+ return 0;
+ }
+
+ /* use the name with "/" first, as obtained by iterator function */
+ obj1_name = info1->paths[i].path;
+ obj2_name = info2->paths[j].path;
+
+ /* objects are not the same type */
+ if (info1->paths[i].type != info2->paths[j].type)
+ {
+ if (options->m_verbose)
+ parallel_print("Comparison not possible: <%s> is of type %s and <%s> is of type %s\n",
+ obj1_name, get_type(info1->paths[i].type), obj2_name,
+ get_type(info2->paths[j].type));
+ options->not_cmp=1;
+ return 0;
+ }
+
+ nfound = diff(file1_id,
+ obj1_name,
+ file2_id,
+ obj2_name,
+ options,
+ info1->paths[i].type);
+
+ return nfound;
}
@@ -784,14 +877,15 @@ hsize_t diff(hid_t file1_id,
diff_opt_t * options,
h5trav_type_t type)
{
- hid_t type1_id = (-1);
- hid_t type2_id = (-1);
- hid_t grp1_id = (-1);
- hid_t grp2_id = (-1);
- int ret;
+ hid_t type1_id = (-1);
+ hid_t type2_id = (-1);
+ hid_t grp1_id = (-1);
+ hid_t grp2_id = (-1);
+ int ret;
hsize_t nfound = 0;
- switch(type) {
+ switch(type)
+ {
/*-------------------------------------------------------------------------
* H5TRAV_TYPE_DATASET
*-------------------------------------------------------------------------
@@ -801,7 +895,8 @@ hsize_t diff(hid_t file1_id,
* verbose, always print name
*-------------------------------------------------------------------------
*/
- if(options->m_verbose) {
+ if(options->m_verbose)
+ {
if(print_objname(options, (hsize_t)1))
do_print_objname("dataset", path1, path2);
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);
@@ -813,15 +908,18 @@ hsize_t diff(hid_t file1_id,
* disabling quiet mode
*-------------------------------------------------------------------------
*/
- else {
- if(options->m_quiet == 0) {
+ else
+ {
+ if(options->m_quiet == 0)
+ {
/* shut up temporarily */
options->m_quiet = 1;
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);
/* print again */
options->m_quiet = 0;
- if(nfound) {
+ if(nfound)
+ {
if(print_objname(options,nfound))
do_print_objname("dataset", path1, path2);
nfound = diff_dataset(file1_id, file2_id, path1, path2, options);
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index 373eeed..d12031a 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -37,6 +37,8 @@ typedef struct {
int err_stat; /* an error ocurred (1, error, 0, no error) */
int cmn_objs; /* do we have comparable objects */
int not_cmp; /* are the objects comparable */
+ int m_contents;/* contents mode */
+ int contents; /* equal contents */
} diff_opt_t;
diff --git a/tools/testfiles/h5diff_10.txt b/tools/testfiles/h5diff_10.txt
index 6a6dbae..a96e00c 100644
--- a/tools/testfiles/h5diff_10.txt
+++ b/tools/testfiles/h5diff_10.txt
@@ -12,6 +12,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -26,6 +27,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -51,8 +65,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_19.txt b/tools/testfiles/h5diff_19.txt
new file mode 100644
index 0000000..9ae1285
--- /dev/null
+++ b/tools/testfiles/h5diff_19.txt
@@ -0,0 +1,27 @@
+#############################
+Expected output for 'h5diff -v -c h5diff_basic1.h5 h5diff_empty.h5'
+#############################
+
+file1 file2
+---------------------------------------
+ x x /
+ x /g1
+ x /g1/d1
+ x /g1/d2
+ x /g1/dset1
+ x /g1/dset10
+ x /g1/dset3
+ x /g1/dset5
+ x /g1/dset6
+ x /g1/dset7
+ x /g1/dset8
+ x /g1/dset9
+ x /g1/fp1
+ x /g1/fp15
+ x /g1/fp16
+ x /g1/fp17
+ x /g1/fp18
+ x /g1/fp2
+
+group : </> and </>
+0 differences found
diff --git a/tools/testfiles/h5diff_600.txt b/tools/testfiles/h5diff_600.txt
index 56cc052..abaf5e7 100644
--- a/tools/testfiles/h5diff_600.txt
+++ b/tools/testfiles/h5diff_600.txt
@@ -12,6 +12,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -26,6 +27,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -51,9 +65,4 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
h5diff error: missing file names
diff --git a/tools/testfiles/h5diff_602.txt b/tools/testfiles/h5diff_602.txt
index cc522bd..55cd0e0 100644
--- a/tools/testfiles/h5diff_602.txt
+++ b/tools/testfiles/h5diff_602.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_603.txt b/tools/testfiles/h5diff_603.txt
index 352e75e..e786d52 100644
--- a/tools/testfiles/h5diff_603.txt
+++ b/tools/testfiles/h5diff_603.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_604.txt b/tools/testfiles/h5diff_604.txt
index dde3f37..eef9847 100644
--- a/tools/testfiles/h5diff_604.txt
+++ b/tools/testfiles/h5diff_604.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_605.txt b/tools/testfiles/h5diff_605.txt
index 8047b46..1052312 100644
--- a/tools/testfiles/h5diff_605.txt
+++ b/tools/testfiles/h5diff_605.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_606.txt b/tools/testfiles/h5diff_606.txt
index d1d83a1..cdf291b 100644
--- a/tools/testfiles/h5diff_606.txt
+++ b/tools/testfiles/h5diff_606.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_611.txt b/tools/testfiles/h5diff_611.txt
index 0b148a0..07aa0cd 100644
--- a/tools/testfiles/h5diff_611.txt
+++ b/tools/testfiles/h5diff_611.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_612.txt b/tools/testfiles/h5diff_612.txt
index 2aa4804..1cc46c5 100644
--- a/tools/testfiles/h5diff_612.txt
+++ b/tools/testfiles/h5diff_612.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_613.txt b/tools/testfiles/h5diff_613.txt
index dff7f7c..194a02d 100644
--- a/tools/testfiles/h5diff_613.txt
+++ b/tools/testfiles/h5diff_613.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_614.txt b/tools/testfiles/h5diff_614.txt
index 6090f4a..1635e76 100644
--- a/tools/testfiles/h5diff_614.txt
+++ b/tools/testfiles/h5diff_614.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_615.txt b/tools/testfiles/h5diff_615.txt
index fe7f9a4..9948be5 100644
--- a/tools/testfiles/h5diff_615.txt
+++ b/tools/testfiles/h5diff_615.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_620.txt b/tools/testfiles/h5diff_620.txt
index 9221c76..03c3e53 100644
--- a/tools/testfiles/h5diff_620.txt
+++ b/tools/testfiles/h5diff_620.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_621.txt b/tools/testfiles/h5diff_621.txt
index e27b486..570a0cf 100644
--- a/tools/testfiles/h5diff_621.txt
+++ b/tools/testfiles/h5diff_621.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_622.txt b/tools/testfiles/h5diff_622.txt
index 4b6c1a1..e4afaef 100644
--- a/tools/testfiles/h5diff_622.txt
+++ b/tools/testfiles/h5diff_622.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_623.txt b/tools/testfiles/h5diff_623.txt
index f4edf37..c2e036f 100644
--- a/tools/testfiles/h5diff_623.txt
+++ b/tools/testfiles/h5diff_623.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value
diff --git a/tools/testfiles/h5diff_624.txt b/tools/testfiles/h5diff_624.txt
index babc43f..e5c6431 100644
--- a/tools/testfiles/h5diff_624.txt
+++ b/tools/testfiles/h5diff_624.txt
@@ -13,6 +13,7 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r, --report Report mode. Print differences
-v, --verbose Verbose mode. Print differences, list of objects
-q, --quiet Quiet mode. Do not do output
+ -c, --contents Contents mode. Objects in both files must match
-n C, --count=C Print differences up to C number
-d D, --delta=D Print difference when greater than limit D
-p R, --relative=R Print difference when greater than relative limit R
@@ -27,6 +28,19 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
-r Report mode: print the above plus the differences
-v Verbose mode: print the above plus a list of objects and warnings
-q Quiet mode: do not print output
+ -c Contents mode: objects in both files must match
+
+ Compare criteria
+
+ If no objects [obj1[obj2]] are specified, h5diff only compares objects
+ with the same absolute path in both files. However,
+ when the -c flag is present, (contents mode) the objects in file1
+ must match exactly the objects in file2
+
+ The compare criteria is:
+ 1) datasets: numerical array differences 2) groups: name string difference
+ 3) datatypes: the return value of H5Tequal 2) links: name string difference
+ of the linked value
Return exit code:
@@ -52,8 +66,3 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]]
to compare '/g1/dset1' and '/g1/dset2' in the same file
- If no objects [obj1[obj2]] are specified, h5diff only compares objects
- with the same absolute path in both files. The compare criteria is:
- 1) datasets: numerical array differences 2) groups: name string difference
- 3) datatypes: the return value of H5Tequal 2) links: name string difference
- of the linked value