summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorLeon Arber <larber@ncsa.uiuc.edu>2005-02-08 05:42:49 (GMT)
committerLeon Arber <larber@ncsa.uiuc.edu>2005-02-08 05:42:49 (GMT)
commit2183c5971ad1ef5ddbff3fd19d8af13737f4f03f (patch)
tree818a85e1aecc8e8aab2eda3deccb4df03f49b6cc /tools/h5diff
parentb4153b4f5edef4833abea9a1249baf4690984258 (diff)
downloadhdf5-2183c5971ad1ef5ddbff3fd19d8af13737f4f03f.zip
hdf5-2183c5971ad1ef5ddbff3fd19d8af13737f4f03f.tar.gz
hdf5-2183c5971ad1ef5ddbff3fd19d8af13737f4f03f.tar.bz2
[svn-r9956] Purpose:
Fixed numerous ph5diff bugs. Description: Fixed manager output printing Fixed out of order output printing Fixed test script execution problem Temporary fix for large amounts of output overflowing buffer. Solution: The manager task buffers its output. However, since the manager task never gets a print token, this output was lost. Solution: new function called print_manager_output that prints buffered output is called in places where the manager buffers its output. printf was apparently buffering output. This means that a task would sometimes print even after it had given up its print token. Added fflush() call after printf() calls, which seems to have fixed the problem. calling rsh multiple times in succession seems to overwhelm something in Linux, as it begins to refuse new connections until the old ones reset. Since each call to mpirun in the test script starts up 4 rsh sessions, the test script eventually is unable to run any further tests. Solution: Added a short delay in the testscript between successive calls to mpirun to allow old connections to reset. The 10k output buffer was of insufficient size to hold the large amounts of output generated by some of the tests. Since code to buffer to a file has not been implemented yet, a temporary fix was to increase the size of the output buffer to 50k. Platforms tested: heping Misc. update:
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff_main.c13
-rwxr-xr-xtools/h5diff/testh5diff.sh5
-rwxr-xr-xtools/h5diff/testph5diff.sh1
3 files changed, 15 insertions, 4 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 4a15f78..5c15d16 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -55,6 +55,8 @@ static void ph5diff_worker( void );
*-------------------------------------------------------------------------
*/
+ int nID = 0;
+
int main(int argc, const char *argv[])
{
int i;
@@ -64,7 +66,6 @@ int main(int argc, const char *argv[])
const char *objname1 = NULL;
const char *objname2 = NULL;
hsize_t nfound=0;
- int nID = 0;
int ret;
diff_opt_t options;
@@ -91,7 +92,7 @@ int main(int argc, const char *argv[])
MPI_Comm_rank(MPI_COMM_WORLD, &nID);
MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks);
#else
- printf("You cannot run ph5diff unless you compiles a parallel build of HDF5\n");
+ printf("You cannot run ph5diff unless you compile a parallel build of HDF5\n");
h5diff_exit(2);
#endif
}
@@ -263,7 +264,10 @@ int main(int argc, const char *argv[])
else
{
if (!options.err_stat)
+ {
print_found(nfound);
+ print_manager_output();
+ }
}
}
@@ -365,6 +369,7 @@ ph5diff_worker(void)
/*When get token, print stuff out and return token */
printf("%s", outBuff);
+ fflush(stdout);
memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
@@ -377,7 +382,7 @@ ph5diff_worker(void)
else if(Status.MPI_TAG == MPI_TAG_END)
{
MPI_Recv(NULL, 0, MPI_BYTE, 0, MPI_TAG_END, MPI_COMM_WORLD, &Status);
- /*printf("exiting..., task: %d\n", nID);*/
+ /* printf("exiting..., task: %d\n", nID); */
break;
}
else
@@ -388,6 +393,7 @@ ph5diff_worker(void)
}
}
+
MPI_Barrier(MPI_COMM_WORLD);
MPI_Finalize();
}
@@ -546,6 +552,7 @@ void usage(void)
*/
void h5diff_exit(int status)
{
+
#ifdef H5_HAVE_PARALLEL
/* if in parallel mode, dismiss workers, close down MPI, then exit */
if(g_nTasks > 1){
diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh
index 437210c..52879c5 100755
--- a/tools/h5diff/testh5diff.sh
+++ b/tools/h5diff/testh5diff.sh
@@ -80,11 +80,16 @@ TOOLTEST() {
actual="../testfiles/`basename $1 .txt`.out"
actual_err="../testfiles/`basename $1 .txt`.err"
shift
+#echo $pmode
if test -n "$pmode"; then
RUNCMD=$RUNPARALLEL
+ sleep 2
else
RUNCMD=$RUNSERIAL
fi
+# set -x
+# echo RUNCMD=$RUNCMD
+# $RUNCMD /bin/true
# Run test.
# Tflops interprets "$@" as "" when no parameter is given (e.g., the
diff --git a/tools/h5diff/testph5diff.sh b/tools/h5diff/testph5diff.sh
index 947b53b..85baea7 100755
--- a/tools/h5diff/testph5diff.sh
+++ b/tools/h5diff/testph5diff.sh
@@ -13,7 +13,6 @@
## access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.
##
-
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.