Commit a59e6117 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Add comments about MPI_NO_OP in GACC/FOP.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 56ede554
......@@ -117,6 +117,8 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
if (mpi_errno) goto fn_fail;
if (op != MPI_NO_OP) {
/* NOTE: when op is MPI_NO_OP, origin_addr is allowed to be NULL.
* In such case, MPI_Fetch_and_op equals to an atomic GET. */
MPIR_ERRTEST_ARGNULL(origin_addr, "origin_addr", mpi_errno);
}
......
......@@ -137,6 +137,10 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
if (mpi_errno) goto fn_fail;
if (op != MPI_NO_OP) {
/* NOTE: when op is MPI_NO_OP, origin_addr is allowed to be NULL,
* origin_datatype is allowed to be MPI_DATATYPE_NULL, and
* origin_count is allowed to be 0. In such case, MPI_Get_accumulate
* equals to an atomic GET. */
MPIR_ERRTEST_COUNT(origin_count, mpi_errno);
MPIR_ERRTEST_DATATYPE(origin_datatype, "origin_datatype", mpi_errno);
MPIR_ERRTEST_USERBUFFER(origin_addr, origin_count, origin_datatype, 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