summaryrefslogtreecommitdiffstats
path: root/tools/lib/ph5diff.h
diff options
context:
space:
mode:
authorLeon Arber <larber@ncsa.uiuc.edu>2005-03-09 18:38:36 (GMT)
committerLeon Arber <larber@ncsa.uiuc.edu>2005-03-09 18:38:36 (GMT)
commit15e0a2331ecff452c74758ed44b456f06e528860 (patch)
tree4e3074e1355330f82cd5eb315515f280918edffc /tools/lib/ph5diff.h
parent0be2fb3aa3ef60a741bd453ad37473a1a1ad4102 (diff)
downloadhdf5-15e0a2331ecff452c74758ed44b456f06e528860.zip
hdf5-15e0a2331ecff452c74758ed44b456f06e528860.tar.gz
hdf5-15e0a2331ecff452c74758ed44b456f06e528860.tar.bz2
[svn-r10170] Purpose:
Bug Fixes Description: Fixes for several bugs, including dumping of excess output to a temporary file, fix for printing hsize_t datatype, and the long awaited fix for intermixed output. Solution: Fix 1: Overflow file Previously, any output that a worker task made was buffered locally in memory, up to a point. Any output beyond the size of the buffer (used to be 10k) was discarded. Now, the memory buffer size has been changed to 1k and any output beyond this amount is sent a temporary file. This way, no output is lost and memory usage is kept under control. The temporary file is deleted as soon as a worker task finishes sending its contents to the manager. Fix 2: hsize_t printing Printing of the hsize_t datatype used to be handled by %Hu passed to HDfprintf. However, there is no corresponding HDvsnprintf that is able to print hsize_t types. These are now printed with the aid of H5_PRINTF_LL_WIDTH. Fix 3: Intermixed output fix Intermixed output would occur on some machines (although I haven't seen it happen for a while) due to the unpredictability of the underlying network and the speed at which various message would travel. This has been fixed by having all output send to the manager for printing. The worker tasks no longer print the output themselves upon receipt of a token, but instead send that data to the manager. Platforms tested: heping, eirene, tg-login (the only place that seems to still experience intermixed output every now and then) Misc. update:
Diffstat (limited to 'tools/lib/ph5diff.h')
-rw-r--r--tools/lib/ph5diff.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h
index 91d7050..44e5b26 100644
--- a/tools/lib/ph5diff.h
+++ b/tools/lib/ph5diff.h
@@ -16,7 +16,8 @@
#define _PH5DIFF_H__
-#define OUTBUFF_SIZE 50000
+#define PRINT_DATA_MAX_SIZE 512
+#define OUTBUFF_SIZE PRINT_DATA_MAX_SIZE*2
/* Send from manager to workers */
#define MPI_TAG_ARGS 1
#define MPI_TAG_PRINT_TOK 2
@@ -25,15 +26,17 @@
#define MPI_TAG_TOK_REQUEST 3
#define MPI_TAG_DONE 4
#define MPI_TAG_TOK_RETURN 5
+#define MPI_TAG_PRINT_DATA 6
/* Operational tags used to init and complete diff */
-#define MPI_TAG_END 6
-#define MPI_TAG_PARALLEL 7
+#define MPI_TAG_END 7
+#define MPI_TAG_PARALLEL 8
extern int g_nTasks;
extern unsigned char g_Parallel;
-extern char outBuff[OUTBUFF_SIZE];
+extern char outBuff[];
extern unsigned int outBuffOffset;
+extern FILE* overflow_file;
struct diff_args
{