summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2002-05-02 20:47:02 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2002-05-02 20:47:02 (GMT)
commit344165d711f43310ff399102d8d3574c1b4a524f (patch)
treeec319a7af7df33e3e7fd18b9450116609eb48895 /perform
parent7a8e61525f4058b9815aa92bc008dd6301fe6bb6 (diff)
downloadhdf5-344165d711f43310ff399102d8d3574c1b4a524f.zip
hdf5-344165d711f43310ff399102d8d3574c1b4a524f.tar.gz
hdf5-344165d711f43310ff399102d8d3574c1b4a524f.tar.bz2
[svn-r5331] Purpose:
Update Description: Added some higher level debugging statements. If you set the "-D" option to "4", then you'll get to see how the timer behaves.
Diffstat (limited to 'perform')
-rw-r--r--perform/pio_engine.c66
-rw-r--r--perform/pio_perf.c6
-rw-r--r--perform/pio_perf.h6
3 files changed, 73 insertions, 5 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 009e84a..e0d19ac 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 */
@@ -267,16 +267,44 @@ buf_size=MIN(1024*1024, buf_size);
fprintf(stderr, "filename=%s\n", fname);
#endif
+ if (pio_debug_level == 4) {
+ /* output all of the times for all iterations */
+ print_indent(output, 3);
+ output_report(output, "Timer details:\n");
+ }
+
set_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS, START);
+ if (pio_debug_level == 4) {
+ /* output all of the times for all iterations */
+ print_indent(output, 4);
+ output_report(output, "Gross Write Start: %.2f\n",
+ 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 */
+ print_indent(output, 4);
+ output_report(output, "Fine Write Start: %.2f\n",
+ 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 */
+ print_indent(output, 4);
+ output_report(output, "Fine Write Stop: %.2f\n",
+ get_time(res.timers, HDF5_FINE_WRITE_FIXED_DIMS));
+ }
+
VRFY((hrc == SUCCESS), "do_write failed");
/* Close file for write */
@@ -284,6 +312,13 @@ 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 */
+ print_indent(output, 4);
+ output_report(output, "Gross Write Stop: %.2f\n",
+ get_time(res.timers, HDF5_GROSS_WRITE_FIXED_DIMS));
+ }
+
VRFY((hrc == SUCCESS), "do_fclose failed");
MPI_Barrier(pio_comm_g);
@@ -294,14 +329,36 @@ 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 */
+ print_indent(output, 4);
+ output_report(output, "Gross Read Start: %.2f\n",
+ 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 */
+ print_indent(output, 4);
+ output_report(output, "Fine Read Start: %.2f\n",
+ 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 */
+ print_indent(output, 4);
+ output_report(output, "Fine Read Stop: %.2f\n",
+ get_time(res.timers, HDF5_FINE_READ_FIXED_DIMS));
+ }
+
VRFY((hrc == SUCCESS), "do_read failed");
/* Close file for read */
@@ -309,6 +366,13 @@ 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 */
+ print_indent(output, 4);
+ output_report(output, "Gross Read Stop: %.2f\n",
+ get_time(res.timers, HDF5_GROSS_READ_FIXED_DIMS));
+ }
+
VRFY((hrc == SUCCESS), "do_fclose failed");
MPI_Barrier(pio_comm_g);
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 622f911..8cee29f 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -229,7 +229,6 @@ static void get_minmax(minmax *mm, double val);
static minmax accumulate_minmax_stuff(minmax *mm, long raw_size, int count);
static int create_comm_world(int num_procs, int *doing_pio);
static int destroy_comm_world(void);
-static void output_report(FILE *output, const char *fmt, ...);
static void print_indent(register FILE *output, register int indent);
static void usage(const char *prog);
@@ -755,7 +754,7 @@ destroy_comm_world(void)
* Programmer: Bill Wendling, 19. December 2001
* Modifications:
*/
-static void
+void
output_report(FILE *output, const char *fmt, ...)
{
int myrank;
@@ -779,7 +778,7 @@ output_report(FILE *output, const char *fmt, ...)
* Programmer: Bill Wendling, 29. October 2001
* Modifications:
*/
-static void
+void
print_indent(register FILE *output, register int indent)
{
int myrank;
@@ -985,6 +984,7 @@ usage(const char *prog)
fprintf(stdout, " 1 - Minimal\n");
fprintf(stdout, " 2 - Not quite everything\n");
fprintf(stdout, " 3 - Everything\n");
+ fprintf(stdout, " 4 - Everything and the kitchen sink\n");
fprintf(stdout, "\n");
fflush(stdout);
}
diff --git a/perform/pio_perf.h b/perform/pio_perf.h
index 08306a6..9d51f01 100644
--- a/perform/pio_perf.h
+++ b/perform/pio_perf.h
@@ -55,7 +55,11 @@ extern int pio_debug_level; /* The debug level:
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-extern results do_pio(parameters param);
+
+extern results do_pio(FILE * output, parameters param);
+extern void output_report(FILE *output, const char *fmt, ...);
+extern void print_indent(register FILE *output, register int indent);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */