summaryrefslogtreecommitdiffstats
path: root/testpar/t_bigio.c
diff options
context:
space:
mode:
authorRichard Warren <Richard.Warren@hdfgroup.org>2017-07-10 20:17:26 (GMT)
committerRichard Warren <Richard.Warren@hdfgroup.org>2017-07-10 20:17:26 (GMT)
commit0c4c562cc583fd814f26ba652cbcf82dc6d33cac (patch)
treeded7d31899b1609e4d07d07cd0bebfd79ec663a0 /testpar/t_bigio.c
parent64d33e5e6e4b4270a3982c1be384cb41a0aa4c3b (diff)
downloadhdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.zip
hdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.tar.gz
hdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.tar.bz2
Include code fixes and additional modifications pointed out by code reviewers
Diffstat (limited to 'testpar/t_bigio.c')
-rw-r--r--testpar/t_bigio.c72
1 files changed, 64 insertions, 8 deletions
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 2f80e45..830ea54 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -2060,13 +2060,62 @@ coll_chunktest(const char* filename,
+/*****************************************************************************
+ *
+ * Function: do_express_test()
+ *
+ * Purpose: Do an MPI_Allreduce to obtain the maximum value returned
+ * by GetTestExpress() across all processes. Return this
+ * value.
+ *
+ * Envirmoment variables can be different across different
+ * processes. This function ensures that all processes agree
+ * on whether to do an express test.
+ *
+ * Return: Success: Maximum of the values returned by
+ * GetTestExpress() across all processes.
+ *
+ * Failure: -1
+ *
+ * Programmer: JRM -- 4/25/06
+ *
+ *****************************************************************************/
+static int
+do_express_test(int world_mpi_rank)
+{
+ int express_test;
+ int max_express_test;
+ int result;
+
+ express_test = GetTestExpress();
+
+ result = MPI_Allreduce((void *)&express_test,
+ (void *)&max_express_test,
+ 1,
+ MPI_INT,
+ MPI_MAX,
+ MPI_COMM_WORLD);
+
+ if ( result != MPI_SUCCESS ) {
+ nerrors++;
+ max_express_test = -1;
+ if ( VERBOSE_MED && (world_mpi_rank == 0)) {
+ HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n",
+ world_mpi_rank, FUNC );
+ }
+ }
+
+ return(max_express_test);
+
+} /* do_express_test() */
int main(int argc, char **argv)
{
-
+ int ExpressMode = 0;
hsize_t newsize = 1048576;
hsize_t oldsize = H5S_mpio_set_bigio_count(newsize);
+
if (newsize != oldsize) {
bigcount = newsize * 2;
}
@@ -2075,20 +2124,27 @@ int main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
+ ExpressMode = do_express_test(mpi_rank);
+
dataset_big_write();
MPI_Barrier(MPI_COMM_WORLD);
dataset_big_read();
MPI_Barrier(MPI_COMM_WORLD);
- oldsize = H5S_mpio_set_bigio_count(16384);
+ if (ExpressMode > 1) {
+ printf("***Express test mode on. Several tests are skipped\n");
+ }
+ else {
+ coll_chunk1();
+ MPI_Barrier(MPI_COMM_WORLD);
+ coll_chunk2();
+ MPI_Barrier(MPI_COMM_WORLD);
+ coll_chunk3();
+ }
- coll_chunk1();
- MPI_Barrier(MPI_COMM_WORLD);
- coll_chunk2();
- MPI_Barrier(MPI_COMM_WORLD);
- coll_chunk3();
- MPI_Barrier(MPI_COMM_WORLD);
+ /* close HDF5 library */
+ H5close();
MPI_Finalize();