summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-12-10 22:45:46 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-12-10 22:45:46 (GMT)
commit43c1f21316556ae6ac898061a49194270d7e9d8b (patch)
treec5b5036cc20639bcfc14675a47c5ec312cb694ca /perform
parentb78d34a1475d846959d0335d7b52ae724617be86 (diff)
downloadhdf5-43c1f21316556ae6ac898061a49194270d7e9d8b.zip
hdf5-43c1f21316556ae6ac898061a49194270d7e9d8b.tar.gz
hdf5-43c1f21316556ae6ac898061a49194270d7e9d8b.tar.bz2
[svn-r4691]
Purpose: Small Fixes Description: After conversation with Albert, here are some small fixes for the performance stuff. Not too significant. Though, we did add the "buffer size" as a parameter I pass to the engine.
Diffstat (limited to 'perform')
-rw-r--r--perform/pio_engine.c18
-rw-r--r--perform/pio_perf.c11
-rw-r--r--perform/pio_perf.h1
3 files changed, 13 insertions, 17 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 575ae08..57db58a 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -196,7 +196,7 @@ do_pio(parameters param)
if (maxprocs <= 0 ) {
fprintf(stderr,
- "maximun number of process to use must be > 0 (%u)\n",
+ "maximum number of process to use must be > 0 (%u)\n",
maxprocs);
GOTOERROR(FAIL);
}
@@ -205,14 +205,14 @@ do_pio(parameters param)
if (maxprocs > nprocs) {
fprintf(stderr,
- "maximun number of process(%d) must be <= process in MPI_COMM_WORLD(%d)\n",
+ "maximum number of process(%d) must be <= process in MPI_COMM_WORLD(%d)\n",
maxprocs, nprocs);
GOTOERROR(FAIL);
}
/* Create a sub communicator for this run. Easier to use the first N
* processes. */
- MPI_Comm_rank(comm, &myrank);
+ MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
color = (myrank < maxprocs);
mrc = MPI_Comm_split(MPI_COMM_WORLD, color, myrank, &comm);
@@ -259,29 +259,28 @@ do_pio(parameters param)
sprintf(base_name, "#pio_tmp_%u", nf);
pio_create_filename(iot, base_name, fname, sizeof(fname));
-
set_time(res.timers, HDF5_FILE_OPENCLOSE, START);
rc = do_fopen(iot, fname, fd, PIO_CREATE | PIO_WRITE, comm);
set_time(res.timers, HDF5_FILE_OPENCLOSE, STOP);
- VRFY((rc == SUCCESS), "do_fopen failed\n");
+ VRFY((rc == SUCCESS), "do_fopen failed");
set_time(res.timers, HDF5_WRITE_FIXED_DIMS, START);
rc = do_write(fd, iot, ndsets, nelmts, h5dset_space_id, buffer);
set_time(res.timers, HDF5_WRITE_FIXED_DIMS, STOP);
- VRFY((rc == SUCCESS), "do_write failed\n");
+ VRFY((rc == SUCCESS), "do_write failed");
/* Close file for write */
set_time(res.timers, HDF5_FILE_OPENCLOSE, START);
rc = do_fclose(iot, fd);
set_time(res.timers, HDF5_FILE_OPENCLOSE, STOP);
- VRFY((rc == SUCCESS), "do_fclose failed\n");
+ VRFY((rc == SUCCESS), "do_fclose failed");
/* Open file for read */
hrc = do_fopen(iot, fname, fd, PIO_READ, comm);
- VRFY((rc == SUCCESS), "do_fopen failed\n");
+ VRFY((rc == SUCCESS), "do_fopen failed");
/* Calculate dataset offset within a file */
@@ -299,7 +298,7 @@ do_pio(parameters param)
/* Close file for read */
rc = do_fclose(iot, fd);
- VRFY((rc == SUCCESS), "do_fclose failed\n");
+ VRFY((rc == SUCCESS), "do_fclose failed");
remove(fname);
}
@@ -531,7 +530,6 @@ do_write(file_descr fd, iotype iot, long ndsets,
}
nelmts_written += nelmts_towrite;
-fprintf(stderr, "wrote %lu elmts, %lu written\n", nelmts_towrite, nelmts_written);
}
/* Calculate write time */
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index 059845b..0a546a4 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -69,13 +69,8 @@
#define ONE_GB 1073741824UL
-#if 0
-#define MIN_HDF5_BUF_SIZE 1024
-#define MAX_HDF5_BUF_SIZE (ONE_GB / 2)
-#else
-#define MIN_HDF5_BUF_SIZE 1024*1024*8
-#define MAX_HDF5_BUF_SIZE MIN_HDF5_BUF_SIZE*4
-#endif
+#define MIN_HDF5_BUF_SIZE (1024 * 1024 * 8)
+#define MAX_HDF5_BUF_SIZE (MIN_HDF5_BUF_SIZE * 4)
/* local variables */
static const char *progname = "pio_perf";
@@ -232,6 +227,7 @@ run_test_loop(FILE *output, int max_num_procs, long max_size)
for (j = MIN_HDF5_BUF_SIZE; j <= MAX_HDF5_BUF_SIZE; j <<= 1) {
results res;
+ parms.buf_size = j;
parms.num_dsets = ONE_GB / j;
parms.num_elmts = (max_size * j) / sizeof(int);
@@ -245,6 +241,7 @@ 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));
diff --git a/perform/pio_perf.h b/perform/pio_perf.h
index 849df75..5ce80de 100644
--- a/perform/pio_perf.h
+++ b/perform/pio_perf.h
@@ -23,6 +23,7 @@ typedef struct parameters_ {
unsigned long num_dsets; /* Number of datasets to create */
unsigned long num_elmts; /* Number of native ints in each dset */
unsigned int num_iters; /* Number of times to loop doing the IO */
+ unsigned long buf_size; /* Buffer size */
} parameters;
typedef struct results_ {