summaryrefslogtreecommitdiffstats
path: root/tools/test/perform/pio_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/perform/pio_engine.c')
-rw-r--r--tools/test/perform/pio_engine.c133
1 files changed, 81 insertions, 52 deletions
diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c
index 8bc522f..3863550 100644
--- a/tools/test/perform/pio_engine.c
+++ b/tools/test/perform/pio_engine.c
@@ -362,15 +362,17 @@ done:
switch (iot) {
case POSIXIO:
if (fd.posixfd != -1)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
break;
case MPIO:
if (fd.mpifd != MPI_FILE_NULL)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
break;
case PHDF5:
if (fd.h5fd != -1)
- hrc = do_fclose(iot, &fd);
+ hrc = do_fclose(iot, &fd);
+ break;
+ default:
break;
}
@@ -413,6 +415,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
case PHDF5:
suffix = ".h5";
break;
+ default:
+ break;
}
/* First use the environment variable and then try the constant */
@@ -857,6 +861,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end if */
} /* end if */
break;
+
+ default:
+ break;
} /* end switch */
for (ndset = 1; ndset <= ndsets; ++ndset) {
@@ -920,6 +927,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
GOTOERROR(FAIL);
}
break;
+
+ default:
+ break;
}
/* The task is to transfer bytes_count bytes, starting at
@@ -1376,6 +1386,9 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end else */
break;
+
+ default:
+ break;
} /* switch (parms->io_type) */
} /* end while */
@@ -1815,19 +1828,22 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
- GOTOERROR(FAIL);
+ HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ GOTOERROR(FAIL);
}
/* Change to collective I/O, if asked */
if(parms->collective) {
- hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
- if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
- GOTOERROR(FAIL);
- } /* end if */
+ hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
+ if (hrc < 0) {
+ HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ GOTOERROR(FAIL);
+ } /* end if */
} /* end if */
break;
+
+ default:
+ break;
} /* end switch */
for (ndset = 1; ndset <= ndsets; ++ndset) {
@@ -1838,19 +1854,21 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
switch (parms->io_type) {
case POSIXIO:
case MPIO:
- /* both posix and mpi io just need dataset offset in file*/
- dset_offset = (ndset - 1) * nbytes;
- break;
+ /* both posix and mpi io just need dataset offset in file*/
+ dset_offset = (ndset - 1) * nbytes;
+ break;
case PHDF5:
HDsprintf(dname, "Dataset_%ld", ndset);
- h5ds_id = H5DOPEN(fd->h5fd, dname);
- if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
- GOTOERROR(FAIL);
- }
+ h5ds_id = H5DOPEN(fd->h5fd, dname);
+ if (h5ds_id < 0) {
+ HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ GOTOERROR(FAIL);
+ }
+ break;
- break;
+ default:
+ break;
}
/* The task is to transfer bytes_count bytes, starting at
@@ -2303,6 +2321,9 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets,
} /* end else */
break;
+
+ default:
+ break;
} /* switch (parms->io_type) */
/* Verify raw data, if asked */
@@ -2532,6 +2553,9 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
}
break;
+
+ default:
+ break;
}
done:
@@ -2552,38 +2576,41 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
int mrc = 0, rc = 0;
switch (iot) {
- case POSIXIO:
- rc = POSIXCLOSE(fd->posixfd);
+ case POSIXIO:
+ rc = POSIXCLOSE(fd->posixfd);
- if (rc != 0){
- HDfprintf(stderr, "POSIX File Close failed\n");
- GOTOERROR(FAIL);
- }
+ if (rc != 0){
+ HDfprintf(stderr, "POSIX File Close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->posixfd = -1;
- break;
+ fd->posixfd = -1;
+ break;
- case MPIO:
- mrc = MPI_File_close(&fd->mpifd);
+ case MPIO:
+ mrc = MPI_File_close(&fd->mpifd);
- if (mrc != MPI_SUCCESS){
- HDfprintf(stderr, "MPI File close failed\n");
- GOTOERROR(FAIL);
- }
+ if (mrc != MPI_SUCCESS){
+ HDfprintf(stderr, "MPI File close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->mpifd = MPI_FILE_NULL;
- break;
+ fd->mpifd = MPI_FILE_NULL;
+ break;
- case PHDF5:
- hrc = H5Fclose(fd->h5fd);
+ case PHDF5:
+ hrc = H5Fclose(fd->h5fd);
- if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
- GOTOERROR(FAIL);
- }
+ if (hrc < 0) {
+ HDfprintf(stderr, "HDF5 File Close failed\n");
+ GOTOERROR(FAIL);
+ }
- fd->h5fd = -1;
- break;
+ fd->h5fd = -1;
+ break;
+
+ default:
+ break;
}
done:
@@ -2610,15 +2637,17 @@ do_cleanupfile(iotype iot, char *fname)
clean_file_g = (getenv("HDF5_NOCLEANUP")==NULL) ? 1 : 0;
if (clean_file_g){
- switch (iot){
- case POSIXIO:
- HDremove(fname);
- break;
- case MPIO:
- case PHDF5:
- MPI_File_delete(fname, h5_io_info_g);
- break;
- }
+ switch (iot){
+ case POSIXIO:
+ HDremove(fname);
+ break;
+ case MPIO:
+ case PHDF5:
+ MPI_File_delete(fname, h5_io_info_g);
+ break;
+ default:
+ break;
+ }
}
}