summaryrefslogtreecommitdiffstats
path: root/perform/pio_timer.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-05-06 23:58:57 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-05-06 23:58:57 (GMT)
commit74861bfaeb8553113c56deb306522e53f3531539 (patch)
treebbee279f34ad21b6c48f1d7592b18cc66707b005 /perform/pio_timer.c
parenta82e8892c4005d695cfa5220ffcb7eeb6d0baa9e (diff)
downloadhdf5-74861bfaeb8553113c56deb306522e53f3531539.zip
hdf5-74861bfaeb8553113c56deb306522e53f3531539.tar.gz
hdf5-74861bfaeb8553113c56deb306522e53f3531539.tar.bz2
[svn-r5367] Purpose:
Modification Description: Put some of the variables into the global space so that random functions can access them. (The output and timer variables which point to the output file and timer resp.) Placed the debug level 4 prints into the timer module so that it's easier to automatically put timer start/stop printfs for new timers which are created. Added timers for MPI Time calls (called HDF5_MPI_WRITE and HDF5_MPI_READ). Platforms tested: Linux
Diffstat (limited to 'perform/pio_timer.c')
-rw-r--r--perform/pio_timer.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/perform/pio_timer.c b/perform/pio_timer.c
index 2ebdbce..1bf1b0c 100644
--- a/perform/pio_timer.c
+++ b/perform/pio_timer.c
@@ -19,6 +19,8 @@
#include <mpi.h>
+#include "pio_perf.h"
+
/*
* The number to divide the tv_usec field with to get a nice decimal to add to
* the number of seconds.
@@ -124,6 +126,47 @@ set_time(pio_time *pt, timer_type t, int start_stop)
}
}
+ if (pio_debug_level >= 4) {
+ char *msg;
+ int myrank;
+
+ MPI_Comm_rank(pio_comm_g, &myrank);
+
+ switch (t) {
+ case HDF5_FILE_OPENCLOSE:
+ msg = "File Open/Close";
+ break;
+ case HDF5_DATASET_CREATE:
+ msg = "Dataset Create";
+ break;
+ case HDF5_MPI_WRITE:
+ msg = "MPI Write";
+ break;
+ case HDF5_MPI_READ:
+ msg = "MPI Read";
+ break;
+ case HDF5_FINE_WRITE_FIXED_DIMS:
+ msg = "Fine Write";
+ break;
+ case HDF5_FINE_READ_FIXED_DIMS:
+ msg = "Fine Read";
+ break;
+ case HDF5_GROSS_WRITE_FIXED_DIMS:
+ msg = "Gross Write";
+ break;
+ case HDF5_GROSS_READ_FIXED_DIMS:
+ msg = "Gross Read";
+ break;
+ default:
+ msg = "Unknown Timer";
+ break;
+ }
+
+ fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg,
+ (start_stop == START ? "Start" : "Stop"),
+ pt->total_time[t]);
+ }
+
return pt;
}