1
1

Fix mca_coll_basic_alltoallw_inter()

Avoid sending/receiving zero size messages in order to be compliant
with the top-level modification

cmr=v1.8.2:ticket=4651:reviewer=bosilca

This commit was SVN r31836.

The following Trac tickets were found above:
  Ticket 4651 --> https://svn.open-mpi.org/trac/ompi/ticket/4651
Этот коммит содержится в:
Gilles Gouaillardet 2014-05-20 09:22:57 +00:00
родитель 137874ec4d
Коммит baf532087a

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

@ -290,15 +290,23 @@ mca_coll_basic_alltoallw_inter(void *sbuf, int *scounts, int *sdisps,
size = ompi_comm_remote_size(comm);
/* Initiate all send/recv to/from others. */
nreqs = size * 2;
nreqs = 0;
preq = basic_module->mccb_reqs;
/* Post all receives first -- a simple optimization */
for (i = 0; i < size; ++i) {
size_t msg_size;
ompi_datatype_type_size(rdtypes[i], &msg_size);
msg_size *= rcounts[i];
if (0 == msg_size)
continue;
prcv = ((char *) rbuf) + rdisps[i];
err = MCA_PML_CALL(irecv_init(prcv, rcounts[i], rdtypes[i],
i, MCA_COLL_BASE_TAG_ALLTOALLW,
comm, preq++));
++nreqs;
if (OMPI_SUCCESS != err) {
mca_coll_basic_free_reqs(basic_module->mccb_reqs,
nreqs);
@ -308,11 +316,19 @@ mca_coll_basic_alltoallw_inter(void *sbuf, int *scounts, int *sdisps,
/* Now post all sends */
for (i = 0; i < size; ++i) {
size_t msg_size;
ompi_datatype_type_size(sdtypes[i], &msg_size);
msg_size *= scounts[i];
if (0 == msg_size)
continue;
psnd = ((char *) sbuf) + sdisps[i];
err = MCA_PML_CALL(isend_init(psnd, scounts[i], sdtypes[i],
i, MCA_COLL_BASE_TAG_ALLTOALLW,
MCA_PML_BASE_SEND_STANDARD, comm,
preq++));
++nreqs;
if (OMPI_SUCCESS != err) {
mca_coll_basic_free_reqs(basic_module->mccb_reqs,
nreqs);