summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-12-11 20:57:53 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-12-11 20:57:53 (GMT)
commit0421075efcd50f01412f79d0f6ef4d22ea4daf58 (patch)
tree2083f8ca81ffa493eab31761459365545c6e165d /perform/pio_perf.c
parentaec064a280cc591a952d4ce1b06613d28791f32f (diff)
downloadhdf5-0421075efcd50f01412f79d0f6ef4d22ea4daf58.zip
hdf5-0421075efcd50f01412f79d0f6ef4d22ea4daf58.tar.gz
hdf5-0421075efcd50f01412f79d0f6ef4d22ea4daf58.tar.bz2
[svn-r4698]
Purpose: Bug Fix Description: Fixed so that it will display the correct timing data. It will also write to the correct file (which it wasn't before). Solution: Put the code in for displaying the time. Had to change the way I was passing an object to the pio_fopen() function from just being a structure to being a pointer so that the changes could be propagated back. Platforms tested: Linux
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 0a546a4..4fda6a1 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -67,10 +67,14 @@
/* useful macros */
#define TAB_SPACE 4
-#define ONE_GB 1073741824UL
+#define ONE_KB 1024
+#define ONE_MB (ONE_KB * ONE_KB)
+#define ONE_GB (ONE_MB * ONE_KB)
-#define MIN_HDF5_BUF_SIZE (1024 * 1024 * 8)
-#define MAX_HDF5_BUF_SIZE (MIN_HDF5_BUF_SIZE * 4)
+#define MB_PER_SEC(bytes,t) (((bytes) / ONE_MB) / t)
+
+#define MIN_HDF5_BUF_SIZE (ONE_MB >> 1)
+#define MAX_HDF5_BUF_SIZE (ONE_GB / 2)
/* local variables */
static const char *progname = "pio_perf";
@@ -241,13 +245,9 @@ run_test_loop(FILE *output, int max_num_procs, long max_size)
print_indent(output, TAB_SPACE * 3);
fprintf(output, "Write Results = %f MB/s\n",
- /* WRONG */
- (parms.num_dsets * parms.num_elmts * sizeof(int)) /
- get_time(res.timers, HDF5_WRITE_FIXED_DIMS));
+ MB_PER_SEC(parms.num_dsets * parms.num_elmts * sizeof(int),
+ get_time(res.timers, HDF5_WRITE_FIXED_DIMS)));
- /* get back ``result'' object and report */
- /* (res.ret_code == SUCCESS); */
- /* (res.timers); */
pio_time_destroy(res.timers);
}
}
@@ -325,8 +325,9 @@ parse_command_line(int argc, char *argv[])
exit(EXIT_SUCCESS);
case '?':
default:
- usage(progname);
- exit(EXIT_FAILURE);
+ /* there could be other command line options, such as MPI stuff
+ * that gets passed to our program, for some reason */
+ break;
}
}