From 0004209a246008716a00739525bfa39dd119de81 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 5 Jun 2003 16:15:53 -0500 Subject: [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: --- perform/pio_perf.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; } -- cgit v0.12