summaryrefslogtreecommitdiffstats
path: root/perform/pio_engine.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-05-02 21:19:19 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-05-02 21:19:19 (GMT)
commit0a648bddc71ffea871e5abfa665deddf0891037c (patch)
treee18a495294ed3ef8416202b6100c54eae39fc557 /perform/pio_engine.c
parente8f1f956a2c151186a46e8579cf5b9f09125a382 (diff)
downloadhdf5-0a648bddc71ffea871e5abfa665deddf0891037c.zip
hdf5-0a648bddc71ffea871e5abfa665deddf0891037c.tar.gz
hdf5-0a648bddc71ffea871e5abfa665deddf0891037c.tar.bz2
[svn-r5334] Purpose:
Port Description: Brought forward the changes (timing debug prints) from the 1.4 branch. Platforms tested: Linux
Diffstat (limited to 'perform/pio_engine.c')
-rw-r--r--perform/pio_engine.c53
1 files changed, 52 insertions, 1 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 009e84a..9edf499 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -145,7 +145,7 @@ static void do_cleanupfile(iotype iot, char *fname);
* Modifications:
*/
results
-do_pio(parameters param)
+do_pio(FILE *output, parameters param)
{
/* return codes */
herr_t ret_code = 0; /*return code */
@@ -164,6 +164,10 @@ do_pio(parameters param)
/* HDF5 variables */
herr_t hrc; /*HDF5 return code */
+ int myrank;
+
+ MPI_Comm_rank(pio_comm_g, &myrank);
+
/* Sanity check parameters */
/* IO type */
@@ -252,6 +256,11 @@ buf_size=MIN(1024*1024, buf_size);
GOTOERROR(FAIL);
}
+ if (pio_debug_level >= 4) {
+ /* output all of the times for all iterations */
+ output_report(output, "Timer details:\n");
+ }
+
for (nf = 1; nf <= nfiles; nf++) {
/*
* Write performance measurement
@@ -269,14 +278,30 @@ fprintf(stderr, "filename=%s\n", fname);
set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, START);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Gross Write Start: %.2f\n",
+ myrank, get_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS));
+
hrc = do_fopen(iot, fname, &fd, PIO_CREATE | PIO_WRITE);
VRFY((hrc == SUCCESS), "do_fopen failed");
set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, START);
+
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Fine Write Start: %.2f\n",
+ myrank, get_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS));
+
hrc = do_write(&fd, iot, ndsets, nelmts, buf_size, buffer);
set_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS, STOP);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Fine Write Stop: %.2f\n",
+ myrank, get_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS));
+
VRFY((hrc == SUCCESS), "do_write failed");
/* Close file for write */
@@ -284,6 +309,11 @@ fprintf(stderr, "filename=%s\n", fname);
set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, STOP);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Gross Write Stop: %.2f\n",
+ myrank, get_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS));
+
VRFY((hrc == SUCCESS), "do_fclose failed");
MPI_Barrier(pio_comm_g);
@@ -294,14 +324,30 @@ fprintf(stderr, "filename=%s\n", fname);
/* Open file for read */
set_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS, START);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Gross Read Start: %.2f\n",
+ myrank, get_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS));
+
hrc = do_fopen(iot, fname, &fd, PIO_READ);
VRFY((hrc == SUCCESS), "do_fopen failed");
set_time(res.timers, HDF5_FINE_READ_FIXED_DIMS, START);
+
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Fine Read Start: %.2f\n",
+ myrank, get_time(res.timers, HDF5_FINE_READ_FIXED_DIMS));
+
hrc = do_read(&fd, iot, ndsets, nelmts, buf_size, buffer);
set_time(res.timers, HDF5_FINE_READ_FIXED_DIMS, STOP);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Fine Read Stop: %.2f\n",
+ myrank, get_time(res.timers, HDF5_FINE_READ_FIXED_DIMS));
+
VRFY((hrc == SUCCESS), "do_read failed");
/* Close file for read */
@@ -309,6 +355,11 @@ fprintf(stderr, "filename=%s\n", fname);
set_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS, STOP);
+ if (pio_debug_level >= 4)
+ /* output all of the times for all iterations */
+ fprintf(output, " Proc %d: Gross Read Stop: %.2f\n",
+ myrank, get_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS));
+
VRFY((hrc == SUCCESS), "do_fclose failed");
MPI_Barrier(pio_comm_g);