diff options
author | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-05-06 23:58:57 (GMT) |
---|---|---|
committer | Bill Wendling <wendling@ncsa.uiuc.edu> | 2002-05-06 23:58:57 (GMT) |
commit | 74861bfaeb8553113c56deb306522e53f3531539 (patch) | |
tree | bbee279f34ad21b6c48f1d7592b18cc66707b005 /perform/pio_engine.c | |
parent | a82e8892c4005d695cfa5220ffcb7eeb6d0baa9e (diff) | |
download | hdf5-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_engine.c')
-rw-r--r-- | perform/pio_engine.c | 60 |
1 files changed, 7 insertions, 53 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 79f035a..0c5a9f3 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(FILE *output, parameters param) +do_pio(parameters param) { /* return codes */ herr_t ret_code = 0; /*return code */ @@ -164,10 +164,6 @@ do_pio(FILE *output, parameters param) /* HDF5 variables */ herr_t hrc; /*HDF5 return code */ - int myrank; - - MPI_Comm_rank(pio_comm_g, &myrank); - /* Sanity check parameters */ /* IO type */ @@ -256,10 +252,15 @@ buf_size=MIN(1024*1024, buf_size); GOTOERROR(FAIL); } - if (pio_debug_level >= 4) + if (pio_debug_level >= 4) { + int myrank; + + MPI_Comm_rank(pio_comm_g, &myrank); + /* output all of the times for all iterations */ if (myrank == 0) fprintf(output, "Timer details:\n"); + } for (nf = 1; nf <= nfiles; nf++) { /* @@ -277,43 +278,20 @@ fprintf(stderr, "filename=%s\n", fname); #endif 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 */ hrc = do_fclose(iot, &fd); 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); @@ -323,43 +301,19 @@ 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 */ hrc = do_fclose(iot, &fd); 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); |