summaryrefslogtreecommitdiffstats
path: root/perform/pio_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'perform/pio_engine.c')
-rw-r--r--perform/pio_engine.c60
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);