Commit d1ab9e68 authored by Wesley Bland's avatar Wesley Bland Committed by Huiwei Lu
Browse files

Move MPID_Comm_AS_enabled to MPID layer function



It was pointed out that by putting this in a macro and failing silently
when unimplemented, this make things challenging for derivatives which
will implement this function in the future. By moving this to an MPID
level function, it becomes more obvious that the function should be
implemented later.
Signed-off-by: default avatarHuiwei Lu <huiweilu@mcs.anl.gov>
parent 8cbbcae4
......@@ -1283,9 +1283,6 @@ int MPIR_Comm_delete_internal(MPID_Comm * comm_ptr, int isDisconnect);
do { MPIU_Object_add_ref((_comm)); } while (0)
#define MPIR_Comm_release_ref( _comm, _inuse ) \
do { MPIU_Object_release_ref( _comm, _inuse ); } while (0)
#ifndef MPID_Comm_AS_enabled
#define MPID_Comm_AS_enabled(comm) (1)
#endif
/* Release a reference to a communicator. If there are no pending
......@@ -3407,6 +3404,17 @@ int MPID_Cancel_send(MPID_Request *);
int MPID_Cancel_recv(MPID_Request *);
/*@
MPID_Comm_AS_enabled - Query whether anysource operations are enabled for a communicator
Input Parameter:
communicator - Communicator being queried
Return Value:
0 - The communicator will not currently permit anysource operations
1 - The communicator will currently permit anysource operations
@*/
int MPID_Comm_AS_enabled(MPID_Comm *);
MPID_Aint_add - Returns the sum of base and disp
Input Parameters:
......
......@@ -166,9 +166,6 @@ typedef union {
#define MPID_Dev_comm_create_hook(comm_) MPIDI_CH3I_Comm_create_hook(comm_)
#define MPID_Dev_comm_destroy_hook(comm_) MPIDI_CH3I_Comm_destroy_hook(comm_)
#undef MPID_Comm_AS_enabled
#define MPID_Comm_AS_enabled(comm) ((comm)->dev.anysource_enabled)
typedef struct MPIDI_CH3I_comm
{
int eager_max_msg_sz; /* comm-wide eager/rendezvous message threshold */
......
......@@ -148,3 +148,11 @@ int MPID_Comm_failed_bitarray(MPID_Comm *comm_ptr, uint32_t **bitarray, int acke
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPID_Comm_AS_enabled
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPID_Comm_AS_enabled(MPID_Comm *comm_ptr) {
return comm_ptr->dev.anysource_enabled;
}
......@@ -102,9 +102,9 @@ int MPID_Comm_revoke(MPID_Comm *comm_ptr, int is_remote)
return 0;
}
int MPID_Request_is_pending_failure(MPID_Request *request_ptr)
int MPID_Comm_AS_enabled(MPID_Comm *comm_ptr)
{
/* This function is necessary for MPICH to work correctly so it must always
* return 0. */
return 0;
/* This function must return 1 in the default case and should not be ignored
* by the implementation. */
return 1;
}
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