summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-10-09 18:23:20 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-10-09 18:23:20 (GMT)
commit61ab6a6b46adc58142e26c88e0196dfbb3efb9bc (patch)
treeedf6be36bca36a7efab3b815cb7040517a459304 /testpar/testphdf5.c
parenta40a5bfeec79f10ada9f3ecfeebac0cc4b8d545f (diff)
downloadhdf5-61ab6a6b46adc58142e26c88e0196dfbb3efb9bc.zip
hdf5-61ab6a6b46adc58142e26c88e0196dfbb3efb9bc.tar.gz
hdf5-61ab6a6b46adc58142e26c88e0196dfbb3efb9bc.tar.bz2
[svn-r2641] Purpose:
Added features Description: There were no automatic tests for transfering zero elements. Solution: t_dset.c: Added two new patterns of ZROW (zero rows for process 0) and ZCOL(zero columns for process 0). ZROW test was added but it failed because the current library does not accept it. Not compiled in now. Need to fix the library before turning it back on again and also to add the ZCOL test. t_mdset.c: Added statement to show progress. Also the MPI_Barrier() call get processes synchornoized. It eliminates the racing condition but this is not a permenant solution. The library code needs to be fixed. testphdf5.c: Added a bunch of MPI_Type_XXX debug code. Added the -md option to skip the multiple datasets tests. Changed the cosmitic appearance of the banner messages. testphdf5.h: When an error is detected, the old way was to call MPI_Finalize() before exiting. This sometimes hangs because some processes may be waiting for a message of a different tag. Changed to call MPI_Abort() for now so that the whole MPI job would abort rather than hanging due resource limits exceeded. Added the definition of ZROW and ZCOL. Platforms tested: Modi4 -64.
Diffstat (limited to 'testpar/testphdf5.c')
-rw-r--r--testpar/testphdf5.c100
1 files changed, 87 insertions, 13 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 9199b69..22907f8 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -20,6 +20,7 @@ void *old_client_data; /* previous error handler arg.*/
/* other option flags */
int doread=1; /* read test */
int dowrite=1; /* write test */
+int domdset=1; /* multiple dataset test */
/* FILENAME and filenames must have the same number of names */
const char *FILENAME[5]={
"ParaEg1",
@@ -81,6 +82,66 @@ int MPI_Init(int *argc, char ***argv)
}
#endif /* USE_PAUSE */
+#if 0 /* temp. disabled */
+int MPI_Type_commit(MPI_Datatype *mpi_type)
+{
+ int ret_code;
+ ret_code=PMPI_Type_commit(mpi_type);
+ printf("PMPI_Type_commit ret_code=%d, mpi_type=%d\n", ret_code, *mpi_type);
+ return (ret_code);
+}
+
+int MPI_Type_free(MPI_Datatype *mpi_type)
+{
+ int ret_code;
+ printf("PMPI_Type_free mpi_type=%d, ", *mpi_type);
+ ret_code=PMPI_Type_free(mpi_type);
+ printf("ret_code=%d\n", ret_code);
+ return (ret_code);
+}
+
+int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype)
+{
+ int ret_code;
+ ret_code=PMPI_Type_contiguous(count, oldtype, newtype);
+ printf("PMPI_Type_contiguous ret_code=%d, count=%d, old_type=%d, new_type=%d\n",
+ ret_code, count, oldtype, *newtype);
+ return (ret_code);
+}
+
+int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype)
+{
+ int ret_code;
+ ret_code=PMPI_Type_vector(count, blocklength, stride, oldtype, newtype);
+ printf("PMPI_Type_vector ret_code=%d, count=%d, blocklength=%d, stride=%d, "
+ "old_type=%d, new_type=%d\n",
+ ret_code, count, blocklength, stride, oldtype, *newtype);
+ return (ret_code);
+}
+
+int MPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype)
+{
+ int ret_code;
+ ret_code=PMPI_Type_struct(count, array_of_blocklengths, array_of_displacements, array_of_types, newtype);
+ printf("PMPI_Type_struct ret_code=%d, new_type=%d\n",
+ ret_code, *newtype);
+ return (ret_code);
+}
+
+#ifdef HAVE_MPI2
+int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype)
+{
+ int ret_code;
+ ret_code=PMPI_Type_create_resized(oldtype, lb, extent, newtype);
+ printf("PMPI_Type_create_resized ret_code=%d, lb=%d, extent=%d, old_type=%d, new_type=%d\n",
+ ret_code, lb, extent, oldtype, *newtype);
+ return (ret_code);
+}
+#endif
+
+#endif
+
+
/*
* Show command usage
@@ -89,8 +150,9 @@ void
usage(void)
{
printf("Usage: testphdf5 [-r] [-w] [-v] [-f <prefix>] [-d <dim0> <dim1>]\n");
- printf("\t-r\t\tno read\n");
- printf("\t-w\t\tno write\n");
+ printf("\t-r\t\tno read test\n");
+ printf("\t-w\t\tno write test\n");
+ printf("\t-m\t\tno multiple dataset test\n");
printf("\t-v\t\tverbose on\n");
printf("\t-f <prefix>\tfilename prefix\n");
printf("\t-d <dim0> <dim1>\tdataset dimensions\n");
@@ -125,6 +187,8 @@ parse_options(int argc, char **argv)
break;
case 'w': dowrite = 0;
break;
+ case 'm': domdset = 0;
+ break;
case 'v': verbose = 1;
break;
case 'f': if (--argc < 1) {
@@ -238,36 +302,46 @@ main(int argc, char **argv)
}
if (dowrite){
- MPI_BANNER("testing MPIO independent overlapping writes...");
+ MPI_BANNER("MPIO independent overlapping writes...");
test_mpio_overlap_writes(filenames[0]);
- MPI_BANNER("testing dataset using split communicators...");
+ MPI_BANNER("dataset using split communicators...");
test_split_comm_access(filenames[0]);
- MPI_BANNER("testing dataset independent write...");
+ MPI_BANNER("dataset independent write...");
dataset_writeInd(filenames[0]);
- MPI_BANNER("testing dataset collective write...");
+ MPI_BANNER("dataset collective write...");
dataset_writeAll(filenames[1]);
- MPI_BANNER("testing extendible dataset independent write...");
+ MPI_BANNER("extendible dataset independent write...");
extend_writeInd(filenames[2]);
- MPI_BANNER("testing multiple datasets write ...");
- multiple_dset_write(filenames[3]);
-
+ if (domdset){
+ MPI_BANNER("multiple datasets write ...");
+ multiple_dset_write(filenames[3]);
+ }
+ else{
+ MPI_BANNER("Multiple datasets test skipped");
+ }
+ }
+ else{
+ MPI_BANNER("write tests skipped");
}
if (doread){
- MPI_BANNER("testing dataset independent read...");
+ MPI_BANNER("dataset independent read...");
dataset_readInd(filenames[0]);
- MPI_BANNER("testing dataset collective read...");
+ MPI_BANNER("dataset collective read...");
dataset_readAll(filenames[1]);
- MPI_BANNER("testing extendible dataset independent read...");
+ MPI_BANNER("extendible dataset independent read...");
extend_readInd(filenames[2]);
}
+ else{
+ MPI_BANNER("read tests skipped");
+ }
if (!(dowrite || doread)){
usage();