summaryrefslogtreecommitdiffstats
path: root/perform/pio_perf.c
diff options
context:
space:
mode:
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;
}