mpi: correctly handle MPI_IN_PLACE by memchecker in neighborhood collectives
MPI_IN_PLACE is not a valid send buffer for neighborhood collectives, so do not invoke memchecker in this case. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
родитель
66c9485e77
Коммит
ecb6b81a05
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2012 Oak Rigde National Laboratory. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -62,11 +62,7 @@ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sen
|
||||
memchecker_datatype(recvtype);
|
||||
memchecker_comm(comm);
|
||||
/* check whether the actual send buffer is defined. */
|
||||
if (MPI_IN_PLACE == sendbuf) {
|
||||
memchecker_call(&opal_memchecker_base_isdefined,
|
||||
(char *)(recvbuf)+rank*ext,
|
||||
recvcount, recvtype);
|
||||
} else {
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
memchecker_datatype(sendtype);
|
||||
memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -70,11 +70,7 @@ int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype se
|
||||
}
|
||||
|
||||
/* check whether the actual send buffer is defined. */
|
||||
if (MPI_IN_PLACE == sendbuf) {
|
||||
memchecker_call(&opal_memchecker_base_isdefined,
|
||||
(char *)(recvbuf)+displs[rank]*ext,
|
||||
recvcounts[rank], recvtype);
|
||||
} else {
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
memchecker_datatype(sendtype);
|
||||
memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2010 University of Houston. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -62,11 +62,7 @@ int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype send
|
||||
memchecker_datatype(recvtype);
|
||||
memchecker_comm(comm);
|
||||
/* check whether the actual send buffer is defined. */
|
||||
if (MPI_IN_PLACE == sendbuf) {
|
||||
memchecker_call(&opal_memchecker_base_isdefined,
|
||||
(char *)(recvbuf)+rank*ext,
|
||||
recvcount, recvtype);
|
||||
} else {
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
memchecker_datatype(sendtype);
|
||||
memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2016 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2017 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -71,11 +71,7 @@ int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sen
|
||||
}
|
||||
|
||||
/* check whether the actual send buffer is defined. */
|
||||
if (MPI_IN_PLACE == sendbuf) {
|
||||
memchecker_call(&opal_memchecker_base_isdefined,
|
||||
(char *)(recvbuf)+displs[rank]*ext,
|
||||
recvcounts[rank], recvtype);
|
||||
} else {
|
||||
if (MPI_IN_PLACE != sendbuf) {
|
||||
memchecker_datatype(sendtype);
|
||||
memchecker_call(&opal_memchecker_base_isdefined, sendbuf, sendcount, sendtype);
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user