Commit cdd8e0b7 authored by Wesley Bland's avatar Wesley Bland Committed by Sangmin Seo
Browse files

Makes sure that the status object is always defined



In the MPIC_Sendrecv functions, the status object should always be defined
since we use it internally. This won't have any impact on performance since
the default is always to have FT collectives turned on anyway, but it will
prevent a crash when someone overwrites that default.

Fixes #2026
Signed-off-by: Sangmin Seo's avatarSangmin Seo <sseo@anl.gov>
parent ffcc4904
......@@ -458,10 +458,9 @@ int MPIC_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
context_id = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
MPID_CONTEXT_INTRA_COLL : MPID_CONTEXT_INTER_COLL;
if (MPIR_CVAR_ENABLE_COLL_FT_RET) {
if (status == MPI_STATUS_IGNORE) status = &mystatus;
if (status == MPI_STATUS_IGNORE) status = &mystatus;
if (MPIR_CVAR_ENABLE_COLL_FT_RET)
if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
}
mpi_errno = MPID_Irecv(recvbuf, recvcount, recvtype, source, recvtag,
comm_ptr, context_id, &recv_req_ptr);
......@@ -536,10 +535,9 @@ int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype,
MPIU_ERR_CHKANDJUMP1((count < 0), mpi_errno, MPI_ERR_COUNT,
"**countneg", "**countneg %d", count);
if (MPIR_CVAR_ENABLE_COLL_FT_RET) {
if (status == MPI_STATUS_IGNORE) status = &mystatus;
if (status == MPI_STATUS_IGNORE) status = &mystatus;
if (MPIR_CVAR_ENABLE_COLL_FT_RET)
if (*errflag) MPIR_TAG_SET_ERROR_BIT(sendtag);
}
MPID_Comm_get_ptr(comm, comm_ptr);
context_id_offset = (comm_ptr->comm_kind == MPID_INTRACOMM) ?
......
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