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.
Этот коммит содержится в:
родитель
5900415a25
Коммит
8c3b31b181
@ -11,6 +11,7 @@
|
||||
* 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 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* 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 && 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;
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
* 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 Sun Microsystems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* 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 && 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;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user