summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.h
diff options
context:
space:
mode:
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. */