summaryrefslogtreecommitdiffstats
path: root/testpar/t_coll_chunk.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2006-02-16 17:12:08 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2006-02-16 17:12:08 (GMT)
commit25837d324e306ea5631029b5b14e34d4a5e97c59 (patch)
tree1806ded545a4811eeebeaee73b48b4ca39b9b795 /testpar/t_coll_chunk.c
parent0fe91bb1a28ccfea8e67e3834155811d27446391 (diff)
downloadhdf5-25837d324e306ea5631029b5b14e34d4a5e97c59.zip
hdf5-25837d324e306ea5631029b5b14e34d4a5e97c59.tar.gz
hdf5-25837d324e306ea5631029b5b14e34d4a5e97c59.tar.bz2
[svn-r11951] Purpose:
Enhance collective chunk IO supports Description: Add a new test to check the correctness of the HDF5 library behavior for collective IO mode when one process doesn't have any contribution for IO. Solution: Platforms tested: IBM AIX 5.2(copper) Linux (heping) mpich-1.2.6 Misc. update:
Diffstat (limited to 'testpar/t_coll_chunk.c')
-rw-r--r--testpar/t_coll_chunk.c70
1 files changed, 66 insertions, 4 deletions
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index 0545bd1..f403b53 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -177,6 +177,57 @@ coll_chunk3(void)
}
+/*-------------------------------------------------------------------------
+ * Function: coll_chunk4
+ *
+ * Purpose: Wrapper to test the collective chunk IO for regular JOINT
+ selection with at least number of 2*mpi_size chunks
+ *
+ * Return: Success: 0
+ *
+ * Failure: -1
+ *
+ * Programmer: Unknown
+ * July 12th, 2004
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* ------------------------------------------------------------------------
+ * Descriptions for the selection: one singular selection accross many chunks
+ * Two dimensions, Num of chunks = 2* mpi_size
+ *
+ * dim1 = SPACE_DIM1(5760)
+ * dim2 = SPACE_DIM2(3)
+ * chunk_dim1 = dim1/mpi_size
+ * chunk_dim2 = dim2/2
+ * block = 1 for all dimensions
+ * stride = 1 for all dimensions
+ * count0 = SPACE_DIM1/mpi_size(5760/mpi_size)
+ * count1 = SPACE_DIM2(3)
+ * start0 = mpi_rank*SPACE_DIM1/mpi_size
+ * start1 = 0
+ *
+ * ------------------------------------------------------------------------
+ */
+
+void
+coll_chunk4(void)
+{
+
+ const char *filename;
+ int mpi_size;
+
+ MPI_Comm comm = MPI_COMM_WORLD;
+ MPI_Comm_size(comm,&mpi_size);
+
+ filename = GetTestParameters();
+ coll_chunktest(filename,1,BYROW_SELECTNONE);
+
+}
+
/*-------------------------------------------------------------------------
* Function: coll_chunktest
@@ -397,7 +448,6 @@ ccslab_set(int mpi_rank,
start[0] = mpi_rank*count[0];
start[1] = 0;
- if (VERBOSE_MED) printf("slab_set BYROW_CONT\n");
break;
case BYROW_DISCONT:
@@ -411,11 +461,24 @@ ccslab_set(int mpi_rank,
start[0] = SPACE_DIM1/mpi_size*mpi_rank;
start[1] = 0;
- if (VERBOSE_MED) printf("slab_set BYROW_DISCONT\n");
break;
+
+ case BYROW_SELECTNONE:
+ /* Each process takes a slabs of rows, there are
+ no selections for the last process. */
+ block[0] = 1;
+ block[1] = 1;
+ stride[0] = 1;
+ stride[1] = 1;
+ count[0] = ((mpi_rank == (mpi_size-1))?0:SPACE_DIM1/mpi_size);
+ count[1] = SPACE_DIM2;
+ start[0] = mpi_rank*count[0];
+ start[1] = 0;
+
+ break;
+
default:
/* Unknown mode. Set it to cover the whole dataset. */
- printf("unknown slab_set mode (%d)\n", mode);
block[0] = SPACE_DIM1;
block[1] = SPACE_DIM2;
stride[0] = block[0];
@@ -425,7 +488,6 @@ ccslab_set(int mpi_rank,
start[0] = 0;
start[1] = 0;
- if (VERBOSE_MED) printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED){