summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2005-09-08 22:19:12 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2005-09-08 22:19:12 (GMT)
commita48c2616017f26c7c5e212314839c70894ffc099 (patch)
treeac83bee62a264c138381226aa5c4b5befdefe7cc /testpar
parentbc2b8862c95a52d28f462751ca707cb60a5f1af0 (diff)
downloadhdf5-a48c2616017f26c7c5e212314839c70894ffc099.zip
hdf5-a48c2616017f26c7c5e212314839c70894ffc099.tar.gz
hdf5-a48c2616017f26c7c5e212314839c70894ffc099.tar.bz2
[svn-r11378] Purpose:
To support collective IO for irregular selection in the upcoming 1.6.5 release Description: Make the collective IO tests the same as 1.7 branch. The selections are complicated and big. Solution: Platforms tested: AIX 5.1(32bit and 64bit) Linux 2.4(heping)-mpich 1.2.6 Linux 2.4(NCSA teragrid) -mpich 1.2.5 Altrix(cobalt) IRIX 6.5- c compiler version 7.4.3(NCAR SGI) Linux 2.4(tune) - CMPI 2.1.0 Misc. update:
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_coll_chunk.c51
-rw-r--r--testpar/t_span_tree.c18
-rw-r--r--testpar/testphdf5.c83
-rw-r--r--testpar/testphdf5.h24
4 files changed, 86 insertions, 90 deletions
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index fe608f5..8eb282f 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -86,6 +86,7 @@ coll_chunk3(void)
}
+
void
coll_chunk4(void)
{
@@ -104,6 +105,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
hid_t file,dataset, file_dataspace;
hid_t acc_plist,xfer_plist,crp_plist;
+ hbool_t use_gpfs = FALSE;
hsize_t dims[RANK], chunk_dims[RANK];
int* data_array1 = NULL;
int* data_origin1 = NULL;
@@ -122,13 +124,9 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
MPI_Comm_rank(comm,&mpi_rank);
/* Create the data space */
- acc_plist = H5Pcreate(H5P_FILE_ACCESS);
+ acc_plist = create_faccess_plist(comm,info,facc_type,use_gpfs);
VRFY((acc_plist >= 0),"");
-
- status = H5Pset_fapl_mpio(acc_plist,comm,info);
- VRFY((acc_plist >= 0),"MPIO creation property list succeeded");
-
file = H5Fcreate(filename,H5F_ACC_TRUNC,H5P_DEFAULT,acc_plist);
VRFY((file >= 0),"H5Fcreate succeeded");
@@ -166,7 +164,10 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
/* test1: chunk size is equal to dataset size */
chunk_dims[0] = SPACE_DIM1/chunk_factor;
- chunk_dims[1] = SPACE_DIM2/chunk_factor;
+
+ /* to decrease the testing time, maintain bigger chunk size */
+ if(chunk_factor >2) chunk_dims[1] = SPACE_DIM2/2;
+ else chunk_dims[1] = SPACE_DIM2/chunk_factor;
status = H5Pset_chunk(crp_plist, 2, chunk_dims);
VRFY((status >= 0),"chunk creation property list succeeded");
@@ -193,28 +194,12 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
status = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((status>= 0),"MPIO collective transfer property succeeded");
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = H5D_XFER_COLL_CHUNK_DEF;
- status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value,
- NULL,NULL,NULL,NULL,NULL);
- VRFY((status >= 0),"testing property list inserted succeeded");
-#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* write data collectively */
status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, file_dataspace,
xfer_plist, data_array1);
VRFY((status >= 0),"dataset write succeeded");
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,&prop_value);
- VRFY((status >= 0),"testing property list get succeeded");
- if(chunk_factor == mpi_size*2 && select_factor == BYROW_DISCONT) { /* suppose to use independent */
- VRFY((prop_value == 0), "H5Dwrite shouldn't use MPI Collective IO call");
- }
- else {
- VRFY((prop_value == 1), "H5Dwrite didn't use MPI Collective IO call");
- }
-#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
status = H5Dclose(dataset);
VRFY((status >= 0),"");
@@ -242,11 +227,7 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
data_origin1 = (int *)malloc(SPACE_DIM1*SPACE_DIM2*sizeof(int));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
- /* Create the data space */
- acc_plist = H5Pcreate(H5P_FILE_ACCESS);
- VRFY((acc_plist >= 0),"");
-
- status = H5Pset_fapl_mpio(acc_plist,comm,info);
+ acc_plist = create_faccess_plist(comm, info, facc_type, use_gpfs);
VRFY((acc_plist >= 0),"MPIO creation property list succeeded");
file = H5Fopen(filename,H5F_ACC_RDONLY,acc_plist);
@@ -274,25 +255,9 @@ coll_chunktest(const char* filename,int chunk_factor,int select_factor) {
VRFY((xfer_plist >= 0),"");
status = H5Pset_dxpl_mpio(xfer_plist, H5FD_MPIO_COLLECTIVE);
VRFY((status>= 0),"MPIO collective transfer property succeeded");
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- prop_value = H5D_XFER_COLL_CHUNK_DEF;
- status = H5Pinsert(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,H5D_XFER_COLL_CHUNK_SIZE,&prop_value,
- NULL,NULL,NULL,NULL,NULL);
- VRFY((status >= 0),"testing property list inserted succeeded");
-#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
status = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, file_dataspace,
xfer_plist, data_array1);
VRFY((status >=0),"dataset read succeeded");
-#ifdef H5_HAVE_INSTRUMENTED_LIBRARY
- status = H5Pget(xfer_plist,H5D_XFER_COLL_CHUNK_NAME,&prop_value);
- VRFY((status >= 0),"testing property list get succeeded");
- if(chunk_factor == mpi_size*2 && select_factor == BYROW_DISCONT) { /* suppose to use independent */
- VRFY((prop_value == 0), "H5Dread shouldn't use MPI Collective IO call");
- }
- else {
- VRFY((prop_value == 1), "H5Dread didn't use MPI Collective IO call");
- }
-#endif /* H5_HAVE_INSTRUMENTED_LIBRARY */
/* verify the read data with original expected data */
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index a632823..8c75a8d 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -205,6 +205,7 @@ void coll_write_test(int chunk_factor)
const char *filename;
hid_t acc_plist,xfer_plist;
+ hbool_t use_gpfs = FALSE;
hid_t file, datasetc,dataseti; /* File and dataset identifiers */
hid_t mspaceid1, mspaceid, fspaceid,fspaceid1; /* Dataspace identifiers */
hid_t plist; /* Dataset property list identifier */
@@ -253,11 +254,16 @@ void coll_write_test(int chunk_factor)
vector[0] = vector[MSPACE1_DIM - 1] = -1;
for (i = 1; i < MSPACE1_DIM - 1; i++) vector[i] = i;
+#if 0
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
+#endif
+
+ acc_plist = create_faccess_plist(comm, info, facc_type, use_gpfs);
+ VRFY((acc_plist >= 0),"");
/*
* Create a file.
@@ -361,7 +367,7 @@ void coll_write_test(int chunk_factor)
ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, xfer_plist, vector);
- /*ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);*/
+/* ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);*/
VRFY((ret >= 0),"dataset collective write succeed");
ret = H5Sclose(mspaceid1);
@@ -400,11 +406,15 @@ void coll_write_test(int chunk_factor)
/*** For testing collective hyperslab selection write ***/
+#if 0
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
+#endif
+ acc_plist = create_faccess_plist(comm, info, facc_type, use_gpfs);
+ VRFY((acc_plist >= 0),"");
file = H5Fopen(filename, H5F_ACC_RDONLY, acc_plist);
VRFY((file >= 0),"H5Fopen succeeded");
@@ -568,6 +578,7 @@ void coll_read_test(int chunk_factor)
hid_t acc_plist,xfer_plist;
hid_t file, dataseti; /* File and dataset identifiers */
hid_t mspaceid, fspaceid1; /* Dataspace identifiers */
+ hbool_t use_gpfs = FALSE;
/* Dimension sizes of the dataset (on disk) */
hsize_t mdim[] = {MSPACE_DIM1, MSPACE_DIM2}; /* Dimension sizes of the
@@ -610,11 +621,16 @@ void coll_read_test(int chunk_factor)
/*** For testing collective hyperslab selection read ***/
+#if 0
acc_plist = H5Pcreate(H5P_FILE_ACCESS);
VRFY((acc_plist >= 0),"");
ret = H5Pset_fapl_mpio(acc_plist,comm,info);
VRFY((ret >= 0),"MPIO creation property list succeeded");
+#endif
+
+ acc_plist = create_faccess_plist(comm, info, facc_type, use_gpfs);
+ VRFY((acc_plist >= 0),"");
file = H5Fopen(filename, H5F_ACC_RDONLY, acc_plist);
VRFY((file >= 0),"H5Fopen succeeded");
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 6786032..2ce6fdb 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -419,43 +419,58 @@ int main(int argc, char **argv)
AddTest("fill", dataset_fillvalue, NULL,
"dataset fill value", PARATESTFILE);
- if(mpi_size > 64) {
- if(MAINPROCESS) {
- printf("Collective chunk IO tests haven't been tested \n");
- printf(" for the number of process greater than 64.\n");
- printf("Please try with the number of process \n");
- printf(" no greater than 64 for collective chunk IO test.\n");
- printf("Collective chunk tests will be skipped \n");
- }
- }
- else {
- AddTest("cchunk1", coll_chunk1,NULL,
- "simple collective chunk io",PARATESTFILE);
- AddTest("cchunk2", 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 to independent chunk io",PARATESTFILE);
- }
-
-#ifdef KYANG
- AddTest("ccontw",coll_irregular_cont_write,NULL,
- "collective irregular contiguous write",PARATESTFILE);
- AddTest("ccontr",coll_irregular_cont_read,NULL,
- "collective irregular contiguous read",PARATESTFILE);
+#if 0
+ /* Collective Chunk IO are verified to work for 64 processes.
+ * Add or skip depending on whether mpi_size is larger than 64.
+ */
- AddTest("cschunkw",coll_irregular_simple_chunk_write,NULL,
- "collective irregular simple chunk write",PARATESTFILE);
- AddTest("cschunkr",coll_irregular_simple_chunk_read,NULL,
- "collective irregular simple chunk read",PARATESTFILE);
+ if((mpi_size > 64) && MAINPROCESS) {
+ printf("Collective chunk IO tests haven't been tested \n");
+ printf(" for the number of process greater than 64.\n");
+ printf("Please try with the number of process \n");
+ printf(" no greater than 64 for collective chunk IO test.\n");
+ printf("Collective chunk tests will be skipped \n");
+ }
+ AddTest((mpi_size > 64) ? "-cchunk1" : "cchunk1",
+ coll_chunk1,NULL, "simple collective chunk io",PARATESTFILE);
+ AddTest((mpi_size > 64) ? "-cchunk2" : "cchunk2",
+ coll_chunk2,NULL, "noncontiguous collective chunk io",PARATESTFILE);
+ AddTest((mpi_size > 64) ? "-cchunk3" : "cchunk3",
+ coll_chunk3,NULL, "multi-chunk collective chunk io",PARATESTFILE);
+ AddTest((mpi_size > 64) ? "-cchunk4" : "cchunk4",
+ coll_chunk4,NULL, "collective to independent chunk io",PARATESTFILE);
+#endif
+ AddTest("cchunk1",
+ coll_chunk1,NULL, "simple collective chunk io",PARATESTFILE);
+ AddTest("cchunk2",
+ coll_chunk2,NULL, "noncontiguous collective chunk io",PARATESTFILE);
+ AddTest("cchunk3",
+ coll_chunk3,NULL, "multi-chunk collective chunk io",PARATESTFILE);
+#if 0
+ AddTest("cchunk4",
+ coll_chunk4,NULL, "collective to independent chunk io",PARATESTFILE);
+#endif
- AddTest("ccchunkw",coll_irregular_complex_chunk_write,NULL,
- "collective irregular complex chunk write",PARATESTFILE);
+/* irregular collective IO tests*/
+ AddTest("ccontw",
+ coll_irregular_cont_write,NULL,
+ "collective irregular contiguous write",PARATESTFILE);
+ AddTest("ccontr",
+ coll_irregular_cont_read,NULL,
+ "collective irregular contiguous read",PARATESTFILE);
+ AddTest("cschunkw",
+ coll_irregular_simple_chunk_write,NULL,
+ "collective irregular simple chunk write",PARATESTFILE);
+ AddTest("cschunkr",
+ coll_irregular_simple_chunk_read,NULL,
+ "collective irregular simple chunk read",PARATESTFILE);
+ AddTest("ccchunkw",
+ coll_irregular_complex_chunk_write,NULL,
+ "collective irregular complex chunk write",PARATESTFILE);
+ AddTest("ccchunkr",
+ coll_irregular_complex_chunk_read,NULL,
+ "collective irregular complex chunk read",PARATESTFILE);
- AddTest("ccchunkr",coll_irregular_complex_chunk_read,NULL,
- "collective irregular complex chunk read",PARATESTFILE);
-#endif
io_mode_confusion_params.name = PARATESTFILE;
io_mode_confusion_params.count = 0; /* value not used */
diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h
index a71e37d..aed6e88 100644
--- a/testpar/testphdf5.h
+++ b/testpar/testphdf5.h
@@ -113,8 +113,8 @@
#define FACC_MPIPOSIX 0x8 /* MPIPOSIX */
/*Constants for collective chunk definitions */
-#define SPACE_DIM1 288
-#define SPACE_DIM2 288
+#define SPACE_DIM1 5760
+#define SPACE_DIM2 3
#define BYROW_CONT 1
#define BYROW_DISCONT 2
#define DSET_COLLECTIVE_CHUNK_NAME "coll_chunk_name"
@@ -123,15 +123,15 @@
/*Constants for MPI derived data type generated from span tree */
#define MSPACE1_RANK 1 /* Rank of the first dataset in memory */
-#define MSPACE1_DIM 19000 /* Dataset size in memory */
+#define MSPACE1_DIM 27000 /* Dataset size in memory */
#define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */
#define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */
-#define FSPACE_DIM2 2400 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
+#define FSPACE_DIM2 3600 /* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */
#define MSPACE_RANK 2
#define MSPACE_DIM1 9
-#define MSPACE_DIM2 2400
+#define MSPACE_DIM2 3600
#define FHCOUNT0 1 /* Count of the first dimension of the first hyperslab selection*/
-#define FHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define FHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/
#define FHSTRIDE0 4 /* Stride of the first dimension of the first hyperslab selection*/
#define FHSTRIDE1 3 /* Stride of the second dimension of the first hyperslab selection*/
#define FHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
@@ -144,11 +144,11 @@
#define SHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define SHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
#define SHBLOCK0 3 /* Block of the first dimension of the first hyperslab selection*/
-#define SHBLOCK1 512 /* Block of the second dimension of the first hyperslab selection*/
+#define SHBLOCK1 768 /* Block of the second dimension of the first hyperslab selection*/
#define SHSTART0 4 /* start of the first dimension of the first hyperslab selection*/
#define SHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
-#define MHCOUNT0 4608 /* Count of the first dimension of the first hyperslab selection*/
+#define MHCOUNT0 6912 /* Count of the first dimension of the first hyperslab selection*/
#define MHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define MHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
#define MHSTART0 1 /* start of the first dimension of the first hyperslab selection*/
@@ -156,7 +156,7 @@
#define RFFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RFFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define RFFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/
#define RFFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define RFFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
#define RFFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
@@ -166,7 +166,7 @@
#define RFSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RFSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
+#define RFSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/
#define RFSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define RFSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
#define RFSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
@@ -176,7 +176,7 @@
#define RMFHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RMFHCOUNT1 512 /* Count of the second dimension of the first hyperslab selection*/
+#define RMFHCOUNT1 768 /* Count of the second dimension of the first hyperslab selection*/
#define RMFHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define RMFHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
#define RMFHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/
@@ -185,7 +185,7 @@
#define RMFHSTART1 0 /* start of the second dimension of the first hyperslab selection*/
#define RMSHCOUNT0 3 /* Count of the first dimension of the first hyperslab selection*/
-#define RMSHCOUNT1 1024 /* Count of the second dimension of the first hyperslab selection*/
+#define RMSHCOUNT1 1536 /* Count of the second dimension of the first hyperslab selection*/
#define RMSHSTRIDE0 1 /* Stride of the first dimension of the first hyperslab selection*/
#define RMSHSTRIDE1 1 /* Stride of the second dimension of the first hyperslab selection*/
#define RMSHBLOCK0 1 /* Block of the first dimension of the first hyperslab selection*/