summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2001-07-05 21:08:15 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2001-07-05 21:08:15 (GMT)
commit177d2c795fdf9d9f348172ec6ccdb83d438d3add (patch)
treec65255255979a6b76234012fad61420725ffc4cb /testpar
parentdc78e246094b94783c0e24389fd94a801879916d (diff)
downloadhdf5-177d2c795fdf9d9f348172ec6ccdb83d438d3add.zip
hdf5-177d2c795fdf9d9f348172ec6ccdb83d438d3add.tar.gz
hdf5-177d2c795fdf9d9f348172ec6ccdb83d438d3add.tar.bz2
[svn-r4120]
Purpose: Added parallel group testing. Description: See t_mdset.c description. Platforms tested: See t_mdset.c tested platforms.
Diffstat (limited to 'testpar')
-rw-r--r--testpar/testphdf5.c55
1 files changed, 38 insertions, 17 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index d6cf99f..bade9a1 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -6,9 +6,9 @@
#include "testphdf5.h"
-#ifndef FILENAME_MAX
-#define FILENAME_MAX 512
-#endif
+#ifndef PATH_MAX
+#define PATH_MAX 512
+#endif /* !PATH_MAX */
/* global variables */
int dim0 = DIM0;
@@ -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,17 +28,16 @@ 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][FILENAME_MAX];
+char filenames[6][PATH_MAX];
hid_t fapl; /* file access property list */
-
-
#ifdef USE_PAUSE
/* pause the process for a moment to allow debugger to attach if desired. */
/* Will pause more if greenlight file is not persent but will eventually */
@@ -154,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");
@@ -200,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) {
@@ -306,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...");
@@ -345,7 +366,7 @@ main(int argc, char **argv)
MPI_BANNER("read tests skipped");
}
- if (!(dowrite || doread || ndatasets)){
+ if (!(dowrite || doread || ndatasets || ngroups)){
usage();
nerrors++;
}