summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.h
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-10-22 21:17:25 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-10-22 21:17:25 (GMT)
commit918b657dddfbe74c5cd419865536fa6c6104ae75 (patch)
treeec85bc23f20bd6bde7b01a8d26748b7d1b40c481 /testpar/testphdf5.h
parentf651ceab389b108a469962306195e8b34e96706b (diff)
downloadhdf5-918b657dddfbe74c5cd419865536fa6c6104ae75.zip
hdf5-918b657dddfbe74c5cd419865536fa6c6104ae75.tar.gz
hdf5-918b657dddfbe74c5cd419865536fa6c6104ae75.tar.bz2
[svn-r7701] Purpose:
Update Description: Added test for FPHDF5 to the testpar/ directory. If you specify --enable-fphdf5 during configuration, it'll run this test during a "make check". Platforms tested: Linux (FPHDF5 specific). Misc. update:
Diffstat (limited to 'testpar/testphdf5.h')
-rw-r--r--testpar/testphdf5.h124
1 files changed, 65 insertions, 59 deletions
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index 9a55f6e..3836ba6 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -30,28 +30,28 @@
/* Define some handy debugging shorthands, routines, ... */
/* debugging tools */
-#define MESG(x) \
- if (verbose) printf("%s\n", x); \
-
-#define VRFY(val, mesg) do { \
- if (val) { \
- if (*mesg != '\0'){ \
- MESG(mesg); \
- } \
- } \
- else{ \
- printf("Proc %d: ", mpi_rank); \
- printf("*** PHDF5 ERROR ***\n"); \
- printf(" Assertion (%s) failed at line %4d in %s\n", \
- mesg, (int)__LINE__, __FILE__); \
- nerrors++; \
- fflush(stdout); \
- if (!verbose){ \
- printf("aborting MPI process\n"); \
- MPI_Finalize(); exit(nerrors); \
- } \
- } \
- H5Eclear(H5E_DEFAULT); \
+#define MESG(x) \
+ if (verbose) printf("%s\n", x); \
+
+#define VRFY(val, mesg) do { \
+ if (val) { \
+ if (*mesg != '\0') { \
+ MESG(mesg); \
+ } \
+ } else { \
+ printf("Proc %d: ", mpi_rank); \
+ printf("*** PHDF5 ERROR ***\n"); \
+ printf(" Assertion (%s) failed at line %4d in %s\n", \
+ mesg, (int)__LINE__, __FILE__); \
+ ++nerrors; \
+ fflush(stdout); \
+ if (!verbose) { \
+ printf("aborting MPI process\n"); \
+ MPI_Finalize(); \
+ exit(nerrors); \
+ } \
+ } \
+ H5Eclear(H5E_DEFAULT); \
} while(0)
/*
@@ -59,32 +59,36 @@
* 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 REMARK (not an error) ***\n"); \
- printf(" Condition (%s) failed at line %4d in %s\n", \
- mesg, (int)__LINE__, __FILE__); \
- fflush(stdout); \
- } \
- H5Eclear(H5E_DEFAULT); \
+#define INFO(val, mesg) do { \
+ if (val) { \
+ if (*mesg != '\0') { \
+ MESG(mesg); \
+ } \
+ } else { \
+ printf("Proc %d: ", mpi_rank); \
+ printf("*** PHDF5 REMARK (not an error) ***\n"); \
+ printf(" Condition (%s) failed at line %4d in %s\n", \
+ mesg, (int)__LINE__, __FILE__); \
+ fflush(stdout); \
+ } \
+ H5Eclear(H5E_DEFAULT); \
} while(0)
-#define MPI_BANNER(mesg)\
- {printf("--------------------------------\n");\
- printf("Proc %d: ", mpi_rank); \
- printf("*** %s\n", mesg);\
- printf("--------------------------------\n");}
+#define MPI_BANNER(mesg) do { \
+ printf("--------------------------------\n"); \
+ printf("Proc %d: ", mpi_rank); \
+ printf("*** %s\n", mesg); \
+ printf("--------------------------------\n"); \
+} while(0)
+
+#define MAINPROCESS (!mpi_rank) /* define process 0 as main process */
-#define MAINPROCESS (!mpi_rank) /* define process 0 as main process */
+#define SYNC(comm) do { \
+ MPI_BANNER("doing a SYNC"); \
+ MPI_Barrier(comm); \
+ MPI_BANNER("SYNC DONE"); \
+} while(0)
-#define SYNC(comm)\
- {MPI_BANNER("doing a SYNC"); MPI_Barrier(comm); MPI_BANNER("SYNC DONE");}
/* End of Define some handy debugging shorthands, routines, ... */
/* Constants definitions */
@@ -95,24 +99,25 @@
#define DATASETNAME2 "Data2"
#define DATASETNAME3 "Data3"
#define DATASETNAME4 "Data4"
-/* hyperslab layout styles */
-#define BYROW 1 /* divide into slabs of rows */
-#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 */
+
+/* Hyperslab layout styles */
+#define BYROW 1 /* divide into slabs of rows */
+#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 */
/* File_Access_type bits */
-#define FACC_DEFAULT 0x0 /* default */
-#define FACC_MPIO 0x1 /* MPIO */
-#define FACC_SPLIT 0x2 /* Split File */
-#define FACC_MULTI 0x4 /* Multi File */
-#define FACC_MPIPOSIX 0x8 /* MPIPOSIX */
+#define FACC_DEFAULT 0x0 /* default */
+#define FACC_MPIO 0x1 /* MPIO */
+#define FACC_SPLIT 0x2 /* Split File */
+#define FACC_MULTI 0x4 /* Multi File */
+#define FACC_MPIPOSIX 0x8 /* MPIPOSIX */
-/* dataset data type. Int's can be easily octo dumped. */
+/* Dataset data type. Int's can be easily octo dumped. */
typedef int DATATYPE;
-/* shared global variables */
+/* Shared global variables */
extern int dim0, dim1; /*Dataset dimensions */
extern int chunkdim0, chunkdim1; /*Chunk dimensions */
extern int nerrors; /*errors count */
@@ -121,7 +126,7 @@ extern H5E_auto_t old_func; /* previous error handler */
extern void *old_client_data; /*previous error handler arg.*/
extern int facc_type; /*Test file access type */
-/* prototypes */
+/* Prototypes */
hid_t create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, hbool_t use_gpfs);
MPI_Offset h5_mpi_get_file_size(const char *filename, MPI_Comm comm, MPI_Info info);
void multiple_dset_write(char *filename, int ndatasets);
@@ -142,6 +147,7 @@ void extend_readInd(char *filename);
void extend_readAll(char *filename);
void compact_dataset(char *filename);
void big_dataset(const char *filename);
-int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], DATATYPE *dataset, DATATYPE *original);
+int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[],
+ hsize_t block[], DATATYPE *dataset, DATATYPE *original);
#endif /* PHDF5TEST_H */