1
1

coll/base: fix mca_coll_base_alltoallv_intra_basic_inplace()

correctly handle the case when a MPI task has no data to send/recv

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2017-05-09 15:19:14 +09:00
родитель 7185567d50
Коммит 26f44da429

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

@ -54,13 +54,15 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts
ompi_datatype_type_size(rdtype, &rdtype_size);
/* If only one process, we're done. */
if (1 == size || 0 == rdtype_size) {
if (1 == size) {
return MPI_SUCCESS;
}
/* Find the largest receive amount */
ompi_datatype_type_extent (rdtype, &ext);
for (i = 0, max_size = 0 ; i < size ; ++i) {
if (i == rank) {
continue;
}
size_t size = opal_datatype_span(&rdtype->super, rcounts[i], &gap);
max_size = size > max_size ? size : max_size;
}