From f6ca129aacb2f3200af4644e0dd236985973e7b6 Mon Sep 17 00:00:00 2001 From: Augustin Degomme Date: Tue, 2 Jul 2013 17:34:56 +0200 Subject: [PATCH] use the right index for sendrecv optimization --- src/smpi/smpi_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 9f1233577f..d7b67c078e 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -528,7 +528,7 @@ void smpi_mpi_sendrecv(void *sendbuf, int sendcount, MPI_Datatype sendtype, MPI_Request requests[2]; MPI_Status stats[2]; int myid=smpi_process_index(); - if ((dst == myid) && (src == myid)) { + if ((smpi_group_index(smpi_comm_group(comm), dst) == myid) && (smpi_group_index(smpi_comm_group(comm), src) == myid)) { smpi_datatype_copy(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype); return; -- 2.20.1