summaryrefslogtreecommitdiffstats
path: root/testpar/t_mpi.c
diff options
context:
space:
mode:
authorKimmy Mu <kmu@hdfgroup.org>2020-01-23 22:21:06 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-28 02:47:06 (GMT)
commitfe75e8f66f79c16d083d80ccdca303f267e96745 (patch)
tree345d20f70d273b8512aa6cf309a72d7c7b441ab4 /testpar/t_mpi.c
parentb87a4362a12428613c2b8bd3ba2aa33828b4d5af (diff)
downloadhdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.zip
hdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.tar.gz
hdf5-fe75e8f66f79c16d083d80ccdca303f267e96745.tar.bz2
Merge pull request #2300 in HDFFV/hdf5 from ~KMU/hdf5:squashed_cast to develop
* commit 'af5c33afabdae2e39bb45eb1b3e9c8366da01145': remove unnecessary stuff squash cast warning fix
Diffstat (limited to 'testpar/t_mpi.c')
-rw-r--r--testpar/t_mpi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index fe78317..064fb57 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -302,8 +302,8 @@ static int test_mpio_gb_file(char *filename) {
"proc %d: write to mpi_off=%016llx, %lld\n",
mpi_rank, mpi_off, mpi_off);
/* set data to some trivial pattern for easy verification */
- for (j = 0; j < MB; j++)
- *(buf + j) = (int8_t)(i * mpi_size + mpi_rank);
+ for (j = 0; j < MB; j++)
+ H5_CHECKED_ASSIGN(*(buf + j), int8_t, i * mpi_size + mpi_rank, int);
if (VERBOSE_MED)
HDfprintf(stdout,
"proc %d: writing %d bytes at offset %lld\n",
@@ -351,7 +351,7 @@ static int test_mpio_gb_file(char *filename) {
mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE,
&mpi_stat);
INFO((mrc == MPI_SUCCESS), "GB size file read");
- expected = (int8_t)(i * mpi_size + (mpi_size - mpi_rank - 1));
+ H5_CHECKED_ASSIGN(expected, int8_t, i * mpi_size + (mpi_size - mpi_rank - 1), int);
vrfyerrs = 0;
for (j = 0; j < MB; j++) {
if ((*(buf + j) != expected)
@@ -526,7 +526,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
* ==================================================*/
irank = 0;
for (i = 0; i < DIMSIZE; i++)
- H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int)
+ H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int)
mpi_off = irank * DIMSIZE;
/* Only one process writes */
@@ -697,7 +697,7 @@ static int test_mpio_derived_dtype(char *filename) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
retcode = 0;
for (i = 0; i < 3; i++)
- H5_CHECKED_ASSIGN(buf[i], int8_t, i + 1, int);
+ buf[i] = (char)(i + 1);
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename,
MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh))