1
1

Need to properly handle zero-length scatters and gathers on intercommunicators. Add a check for the MPI_ROOT and MPI_PROC_NULL processes so they do not enter collective module when count=0.

This commit was SVN r18481.
Этот коммит содержится в:
Rolf vandeVaart 2008-05-22 19:09:43 +00:00
родитель 5900415a25
Коммит 8c3b31b181
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -11,6 +11,7 @@
* All rights reserved. * All rights reserved.
* Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved. * Copyright (c) 2008 University of Houston. All rights reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -128,7 +129,8 @@ int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
(ompi_comm_rank(comm) != root || (ompi_comm_rank(comm) != root ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE != sendbuf))) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE != sendbuf))) ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf && (ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf &&
0 == recvcount)) { 0 == recvcount) ||
((0 == recvcount && (MPI_ROOT == root) || MPI_PROC_NULL == root))) {
return MPI_SUCCESS; return MPI_SUCCESS;
} }

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

@ -11,6 +11,7 @@
* All rights reserved. * All rights reserved.
* Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008 University of Houston. All rights reserved. * Copyright (c) 2008 University of Houston. All rights reserved.
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -123,7 +124,8 @@ int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
(ompi_comm_rank(comm) != root || (ompi_comm_rank(comm) != root ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE != recvbuf))) || (ompi_comm_rank(comm) == root && MPI_IN_PLACE != recvbuf))) ||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf && (ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf &&
0 == sendcount)) { 0 == sendcount) ||
((0 == sendcount && (MPI_ROOT == root) || MPI_PROC_NULL == root))) {
return MPI_SUCCESS; return MPI_SUCCESS;
} }