Commit 3b04f6c0 authored by Wesley Bland's avatar Wesley Bland
Browse files

Don't check for anysource if not recv



The function to check whether an operation was an anysource receive was
checking all request kinds, even if they weren't receives. This limits
that check to only receives to avoid examining an uninitialized
variable.
Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent d9c15cf3
......@@ -162,5 +162,10 @@ int MPID_Comm_AS_enabled(MPID_Comm *comm_ptr) {
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPID_Request_is_anysource(MPID_Request *request_ptr) {
return request_ptr->dev.match.parts.rank == MPI_ANY_SOURCE;
int ret = 0;
if (request_ptr->kind == MPID_REQUEST_RECV)
ret = request_ptr->dev.match.parts.rank == MPI_ANY_SOURCE;
return ret;
}
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