Commit 09c9b867 authored by Su Huang's avatar Su Huang Committed by Junchao Zhang
Browse files

Non-blocking collectives have no validity check for count



Added the check on count and datatype on the following functions:

  - MPI_Iallreduce
  - MPI_Ialltoall
  - MPI_Ibcast
  - MPI_Igather
  - MPI_Ireduce
  - MPI_Iscan

(ibm) D198793

Fixes #2139
Signed-off-by: default avatarMichael Blocksome <blocksom@us.ibm.com>
Signed-off-by: Kenneth Raffenetti's avatarKen Raffenetti <raffenet@mcs.anl.gov>
parent 9c27521d
......@@ -732,6 +732,7 @@ int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count,
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
MPIR_ERRTEST_COUNT(count, mpi_errno);
MPIR_ERRTEST_OP(op, mpi_errno);
MPIR_ERRTEST_COMM(comm, mpi_errno);
......
......@@ -604,8 +604,11 @@ int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
{
MPID_BEGIN_ERROR_CHECKS
{
if (sendbuf != MPI_IN_PLACE)
if (sendbuf != MPI_IN_PLACE) {
MPIR_ERRTEST_COUNT(sendcount, mpi_errno);
MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
}
MPIR_ERRTEST_COUNT(recvcount, mpi_errno);
MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
MPIR_ERRTEST_COMM(comm, mpi_errno);
......
......@@ -941,6 +941,7 @@ int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Com
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
MPIR_ERRTEST_COUNT(count, mpi_errno);
MPIR_ERRTEST_COMM(comm, mpi_errno);
/* TODO more checks may be appropriate */
......
......@@ -602,6 +602,12 @@ int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_COMM(comm, mpi_errno);
if (sendbuf != MPI_IN_PLACE) {
MPIR_ERRTEST_COUNT(sendcount, mpi_errno);
MPIR_ERRTEST_DATATYPE(sendtype, "sendtype", mpi_errno);
}
MPIR_ERRTEST_COUNT(recvcount, mpi_errno);
MPIR_ERRTEST_DATATYPE(recvtype, "recvtype", mpi_errno);
/* TODO more checks may be appropriate */
}
......
......@@ -848,6 +848,7 @@ int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
{
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_COUNT(count, mpi_errno);
MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
MPIR_ERRTEST_OP(op, mpi_errno);
MPIR_ERRTEST_COMM(comm, mpi_errno);
......
......@@ -404,6 +404,7 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
MPID_BEGIN_ERROR_CHECKS
{
MPIR_ERRTEST_DATATYPE(datatype, "datatype", mpi_errno);
MPIR_ERRTEST_COUNT(count, mpi_errno);
MPIR_ERRTEST_OP(op, mpi_errno);
MPIR_ERRTEST_COMM(comm, mpi_errno);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment