summaryrefslogtreecommitdiffstats
path: root/perform/pio_engine.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-05-07 15:22:31 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-05-07 15:22:31 (GMT)
commit3984d62ca3f7043f428bf0b8e25695ef09482aa7 (patch)
treec6573063a33e98b50f7a0df21fded28df3f1bf94 /perform/pio_engine.c
parent74861bfaeb8553113c56deb306522e53f3531539 (diff)
downloadhdf5-3984d62ca3f7043f428bf0b8e25695ef09482aa7.zip
hdf5-3984d62ca3f7043f428bf0b8e25695ef09482aa7.tar.gz
hdf5-3984d62ca3f7043f428bf0b8e25695ef09482aa7.tar.bz2
[svn-r5368] Purpose:
Bug fix, feature Description: Added code to time pure MPI_File_write_xxx and read_xxx routines. Moved the setting of the timer_g to when timer is created (new) and destroyed. Platforms tested: modi4pp
Diffstat (limited to 'perform/pio_engine.c')
-rw-r--r--perform/pio_engine.c55
1 files changed, 53 insertions, 2 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 0c5a9f3..acc62ad 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -228,8 +228,8 @@ do_pio(parameters param)
GOTOERROR(FAIL);
}
-#if AKCDEBUG
-/* DEBUG*/
+#if akcdebug
+/* debug*/
fprintf(stderr, "nfiles=%d\n", nfiles);
fprintf(stderr, "ndsets=%ld\n", ndsets);
fprintf(stderr, "nelmts=%ld\n", nelmts);
@@ -1105,4 +1105,55 @@ do_cleanupfile(iotype iot, char *fname)
}
}
}
+
+
+#ifndef TIME_MPI
+#define TIME_MPI
+#endif
+#ifdef TIME_MPI
+/* instrument the MPI_File_wrirte_xxx and read_xxx calls to measure
+ * pure time spent in MPI_File code.
+ */
+int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf,
+ int count, MPI_Datatype datatype, MPI_Status *status)
+{
+ int err;
+ set_time(timer_g, HDF5_MPI_READ, START);
+ err=PMPI_File_read_at(fh, offset, buf, count, datatype, status);
+ set_time(timer_g, HDF5_MPI_READ, STOP);
+ return err;
+}
+
+
+int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf,
+ int count, MPI_Datatype datatype, MPI_Status *status)
+{
+ int err;
+ set_time(timer_g, HDF5_MPI_READ, START);
+ err=PMPI_File_read_at_all(fh, offset, buf, count, datatype, status);
+ set_time(timer_g, HDF5_MPI_READ, STOP);
+ return err;
+}
+
+int MPI_File_write_at(MPI_File fh, MPI_Offset offset, void *buf,
+ int count, MPI_Datatype datatype, MPI_Status *status)
+{
+ int err;
+ set_time(timer_g, HDF5_MPI_WRITE, START);
+ err=PMPI_File_write_at(fh, offset, buf, count, datatype, status);
+ set_time(timer_g, HDF5_MPI_WRITE, STOP);
+ return err;
+}
+
+int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, void *buf,
+ int count, MPI_Datatype datatype, MPI_Status *status)
+{
+ int err;
+ set_time(timer_g, HDF5_MPI_WRITE, START);
+ err=PMPI_File_write_at_all(fh, offset, buf, count, datatype, status);
+ set_time(timer_g, HDF5_MPI_WRITE, STOP);
+ return err;
+}
+
+#endif /* TIME_MPI */
#endif /* H5_HAVE_PARALLEL */