Skip to content

Commit

Permalink
Silence warning: implicit conversion loses integer precision
Browse files Browse the repository at this point in the history
Whether a datatype is created using large-count MPI functions
has been checked and indicated by variable 'is_large_type'.
  • Loading branch information
wkliao committed Aug 28, 2024
1 parent 5d2beec commit 86dc048
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/drivers/common/dtype_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,10 @@ int ncmpii_dtype_decode(MPI_Datatype dtype,
return ncmpii_error_mpi2nc(MPI_ERR_IO, "MPI_Type_get_contents_c");
#endif
}
else {
mpireturn = MPI_Type_get_contents(dtype, num_ints, num_adds, num_dtypes,
array_of_ints, array_of_adds, array_of_dtypes);
else { /* dtype is not a large datatype */
mpireturn = MPI_Type_get_contents(dtype, (int)num_ints, (int)num_adds,
(int)num_dtypes, array_of_ints,
array_of_adds, array_of_dtypes);
if (mpireturn != MPI_SUCCESS)
return ncmpii_error_mpi2nc(mpireturn, "MPI_Type_get_contents");
}
Expand Down

0 comments on commit 86dc048

Please sign in to comment.