Commit 456db5ed authored by Rajeev Thakur's avatar Rajeev Thakur
Browse files

[svn-r3458] Fixes #264. Don't check for sendbuf-recvbuf aliasing if count=0

parent f818af4a
......@@ -660,12 +660,11 @@ int MPI_Allreduce ( void *sendbuf, void *recvbuf, int count,
mpi_errno =
( * MPIR_Op_check_dtype_table[op%16 - 1] )(datatype);
}
if (count != 0) {
MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
}
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPID_END_ERROR_CHECKS;
}
# endif /* HAVE_ERROR_CHECKING */
......
......@@ -852,12 +852,11 @@ int MPI_Reduce(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype,
mpi_errno =
( * MPIR_Op_check_dtype_table[op%16 - 1] )(datatype);
}
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
if (count != 0) {
MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
}
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
}
MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
MPID_END_ERROR_CHECKS;
}
# endif /* HAVE_ERROR_CHECKING */
......
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