summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-12-17 18:54:52 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-12-17 18:54:52 (GMT)
commit11705a70ca14fe571056df2f1ac3e739b10df1c0 (patch)
tree2fb24e6a81490e5541031bac5464a0d2a6a24e4e /testpar
parentbb92bb97126ac57c0137e4189f84d68f5e57cd9e (diff)
downloadhdf5-11705a70ca14fe571056df2f1ac3e739b10df1c0.zip
hdf5-11705a70ca14fe571056df2f1ac3e739b10df1c0.tar.gz
hdf5-11705a70ca14fe571056df2f1ac3e739b10df1c0.tar.bz2
[svn-r1899] Chagned to venue to call pause_proc via the profile feature of MPI_Init.
Diffstat (limited to 'testpar')
-rw-r--r--testpar/testphdf5.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index c21a90b..02c66ee 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -35,7 +35,7 @@ int dowrite=1; /* write test */
char *filenames[]={ "ParaEg1.h5f",
"ParaEg2.h5f",
"ParaEg3.h5f",
- "Mdset.h5f" };
+ "ParaMdset.h5f" };
@@ -45,7 +45,8 @@ char *filenames[]={ "ParaEg1.h5f",
/* continue. */
#include <sys/types.h>
#include <sys/stat.h>
-void pause_proc(MPI_Comm comm, int argc, char **argv)
+
+void pause_proc()
{
int pid;
@@ -60,11 +61,6 @@ void pause_proc(MPI_Comm comm, int argc, char **argv)
int mpi_namelen;
char mpi_name[MPI_MAX_PROCESSOR_NAME];
-#ifdef DISABLED
- /* check if an pause interval option is given */
- if (--argc > 0 && isdigit(*++argv))
- time_int = atoi(*argv);
-#endif
pid = getpid();
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
@@ -80,7 +76,16 @@ void pause_proc(MPI_Comm comm, int argc, char **argv)
fflush(stdout);
sleep(time_int);
}
- MPI_Barrier(comm);
+ MPI_Barrier(MPI_COMM_WORLD);
+}
+
+/* Use the Profile feature of MPI to call the pause_proc() */
+int MPI_Init(int *argc, char ***argv)
+{
+ int ret_code;
+ ret_code=PMPI_Init(argc, argv);
+ pause_proc();
+ return (ret_code);
}
#endif /* USE_PAUSE */
@@ -228,10 +233,6 @@ main(int argc, char **argv)
printf("===================================\n");
}
-#ifdef USE_PAUSE
- pause_proc(MPI_COMM_WORLD, argc, argv);
-#endif
-
if (parse_options(argc, argv) != 0){
if (MAINPROCESS)
usage();