summaryrefslogtreecommitdiffstats
path: root/perform/pio_timer.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-05-22 23:22:46 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-05-22 23:22:46 (GMT)
commitef5d0e1675cbbdae8904fd1850e7d764dd1ba945 (patch)
treecf7ba661d5d959a4b93531e20e97329d737a3789 /perform/pio_timer.c
parent6f64a5d838fd1958806ac32c9c1315988f695f80 (diff)
downloadhdf5-ef5d0e1675cbbdae8904fd1850e7d764dd1ba945.zip
hdf5-ef5d0e1675cbbdae8904fd1850e7d764dd1ba945.tar.gz
hdf5-ef5d0e1675cbbdae8904fd1850e7d764dd1ba945.tar.bz2
[svn-r5456] Purpose:
Update Description: Updating the source for the PIO performance tests with the current code that's in the V1.4 branch. It includes the newest command-line parameters. Platforms tested: Linux-pp
Diffstat (limited to 'perform/pio_timer.c')
-rw-r--r--perform/pio_timer.c93
1 files changed, 48 insertions, 45 deletions
diff --git a/perform/pio_timer.c b/perform/pio_timer.c
index d053e10..588ea1d 100644
--- a/perform/pio_timer.c
+++ b/perform/pio_timer.c
@@ -41,15 +41,12 @@ pio_time *timer_g; /* timer: global for stub functions */
* Modifications:
*/
pio_time *
-pio_time_new(unsigned int type)
+pio_time_new(clock_type type)
{
pio_time *pt = (pio_time *)calloc(1, sizeof(struct pio_time_));
- register int i;
/* set global timer variable */
timer_g = pt;
- for (i = 0; i < NUM_TIMERS; ++i)
- pt->total_time[i] = 0.0;
pt->type = type;
return pt;
@@ -82,7 +79,7 @@ pio_time_destroy(pio_time *pt)
* Modifications:
*/
void
-set_timer_type(pio_time *pt, timer_type type)
+set_timer_type(pio_time *pt, clock_type type)
{
pt->type = type;
}
@@ -94,7 +91,7 @@ set_timer_type(pio_time *pt, timer_type type)
* Programmer: Bill Wendling, 04. October 2001
* Modifications:
*/
-timer_type
+clock_type
get_timer_type(pio_time *pt)
{
return pt->type;
@@ -131,47 +128,53 @@ set_time(pio_time *pt, timer_type t, int start_stop)
((double)pt->sys_timer[t].tv_usec) / MICROSECOND);
}
}
- }
- 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;
- }
+ 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;
+ case HDF5_RAW_WRITE_FIXED_DIMS:
+ msg = "Raw Write";
+ break;
+ case HDF5_RAW_READ_FIXED_DIMS:
+ msg = "Raw 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]);
+ fprintf(output, " Proc %d: %s %s: %.2f\n", myrank, msg,
+ (start_stop == START ? "Start" : "Stop"),
+ pt->total_time[t]);
+ }
}
return pt;