X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/dd3f7131fa6fb84ae9a070c8574ad1f3c0e1611d..da4b64609d1b4d1829801004cab5ea40ec8b22f1:/src/smpi/smpi_pmpi.c diff --git a/src/smpi/smpi_pmpi.c b/src/smpi/smpi_pmpi.c index 4d8e218ed6..d0d8b4bc0d 100644 --- a/src/smpi/smpi_pmpi.c +++ b/src/smpi/smpi_pmpi.c @@ -1959,7 +1959,10 @@ int PMPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype, } else if (((smpi_comm_rank(comm)==root) && (sendtype == MPI_DATATYPE_NULL)) || ((recvbuf !=MPI_IN_PLACE) && (recvtype == MPI_DATATYPE_NULL))) { retval = MPI_ERR_TYPE; - } else { + } else if ((sendbuf == recvbuf) || + ((smpi_comm_rank(comm)==root) && sendcount>0 && (sendbuf == NULL))){ + retval = MPI_ERR_BUFFER; + }else { if (recvbuf == MPI_IN_PLACE) { recvtype=sendtype;