From 4d9155bade83c0a8b24e710e992a27d3c5915c0c Mon Sep 17 00:00:00 2001 From: kmu Date: Tue, 28 Jan 2020 13:08:18 -0600 Subject: fix issues from test fail --- testpar/t_dset.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 05baf3f..13f9e89 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -80,7 +80,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], stride[1] = block[1]; count[0] = 1; count[1] = 1; - start[0] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[0] : 0); + start[0] = (mpi_rank ? (hsize_t)mpi_rank * block[0] : 0); start[1] = 0; if (VERBOSE_MED) HDprintf("slab_set ZROW\n"); @@ -90,11 +90,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], block[0] = (hsize_t)dim0; block[1] = (hsize_t)(mpi_rank ? dim1 / mpi_size : 0); stride[0] = block[0]; - stride[1] = (mpi_rank ? block[1] : 1); /* avoid setting stride to 0 */ + stride[1] = (hsize_t)(mpi_rank ? block[1] : 1); /* avoid setting stride to 0 */ count[0] = 1; count[1] = 1; start[0] = 0; - start[1] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[1] : 0); + start[1] = (mpi_rank ? (hsize_t)mpi_rank * block[1] : 0); if (VERBOSE_MED) HDprintf("slab_set ZCOL\n"); break; @@ -1115,7 +1115,7 @@ dataset_readAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); + coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ @@ -1416,7 +1416,7 @@ dataset_readAll(void) ret = H5Sselect_all(file_dataspace); VRFY((ret >= 0), "H5Sselect_all succeeded"); - H5_CHECKED_ASSIGN(num_points, size_t, dim0 * dim1, int); + num_points = (size_t)(dim0 * dim1); k=0; for (i=0 ; i= (hsize_t)mpi_rank*(block[0]+1)) { + if (i >= mpi_rank*((int)block[0]+1)) { break; } - if (((hsize_t)i+1)%(block[0]+1)==0) { + if ((i+1)%((int)block[0]+1)==0) { k += dim1; continue; } for (j=0 ; j= (hsize_t)mpi_rank*(block[1]+1)) { - H5_CHECKED_ASSIGN(k, int, (hsize_t)dim1 - (hsize_t)mpi_rank*(block[1]+1), hsize_t); + if (j >= mpi_rank*((int)block[1]+1)) { + k += dim1 - mpi_rank*((int)block[1]+1); break; } - if (((hsize_t)j+1)%(block[1]+1)==0) { + if ((j+1)%((int)block[1]+1)==0) { k++; continue; } -- cgit v0.12