diff options
Diffstat (limited to 'testpar/t_chunk_alloc.c')
-rw-r--r-- | testpar/t_chunk_alloc.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index b2ddc23..bc233c7 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -37,7 +37,7 @@ get_filesize(const char *filename) MPI_File fd; MPI_Offset filesize; - mpierr = MPI_File_open(MPI_COMM_SELF, (char*)filename, MPI_MODE_RDONLY, + mpierr = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fd); VRFY((mpierr == MPI_SUCCESS), ""); @@ -275,8 +275,9 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti /* only opens the *dataset */ case open_only: - break; + default: + HDassert(0); } /* Close up */ @@ -319,7 +320,8 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti * interleaved pattern. */ static void -verify_data(const char *filename, int chunk_factor, write_type write_pattern, int close, hid_t *file_id, hid_t *dataset) +verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose, + hid_t *file_id, hid_t *dataset) { /* HDF5 gubbins */ hid_t dataspace, memspace; /* HDF5 file identifier */ @@ -334,7 +336,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in /* Variables used in reading data back */ char buffer[CHUNK_SIZE]; int value, i; - int index; + int index_l; long nchunks; /* Initialize MPI */ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); @@ -397,11 +399,14 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in value = 100; else value = 0; + break; + default: + HDassert(0); } /* verify content of the chunk */ - for (index = 0; index < CHUNK_SIZE; index++) - VRFY((buffer[index] == value), "data verification"); + for (index_l = 0; index_l < CHUNK_SIZE; index_l++) + VRFY((buffer[index_l] == value), "data verification"); } hrc = H5Sclose (dataspace); @@ -415,7 +420,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in VRFY((hrc >= 0), ""); /* Close up */ - if (close){ + if (vclose){ hrc = H5Dclose(*dataset); VRFY((hrc >= 0), ""); *dataset = -1; @@ -464,7 +469,7 @@ test_chunk_alloc(void) MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - filename = GetTestParameters(); + filename = (const char*)GetTestParameters(); if (VERBOSE_MED) printf("Extend Chunked allocation test on file %s\n", filename); |