1
1

Fix MPI_Alltoall to support inter-communicators.

Remove excessive parameter check to avoid premature exit from the collective.

MPI standard says:
The type signature associated with sendcount, sendtype, at a process must be equal to
the type signature associated with recvcount, recvtype at any other process. This implies
that the amount of data sent must be equal to the amount of data received, pairwise between
every pair of processes.

In case of inter-communicator we have 2 group of processes and "left" group may call
MPI_Alltoall(NULL, 0, MPI_INT, buf, 10, MPI_INT, comm, ...);
and the right one:
MPI_Alltoall(buf,10,MPI_INT, NULL, 0, MPI_INT, comm, ...);

And it would be legal though one of the group will receive 0 bytes from others.

This was triggered by MPICH/coll test called icalltoall.
Этот коммит содержится в:
Artem Polyakov 2015-12-10 16:23:33 +06:00
родитель e80f5681f3
Коммит 25077fc5d9

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

@ -92,12 +92,10 @@ int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
}
}
/* Do we need to do anything? Per MPI standard the (v3.1 page 168 line 48)
* the amount of data sent must be equal to the amount of data received.
*/
ompi_datatype_type_size(recvtype, &recvtype_size);
if( (0 == recvcount) || (0 == recvtype_size) ) {
return MPI_SUCCESS;
if( !OMPI_COMM_IS_INTER(comm) ){
if( (0 == recvcount) || (0 == recvtype_size) ) {
return MPI_SUCCESS;
}
}
OPAL_CR_ENTER_LIBRARY();