summaryrefslogtreecommitdiffstats
path: root/tools/test/perform/perf.c
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-23 21:12:00 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-23 21:12:00 (GMT)
commit838d4ec56bfc82266a2110635e14d36e075075cc (patch)
tree0da94266f7a4f65b4f2f9045c2913dce9ec89863 /tools/test/perform/perf.c
parenta9aaad9be317ed92150ccc6b4e8574e596447dba (diff)
downloadhdf5-838d4ec56bfc82266a2110635e14d36e075075cc.zip
hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.gz
hdf5-838d4ec56bfc82266a2110635e14d36e075075cc.tar.bz2
squash cast warning fix
Diffstat (limited to 'tools/test/perform/perf.c')
-rw-r--r--tools/test/perform/perf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 8926d14..3f56d8b 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -158,7 +158,7 @@ int main(int argc, char **argv)
iter_jump = nprocs * opt_block;
/* setup a buffer of data to write */
- if (!(tmp = (char *) malloc(opt_block + 256))) {
+ if (!(tmp = (char *) malloc((size_t)opt_block + 256))) {
perror("malloc");
goto die_jar_jar_die;
}
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
if (opt_correct) {
/* do the same buffer setup for verifiable data */
- if (!(tmp2 = (char *) malloc(opt_block + 256))) {
+ if (!(tmp2 = (char *) malloc((size_t)opt_block + 256))) {
perror("malloc2");
goto die_jar_jar_die;
}
@@ -216,7 +216,7 @@ int main(int argc, char **argv)
VRFY((fid >= 0), "H5Fcreate succeeded", H5FATAL);
/* define a contiquous dataset of opt_iter*nprocs*opt_block chars */
- dims[0] = opt_iter * nprocs * opt_block;
+ dims[0] = (hsize_t)opt_iter * (hsize_t)nprocs * (hsize_t)opt_block;
sid = H5Screate_simple(RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded", H5FATAL);
dataset = H5Dcreate2(fid, "Dataset1", H5T_NATIVE_CHAR, sid,
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
VRFY((dataset >= 0), "H5Dcreate2 succeeded", H5FATAL);
/* create the memory dataspace and the file dataspace */
- dims[0] = opt_block;
+ dims[0] = (hsize_t)opt_block;
mem_dataspace = H5Screate_simple(RANK, dims, NULL);
VRFY((mem_dataspace >= 0), "", H5FATAL);
file_dataspace = H5Dget_space(dataset);
@@ -236,7 +236,7 @@ int main(int argc, char **argv)
for(j=0; j < opt_iter; j++) {
/* setup a file dataspace selection */
start[0] = (hsize_t)((j * iter_jump) + (mynod * opt_block));
- stride[0] = block[0] = opt_block;
+ stride[0] = block[0] = (hsize_t)opt_block;
count[0]= 1;
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded", H5FATAL);
@@ -289,7 +289,7 @@ int main(int argc, char **argv)
for (j=0; j < opt_iter; j++) {
/* setup a file dataspace selection */
start[0] = (hsize_t)((j * iter_jump) + (mynod * opt_block));
- stride[0] = block[0] = opt_block;
+ stride[0] = block[0] = (hsize_t)opt_block;
count[0]= 1;
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded", H5FATAL);
@@ -320,7 +320,7 @@ int main(int argc, char **argv)
/* if the user wanted to check correctness, compare the write
* buffer to the read buffer */
- if (opt_correct && memcmp(buf, buf2, opt_block)) {
+ if (opt_correct && memcmp(buf, buf2, (size_t)opt_block)) {
HDfprintf(stderr, "node %d, correctness test failed\n", mynod);
my_correct = 0;
MPI_Allreduce(&my_correct, &correct, 1, MPI_INT, MPI_MIN,
@@ -361,8 +361,8 @@ int main(int argc, char **argv)
/* print out the results on one node */
if (mynod == 0) {
- read_bw = ((int64_t)(opt_block*nprocs*opt_iter))/(max_read_tim*1000000.0);
- write_bw = ((int64_t)(opt_block*nprocs*opt_iter))/(max_write_tim*1000000.0);
+ read_bw = (double)((int64_t)(opt_block*nprocs*opt_iter))/(max_read_tim*1000000.0);
+ write_bw = (double)((int64_t)(opt_block*nprocs*opt_iter))/(max_write_tim*1000000.0);
printf("nr_procs = %d, nr_iter = %d, blk_sz = %ld\n", nprocs,
opt_iter, (long)opt_block);
@@ -433,9 +433,9 @@ parse_args(int argc, char **argv)
{
char *p;
- opt_alignment = HDatoi(optarg);
+ opt_alignment = (hsize_t)HDatoi(optarg);
if(NULL != (p = (char*)HDstrchr(optarg, '/')))
- opt_threshold = HDatoi(p + 1);
+ opt_threshold = (hsize_t)HDatoi(p + 1);
}
HDfprintf(stdout,
"alignment/threshold=%Hu/%Hu\n",