summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_util.c
diff options
context:
space:
mode:
authorLeon Arber <larber@ncsa.uiuc.edu>2005-02-02 23:01:42 (GMT)
committerLeon Arber <larber@ncsa.uiuc.edu>2005-02-02 23:01:42 (GMT)
commit8af13859397ca1030dda5668017664692669d7e6 (patch)
treed938619dd7e386fa443986cea5700551925ee618 /tools/lib/h5diff_util.c
parentd0ced67f526acb4491269e8e66799e9fb81115ac (diff)
downloadhdf5-8af13859397ca1030dda5668017664692669d7e6.zip
hdf5-8af13859397ca1030dda5668017664692669d7e6.tar.gz
hdf5-8af13859397ca1030dda5668017664692669d7e6.tar.bz2
[svn-r9925] Purpose:
Bug Fix Description: Permanent fix for the incompatibilities between h5diff and h5repack. Solution: h5diff now contains the code to run both parallel and serial diffs. Depending on how the binary is called, it will run either the serial or the parallel versions respectively. Platforms tested: heping(serial + parallel), copper. Misc. update:
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r--tools/lib/h5diff_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index d4b6437..c29b085 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -17,10 +17,12 @@
#include "H5private.h"
/* global variables */
-int g_nTasks;
+int g_nTasks = 1;
+unsigned char g_Parallel = 0; /*0 for serial, 1 for parallel */
char outBuff[OUTBUFF_SIZE];
unsigned int outBuffOffset;
+
/*-------------------------------------------------------------------------
* Function: parallel_print
*
@@ -38,7 +40,7 @@ void parallel_print(const char* format, ...)
va_start(ap, format);
- if(g_nTasks < 2)
+ if(!g_Parallel)
vprintf(format, ap);
else
outBuffOffset += HDvsnprintf(outBuff+outBuffOffset, OUTBUFF_SIZE-outBuffOffset, format, ap);