summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-12-17 23:02:20 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-12-17 23:02:20 (GMT)
commitad04fdd3a713b0ef9018ff556871b83de518b107 (patch)
tree397dd695f5258e47ec1c2c24e46380a0d63018db /perform
parentda751993781079b2700edc74992bc679ca88954a (diff)
downloadhdf5-ad04fdd3a713b0ef9018ff556871b83de518b107.zip
hdf5-ad04fdd3a713b0ef9018ff556871b83de518b107.tar.gz
hdf5-ad04fdd3a713b0ef9018ff556871b83de518b107.tar.bz2
[svn-r4731] Description:
Added nfiles and ndsets parameters checking. Removed iteration variable since iterations would be done in Control routine. Platforms tested: Eirene(pp) and modi4(pp)
Diffstat (limited to 'perform')
-rw-r--r--perform/pio_engine.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index 4a41901..f3530fc 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -161,9 +161,9 @@ do_pio(parameters param)
iotype iot;
char fname[FILENAME_MAX];
- int maxprocs, nfiles, nf;
+ int maxprocs;
+ int nfiles, nf;
long ndsets, nelmts;
- int niters;
int color; /*for communicator creation */
char *buffer = NULL; /*data buffer pointer */
long buf_size; /*data buffer size in bytes */
@@ -176,9 +176,7 @@ do_pio(parameters param)
pio_comm_g = MPI_COMM_NULL;
- /* Sanity check parameters */
-
- /* IO type */
+ /* parameters sanity check */
iot = param.io_type;
switch (iot) {
@@ -204,10 +202,23 @@ do_pio(parameters param)
nfiles = param.num_files; /* number of files */
ndsets = param.num_dsets; /* number of datasets per file */
nelmts = param.num_elmts; /* number of elements per dataset */
- niters = param.num_iters; /* number of iterations of reads/writes */
maxprocs = param.max_num_procs; /* max number of mpi-processes to use */
buf_size = param.buf_size;
+ if (nfiles < 0 ) {
+ fprintf(stderr,
+ "number of files must be >= 0 (%d)\n",
+ nfiles);
+ GOTOERROR(FAIL);
+ }
+
+ if (ndsets < 0 ) {
+ fprintf(stderr,
+ "number of datasets per file must be >= 0 (%ld)\n",
+ ndsets);
+ GOTOERROR(FAIL);
+ }
+
if (nelmts <= 0 ) {
fprintf(stderr,
"number of elements per dataset must be > 0 (%ld)\n",
@@ -242,7 +253,6 @@ do_pio(parameters param)
fprintf(stderr, "nfiles=%d\n", nfiles);
fprintf(stderr, "ndsets=%ld\n", ndsets);
fprintf(stderr, "nelmts=%ld\n", nelmts);
-fprintf(stderr, "niters=%d\n", niters);
fprintf(stderr, "maxprocs=%d\n", maxprocs);
fprintf(stderr, "buffer size=%ld\n", buf_size);
fprintf(stderr, "total data size=%ld\n", ndsets*nelmts*sizeof(int));