1
1

coll/base: fix MPI_IN_PLACE in ompi_coll_base_reduce_generic()

avoid copying data to itself when MPI_IN_PLACE is used

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2016-12-01 11:11:30 +09:00
родитель eeec99ac12
Коммит 8b7999469b

Просмотреть файл

@ -99,7 +99,8 @@ int ompi_coll_base_reduce_generic( const void* sendbuf, void* recvbuf, int origi
/* If this is a non-commutative operation we must copy
sendbuf to the accumbuf, in order to simplfy the loops */
if (!ompi_op_is_commute(op)) {
if (!ompi_op_is_commute(op) && MPI_IN_PLACE != sendbuf) {
ompi_datatype_copy_content_same_ddt(datatype, original_count,
(char*)accumbuf,
(char*)sendtmpbuf);