* Fixes trac:338: Only look at root-significant values at the root (e.g.,
recvbuf in MPI_GATHER). * Minor style updates (constants on the left of == and !=) * Fix a minor buglet that crept in r11904: had a recvbuf where it should have been recvcount. Thankfully, this would have only affected erroneous programs. ;-) This commit was SVN r11980. The following SVN revision numbers were found above: r11904 --> open-mpi/ompi@17539dc154 The following Trac tickets were found above: Ticket 338 --> https://svn.open-mpi.org/trac/ompi/ticket/338
Этот коммит содержится в:
родитель
e4df4285b1
Коммит
e08c6e81f5
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -45,7 +46,7 @@ int MPI_Gather(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
||||
@ -118,7 +119,7 @@ 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 == recvbuf)) {
|
||||
0 == recvcount)) {
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -45,7 +46,7 @@ int MPI_Gatherv(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -55,8 +56,8 @@ int MPI_Reduce(void *sendbuf, void *recvbuf, int count,
|
||||
int ret = OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_OP, msg);
|
||||
free(msg);
|
||||
return ret;
|
||||
} else if ((root != ompi_comm_rank(comm) && MPI_IN_PLACE == sendbuf) ||
|
||||
MPI_IN_PLACE == recvbuf) {
|
||||
} else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == sendbuf) ||
|
||||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == recvbuf)) {
|
||||
err = MPI_ERR_ARG;
|
||||
} else {
|
||||
OMPI_CHECK_DATATYPE_FOR_SEND(err, datatype, count);
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -46,7 +47,7 @@ int MPI_Scatter(void *sendbuf, int sendcount, MPI_Datatype sendtype,
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == recvbuf) ||
|
||||
MPI_IN_PLACE == sendbuf) {
|
||||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -45,7 +46,7 @@ int MPI_Scatterv(void *sendbuf, int *sendcounts, int *displs,
|
||||
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
|
||||
FUNC_NAME);
|
||||
} else if ((ompi_comm_rank(comm) != root && MPI_IN_PLACE == recvbuf) ||
|
||||
MPI_IN_PLACE == sendbuf) {
|
||||
(ompi_comm_rank(comm) == root && MPI_IN_PLACE == sendbuf)) {
|
||||
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user