summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-06-11 18:36:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-06-11 18:36:36 (GMT)
commit85d8862d8291cb4c42f6a29d19be3bc02bc4b771 (patch)
treee7665aeb1fb6fc2756c4978178debc021045750f /testpar/testphdf5.h
parent857074354ad9cfcd13cdf77ad9423eafe0d5e684 (diff)
downloadhdf5-85d8862d8291cb4c42f6a29d19be3bc02bc4b771.zip
hdf5-85d8862d8291cb4c42f6a29d19be3bc02bc4b771.tar.gz
hdf5-85d8862d8291cb4c42f6a29d19be3bc02bc4b771.tar.bz2
[svn-r3982] Purpose:
Bug fix Description: The t_mpi used to fail and exit if any error detected. That aborted other process in a "make check" situation. Solution: Introduced a new error verification as INFO. INFO is for information only. It does not increase nerrors count. The program always exits with 0. Platforms tested: eirene with mpich.
Diffstat (limited to 'testpar/testphdf5.h')
-rw-r--r--testpar/testphdf5.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 9a96e4f..7d24ea0 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -5,6 +5,7 @@
#include <assert.h>
#include <stdlib.h>
+
#include "hdf5.h"
#include "h5test.h"
@@ -34,6 +35,26 @@
H5Eclear(); \
} while(0)
+/*
+ * Checking for information purpose.
+ * If val is false, print mesg; else nothing.
+ * Either case, no error setting.
+ */
+#define INFO(val, mesg) do { \
+ if (val) { \
+ if (*mesg != '\0'){ \
+ MESG(mesg); \
+ } \
+ } \
+ else{ \
+ printf("Proc %d: ", mpi_rank); \
+ printf("*** PHDF5 Assertion failed (%s) at line %4d in %s\n", \
+ mesg, (int)__LINE__, __FILE__); \
+ fflush(stdout); \
+ } \
+ H5Eclear(); \
+} while(0)
+
#define MPI_BANNER(mesg)\
{printf("--------------------------------\n");\
printf("Proc %d: ", mpi_rank); \
@@ -58,6 +79,8 @@
#define BYCOL 2 /* divide into blocks of columns */
#define ZROW 3 /* same as BYCOL except process 0 gets 0 rows */
#define ZCOL 4 /* same as BYCOL except process 0 gets 0 columns */
+#define MAX_ERR_REPORT 10 /* Maximum number of errors reported */
+
/* dataset data type. Int's can be easily octo dumped. */