summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2001-06-20 20:11:11 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2001-06-20 20:11:11 (GMT)
commit50f2811b8b5870e63dbb7701689903e0f5c6d61b (patch)
tree8063ca06d7f9c18b64d6c4320573ae5146e777a3 /testpar
parenta88fbd72d5e87c71e59e58b546cf0c2148cb6450 (diff)
downloadhdf5-50f2811b8b5870e63dbb7701689903e0f5c6d61b.zip
hdf5-50f2811b8b5870e63dbb7701689903e0f5c6d61b.tar.gz
hdf5-50f2811b8b5870e63dbb7701689903e0f5c6d61b.tar.bz2
[svn-r4024] Purpose:
Multiple-group testing Description: Added multiple groups under root group and multiple subgroups of certain levels. Also writes several datasets in each group in parallel. Solution: Platforms tested: MPICH(IRIX 6.5, IRIX64 6.5(64), IRIX64 6.5(N32), Linux, SunOS 5.6) and SGI MPI(IRIX64 6.5).
Diffstat (limited to 'testpar')
-rw-r--r--testpar/testphdf5.c47
1 files changed, 35 insertions, 12 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index e67de35..bade9a1 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -17,7 +17,9 @@ int chunkdim0;
int chunkdim1;
int nerrors = 0; /* errors count */
int verbose = 0; /* verbose, default as no. */
-int ndatasets = 300; /*number of datasets to create*/
+int ndatasets = 300; /* number of datasets to create*/
+int ngroups = 512; /* number of groups to create in root
+ * group. */
herr_t (*old_func)(void*); /* previous error handler */
void *old_client_data; /* previous error handler arg.*/
@@ -26,13 +28,14 @@ void *old_client_data; /* previous error handler arg.*/
int doread=1; /* read test */
int dowrite=1; /* write test */
/* FILENAME and filenames must have the same number of names */
-const char *FILENAME[5]={
+const char *FILENAME[6]={
"ParaEg1",
"ParaEg2",
"ParaEg3",
"ParaMdset",
+ "ParaMgroup",
NULL};
-char filenames[5][PATH_MAX];
+char filenames[6][PATH_MAX];
hid_t fapl; /* file access property list */
#ifdef USE_PAUSE
@@ -152,12 +155,14 @@ int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent,
void
usage(void)
{
- printf("Usage: testphdf5 [-r] [-w] [-v] [-m<n_datasets>] "
+ printf("Usage: testphdf5 [-r] [-w] [-v] [-m<n_datasets>] [-n<n_groups>] "
"[-f <prefix>] [-d <dim0> <dim1>]\n");
printf("\t-r\t\tno read test\n");
printf("\t-w\t\tno write test\n");
printf("\t-m<n_datasets>"
"\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
printf("\t-v\t\tverbose on\n");
printf("\t-f <prefix>\tfilename prefix\n");
printf("\t-d <dim0> <dim1>\tdataset dimensions\n");
@@ -198,6 +203,12 @@ parse_options(int argc, char **argv)
return(1);
}
break;
+ case 'n': ngroups = atoi((*argv+1)+1);
+ if (ngroups < 0){
+ nerrors++;
+ return(1);
+ }
+ break;
case 'v': verbose = 1;
break;
case 'f': if (--argc < 1) {
@@ -304,13 +315,25 @@ main(int argc, char **argv)
goto finish;
}
- if (ndatasets){
- MPI_BANNER("multiple datasets write ...");
- multiple_dset_write(filenames[3], ndatasets);
- }
- else{
- MPI_BANNER("Multiple datasets test skipped");
- }
+ if (ndatasets){
+ MPI_BANNER("multiple datasets write ...");
+ multiple_dset_write(filenames[3], ndatasets);
+ }
+ else{
+ MPI_BANNER("Multiple datasets test skipped");
+ }
+
+ if (ngroups){
+ MPI_BANNER("multiple groups write ...");
+ multiple_group_write(filenames[4], ngroups);
+ if (doread) {
+ MPI_BANNER("multiple groups read ...");
+ multiple_group_read(filenames[4], ngroups);
+ }
+ }
+ else{
+ MPI_BANNER("Multiple groups test skipped");
+ }
if (dowrite){
MPI_BANNER("dataset using split communicators...");
@@ -343,7 +366,7 @@ main(int argc, char **argv)
MPI_BANNER("read tests skipped");
}
- if (!(dowrite || doread || ndatasets)){
+ if (!(dowrite || doread || ndatasets || ngroups)){
usage();
nerrors++;
}