summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2003-06-05 21:15:53 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2003-06-05 21:15:53 (GMT)
commit0004209a246008716a00739525bfa39dd119de81 (patch)
tree6406f7b6a5876a28b4e73cec2407b0a57039dd0b /perform/pio_perf.c
parentc134146b3ee754526e9b976de799226b6469de47 (diff)
downloadhdf5-0004209a246008716a00739525bfa39dd119de81.zip
hdf5-0004209a246008716a00739525bfa39dd119de81.tar.gz
hdf5-0004209a246008716a00739525bfa39dd119de81.tar.bz2
[svn-r6978] Purpose:
Bug fix. Description: The default setting of max transfer size is larger than the default setting of number of bytes per process, result in complaints that Transfer size is too big. Solution: Cap the min and max transfer size with number of bytes per process. Always cap min transfer size with the max xfer size. Platforms tested: Copper. Misc. update:
Diffstat (limited to 'perform/pio_perf.c')
-rw-r--r--perform/pio_perf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/perform/pio_perf.c b/perform/pio_perf.c
index a36cce5..f3eef36 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -1296,6 +1296,15 @@ parse_command_line(int argc, char *argv[])
if (!cl_opts->io_types)
cl_opts->io_types = PIO_HDF5 | PIO_MPI | PIO_POSIX; /* run all API */
+ /* verify parameters sanity. Adjust if needed. */
+ /* cap xfer_size with bytes per process */
+ if (cl_opts->min_xfer_size > cl_opts->num_bpp)
+ cl_opts->min_xfer_size = cl_opts->num_bpp;
+ if (cl_opts->max_xfer_size > cl_opts->num_bpp)
+ cl_opts->max_xfer_size = cl_opts->num_bpp;
+ if (cl_opts->min_xfer_size > cl_opts->max_xfer_size)
+ cl_opts->min_xfer_size = cl_opts->max_xfer_size;
+
return cl_opts;
}