Skip to content

Commit 3a1f618

Browse files
authored
Merge pull request #6085 from hzhou/2207_yaksa_op
typerep: skip unsigned integer type for yaksa reduce Approved-by: Ken Raffenetti
2 parents 3820f08 + fa50d3a commit 3a1f618

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/mpi/datatype/typerep/src/typerep_yaksa_pack.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,20 @@ int MPIR_Typerep_reduce_is_supported(MPI_Op op, MPI_Datatype datatype)
203203
if (!MPIR_CVAR_ENABLE_YAKSA_REDUCTION)
204204
return 0;
205205

206+
/* yaksa pup code currently treat unsigned integer type the same as
207+
* the corresponding signed integer type, which will not work with
208+
* most op other than REPLACE.
209+
*/
210+
if (datatype == MPI_UNSIGNED_CHAR ||
211+
datatype == MPI_UNSIGNED_SHORT ||
212+
datatype == MPI_UNSIGNED ||
213+
datatype == MPI_UNSIGNED_LONG ||
214+
datatype == MPI_UNSIGNED_LONG_LONG ||
215+
datatype == MPI_UINT8_T ||
216+
datatype == MPI_UINT16_T || datatype == MPI_UINT32_T || datatype == MPI_UINT64_T) {
217+
return 0;
218+
}
219+
206220
if ((datatype == MPI_DOUBLE || datatype == MPI_C_DOUBLE_COMPLEX) &&
207221
(!MPIR_CVAR_GPU_DOUBLE_SUPPORT))
208222
return 0;

0 commit comments

Comments
 (0)