summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-06-07 06:36:08 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-06-07 06:36:08 (GMT)
commit80737b93ef4425801da0f24b592e9b1bb3e3bca9 (patch)
tree8307193cd648e5e28170ac5baf4b238922e7705b /testpar/testphdf5.h
parentc8acfbbc7513e28961c67300d0d844e02074baed (diff)
downloadhdf5-80737b93ef4425801da0f24b592e9b1bb3e3bca9.zip
hdf5-80737b93ef4425801da0f24b592e9b1bb3e3bca9.tar.gz
hdf5-80737b93ef4425801da0f24b592e9b1bb3e3bca9.tar.bz2
[svn-r3973] 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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index b73a1f9..7d24ea0 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -35,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); \
@@ -59,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. */