summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testpar/t_coll_chunk.c70
-rw-r--r--testpar/testphdf5.c4
-rw-r--r--testpar/testphdf5.h1
3 files changed, 71 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){
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index f607d8f..dba93aa 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -323,6 +323,8 @@ h5_mpi_get_file_size(const char *filename, MPI_Comm comm, MPI_Info info)
size=0;
done:
+ printf("size in llu = %llu\n",size);
+ printf("size in lld = %lld\n",size);
return(size);
}
@@ -427,6 +429,8 @@ int main(int argc, char **argv)
coll_chunk2,NULL, "noncontiguous collective chunk io",PARATESTFILE);
AddTest("cchunk3",
coll_chunk3,NULL, "multi-chunk collective chunk io",PARATESTFILE);
+ AddTest("cchunk4",
+ coll_chunk4,NULL, "collective chunk io with partial non-selection ",PARATESTFILE);
/* irregular collective IO tests*/
AddTest("ccontw",
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index e085b62..416c3d3 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -55,6 +55,7 @@
#define SPACE_DIM2 3
#define BYROW_CONT 1
#define BYROW_DISCONT 2
+#define BYROW_SELECTNONE 3
#define DSET_COLLECTIVE_CHUNK_NAME "coll_chunk_name"