summaryrefslogtreecommitdiffstats
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
parent64d33e5e6e4b4270a3982c1be384cb41a0aa4c3b (diff)
downloadhdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.zip
hdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.tar.gz
hdf5-0c4c562cc583fd814f26ba652cbcf82dc6d33cac.tar.bz2
Include code fixes and additional modifications pointed out by code reviewers
-rw-r--r--MANIFEST1
-rw-r--r--src/H5Smpio.c12
-rw-r--r--testpar/CMakeLists.txt1
-rw-r--r--testpar/Makefile.am2
-rw-r--r--testpar/t_bigio.c72
5 files changed, 73 insertions, 15 deletions
diff --git a/MANIFEST b/MANIFEST
index 475b674..27f38be 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1222,6 +1222,7 @@
./testpar/COPYING
./testpar/Makefile.am
+./testpar/t_bigio.c
./testpar/t_cache.c
./testpar/t_cache_image.c
./testpar/t_chunk_alloc.c
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 7319a80..46f7a59 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -232,7 +232,7 @@ H5S_mpio_create_point_datatype (size_t elmt_size, hsize_t num_points,
/* Create an MPI datatype for the whole point selection */
if(MPI_SUCCESS != (mpi_code = MPI_Type_create_hindexed((int)num_points, blocks, disp, elmt_type, new_type)))
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_indexed_block failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hindexed failed", mpi_code)
#endif
/* Commit MPI datatype for later use */
@@ -871,7 +871,7 @@ H5S_mpio_hyper_type(const H5S_t *space, size_t elmt_size,
block_type, /* old type */
&outer_type); /* new type */
if(MPI_SUCCESS != mpi_code)
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
MPI_Type_free(&block_type);
MPI_Type_free(&inner_type);
@@ -1424,7 +1424,7 @@ static herr_t H5S_mpio_create_large_type (hsize_t num_elements,
stride_bytes,
old_type,
&inner_type))) {
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
}
@@ -1444,7 +1444,7 @@ static herr_t H5S_mpio_create_large_type (hsize_t num_elements,
stride_bytes,
inner_type,
&outer_type))) {
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
}
@@ -1468,7 +1468,7 @@ static herr_t H5S_mpio_create_large_type (hsize_t num_elements,
stride_bytes,
old_type,
&leftover_type))) {
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_hvector failed", mpi_code)
}
}
@@ -1484,7 +1484,7 @@ static herr_t H5S_mpio_create_large_type (hsize_t num_elements,
if(MPI_SUCCESS != (mpi_code =
MPI_Type_create_struct(2, block_len, disp, type, new_type))) {
- HMPI_GOTO_ERROR(FAIL, "MPI_Type_contiguous failed", mpi_code)
+ HMPI_GOTO_ERROR(FAIL, "MPI_Type_create_struct failed", mpi_code)
}
MPI_Type_free(&outer_type);
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 298d326..e994b65 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -43,6 +43,7 @@ ENDMACRO (ADD_H5P_EXE file)
set (H5P_TESTS
t_mpi
+ t_bigio
t_cache
t_pflush1
t_pflush2
diff --git a/testpar/Makefile.am b/testpar/Makefile.am
index b87c1df..7029bd5 100644
--- a/testpar/Makefile.am
+++ b/testpar/Makefile.am
@@ -23,7 +23,7 @@ AM_CPPFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/test
# Test programs. These are our main targets.
#
-TEST_PROG_PARA=t_mpi testphdf5 t_cache t_cache_image t_pflush1 t_pflush2 t_pshutdown t_prestart t_init_term t_shapesame
+TEST_PROG_PARA=t_mpi t_bigio testphdf5 t_cache t_cache_image t_pflush1 t_pflush2 t_pshutdown t_prestart t_init_term t_shapesame
check_PROGRAMS = $(TEST_PROG_PARA)
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();