summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/h5diff/h5diff_main.c3
-rw-r--r--tools/lib/h5diff.c9
-rw-r--r--tools/lib/h5diff.h3
-rw-r--r--tools/lib/h5diff_util.c2
4 files changed, 12 insertions, 5 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 5c15d16..1c1823a 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -71,6 +71,7 @@ int main(int argc, const char *argv[])
#ifdef H5_HAVE_PARALLEL
MPI_Status Status;
+ outBuffOffset = 0;
#endif
/* See what we were called as to determine whether to run serial or parallel version
@@ -266,7 +267,9 @@ int main(int argc, const char *argv[])
if (!options.err_stat)
{
print_found(nfound);
+#ifdef H5_HAVE_PARALLEL
print_manager_output();
+#endif
}
}
}
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 65959a2..2304f92 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -55,7 +55,6 @@ void phdiff_dismiss_workers(void)
MPI_Send(NULL, 0, MPI_BYTE, i, MPI_TAG_END, MPI_COMM_WORLD);
}
-#endif
/*-------------------------------------------------------------------------
* Function: print_manager_output
@@ -74,15 +73,21 @@ void phdiff_dismiss_workers(void)
void print_manager_output(void)
{
/* If there was something we buffered, let's print it now */
- if(outBuffOffset>0)
+ if( (outBuffOffset>0) && g_Parallel)
{
printf("%s", outBuff);
fflush(stdout);
memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
}
+ else if( (outBuffOffset>0) && !g_Parallel)
+ {
+ printf("h5diff error: outBuffOffset>0, but we're not in parallel\n");
+ }
}
+#endif
+
/*-------------------------------------------------------------------------
* Function: h5diff
*
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index b5fff64..a9d8458 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -81,9 +81,10 @@ hsize_t h5diff(const char *fname1,
const char *objname1,
const char *objname2,
diff_opt_t *options);
-void print_manager_output(void);
+
#ifdef H5_HAVE_PARALLEL
void phdiff_dismiss_workers(void);
+void print_manager_output(void);
#endif
#ifdef __cplusplus
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index dfd93c8..96d7b5e 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -22,8 +22,6 @@ unsigned char g_Parallel = 0; /*0 for serial, 1 for parallel */
char outBuff[OUTBUFF_SIZE];
unsigned int outBuffOffset;
-extern int nID;
-
/*-------------------------------------------------------------------------
* Function: parallel_print
*