[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2a2-108-g6f646ca
Service Account
noreply at mpich.org
Tue Jan 13 11:25:38 CST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 6f646ca0562951477c6c3023be985544ebd60f90 (commit)
via d1ab9e681dd0f0dd492efe8dcc4b292231e815c7 (commit)
from 8cbbcae44bde9917f36010a255f7aba5f84d3d82 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/6f646ca0562951477c6c3023be985544ebd60f90
commit 6f646ca0562951477c6c3023be985544ebd60f90
Author: Wesley Bland <wbland at anl.gov>
Date: Mon Jan 12 15:54:48 2015 -0600
Remove ADI breakage introduced earlier
There was an accidental ADI breakage earlier when MPI level codes would
query into the dev part of the MPID request object. This commit removes
that breakage by adding a new macro into the mpiimpl.h file to portably
check whether a request is anysource. For now, in pamid, this macro
always evaluates to 0. This can easily be fixed by overwriting it in the
pamid code, but since pamid doesn't support FT, it won't have any
functional change either.
Signed-off-by: Huiwei Lu <huiweilu at mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 0657f28..c26ca52 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -3415,6 +3415,20 @@ int MPID_Cancel_recv(MPID_Request *);
@*/
int MPID_Comm_AS_enabled(MPID_Comm *);
+/*@
+ MPID_Request_is_anysource - Query whether the request is an anysource receive
+
+ Input Parameter:
+ request - Receive request being queried
+
+ Return Value:
+ 0 - The request is not anysource
+ 1 - The request is anysource
+
+ @*/
+int MPID_Request_is_anysource(MPID_Request *);
+
+/*@
MPID_Aint_add - Returns the sum of base and disp
Input Parameters:
diff --git a/src/mpi/pt2pt/recv.c b/src/mpi/pt2pt/recv.c
index 922bce9..210548c 100644
--- a/src/mpi/pt2pt/recv.c
+++ b/src/mpi/pt2pt/recv.c
@@ -165,7 +165,7 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag,
if (unlikely(MPIR_CVAR_ENABLE_FT &&
!MPID_Request_is_complete(request_ptr) &&
- request_ptr->dev.match.parts.rank == MPI_ANY_SOURCE &&
+ MPID_Request_is_anysource(request_ptr) &&
!MPID_Comm_AS_enabled(request_ptr->comm))) {
/* --BEGIN ERROR HANDLING-- */
MPID_Cancel_recv(request_ptr);
diff --git a/src/mpi/pt2pt/sendrecv.c b/src/mpi/pt2pt/sendrecv.c
index d6d4729..44a2c2a 100644
--- a/src/mpi/pt2pt/sendrecv.c
+++ b/src/mpi/pt2pt/sendrecv.c
@@ -192,7 +192,7 @@ int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype,
if (unlikely(MPIR_CVAR_ENABLE_FT &&
!MPID_Request_is_complete(rreq) &&
- rreq->dev.match.parts.rank == MPI_ANY_SOURCE &&
+ MPID_Request_is_anysource(rreq) &&
!MPID_Comm_AS_enabled(rreq->comm))) {
/* --BEGIN ERROR HANDLING-- */
MPID_Cancel_recv(rreq);
diff --git a/src/mpi/pt2pt/test.c b/src/mpi/pt2pt/test.c
index f29e90f..dbecd57 100644
--- a/src/mpi/pt2pt/test.c
+++ b/src/mpi/pt2pt/test.c
@@ -68,7 +68,7 @@ int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status)
/* Fall through to the exit */
} else if (unlikely(
MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptr->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptr) &&
!MPID_Comm_AS_enabled(request_ptr->comm))) {
MPIU_ERR_SET(mpi_errno, MPIX_ERR_PROC_FAILED_PENDING, "**failure_pending");
if (status != MPI_STATUS_IGNORE) status->MPI_ERROR = mpi_errno;
diff --git a/src/mpi/pt2pt/testall.c b/src/mpi/pt2pt/testall.c
index fb7fc93..50107d4 100644
--- a/src/mpi/pt2pt/testall.c
+++ b/src/mpi/pt2pt/testall.c
@@ -179,7 +179,7 @@ int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag,
mpi_errno = MPI_ERR_IN_STATUS;
}
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm)))
{
mpi_errno = MPI_ERR_IN_STATUS;
diff --git a/src/mpi/pt2pt/testany.c b/src/mpi/pt2pt/testany.c
index a4957c0..a7bfe9e 100644
--- a/src/mpi/pt2pt/testany.c
+++ b/src/mpi/pt2pt/testany.c
@@ -187,7 +187,7 @@ int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx,
n_inactive += 1;
}
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm)))
{
last_disabled_anysource = i;
diff --git a/src/mpi/pt2pt/testsome.c b/src/mpi/pt2pt/testsome.c
index 76ae264..c157820 100644
--- a/src/mpi/pt2pt/testsome.c
+++ b/src/mpi/pt2pt/testsome.c
@@ -199,7 +199,7 @@ int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount,
n_inactive += 1;
}
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm)))
{
mpi_errno = MPI_ERR_IN_STATUS;
diff --git a/src/mpi/pt2pt/wait.c b/src/mpi/pt2pt/wait.c
index f685d2e..6773c82 100644
--- a/src/mpi/pt2pt/wait.c
+++ b/src/mpi/pt2pt/wait.c
@@ -51,7 +51,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
* anysource disabled, convert the call to an MPI_Test instead so we
* don't get stuck in the progress engine. */
if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptr->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptr) &&
!MPID_Comm_AS_enabled(request_ptr->comm))) {
mpi_errno = MPIR_Test_impl(request, &active_flag, status);
goto fn_exit;
@@ -84,7 +84,7 @@ int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status)
if (unlikely(
MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptr->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptr) &&
!MPID_Request_is_complete(request_ptr) &&
!MPID_Comm_AS_enabled(request_ptr->comm))) {
MPID_Progress_end(&progress_state);
diff --git a/src/mpi/pt2pt/waitall.c b/src/mpi/pt2pt/waitall.c
index 5da2dec..eda6eaf 100644
--- a/src/mpi/pt2pt/waitall.c
+++ b/src/mpi/pt2pt/waitall.c
@@ -92,7 +92,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
* disabled such communication, convert this operation to a testall
* instead to prevent getting stuck in the progress engine. */
if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Request_is_complete(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
disabled_anysource = TRUE;
@@ -134,7 +134,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
if (unlikely(mpi_errno)) {
/* --BEGIN ERROR HANDLING-- */
if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Request_is_complete(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
MPIU_ERR_SET(mpi_errno, MPI_ERR_IN_STATUS, "**instatus");
@@ -188,7 +188,7 @@ int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[],
MPIU_ERR_POP(mpi_errno);
/* --END ERROR HANDLING-- */
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Request_is_complete(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
/* Check for pending failures */
diff --git a/src/mpi/pt2pt/waitany.c b/src/mpi/pt2pt/waitany.c
index ae9b37d..7653f51 100644
--- a/src/mpi/pt2pt/waitany.c
+++ b/src/mpi/pt2pt/waitany.c
@@ -186,7 +186,7 @@ int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx,
}
}
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
last_disabled_anysource = i;
}
diff --git a/src/mpi/pt2pt/waitsome.c b/src/mpi/pt2pt/waitsome.c
index 5f4aeac..d1465f8 100644
--- a/src/mpi/pt2pt/waitsome.c
+++ b/src/mpi/pt2pt/waitsome.c
@@ -165,7 +165,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
* disabled such communication, convert this operation to a testall
* instead to prevent getting stuck in the progress engine. */
if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Request_is_complete(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm))) {
disabled_anysource = TRUE;
@@ -240,7 +240,7 @@ int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
n_inactive += 1;
}
} else if (unlikely(MPIR_CVAR_ENABLE_FT &&
- MPI_ANY_SOURCE == request_ptrs[i]->dev.match.parts.rank &&
+ MPID_Request_is_anysource(request_ptrs[i]) &&
!MPID_Comm_AS_enabled(request_ptrs[i]->comm)))
{
mpi_errno = MPI_ERR_IN_STATUS;
diff --git a/src/mpid/ch3/src/mpid_comm_failure_ack.c b/src/mpid/ch3/src/mpid_comm_failure_ack.c
index e4c1b88..e8d836c 100644
--- a/src/mpid/ch3/src/mpid_comm_failure_ack.c
+++ b/src/mpid/ch3/src/mpid_comm_failure_ack.c
@@ -156,3 +156,11 @@ int MPID_Comm_AS_enabled(MPID_Comm *comm_ptr) {
return comm_ptr->dev.anysource_enabled;
}
+
+#undef FUNCNAME
+#define FUNCNAME MPID_Request_is_anysource
+#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;
+}
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index 154364a..155b700 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -108,3 +108,11 @@ int MPID_Comm_AS_enabled(MPID_Comm *comm_ptr)
* by the implementation. */
return 1;
}
+
+int MPID_Request_is_anysource(MPID_Request *request_ptr)
+{
+ /* This function must not abort in the default case since it is used in many
+ * MPI functions. As long as the device does not implement FT, it doesn't
+ * matter what this function returns. */
+ return 0;
+}
http://git.mpich.org/mpich.git/commitdiff/d1ab9e681dd0f0dd492efe8dcc4b292231e815c7
commit d1ab9e681dd0f0dd492efe8dcc4b292231e815c7
Author: Wesley Bland <wbland at anl.gov>
Date: Mon Jan 12 15:51:16 2015 -0600
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: Huiwei Lu <huiweilu at mcs.anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 52937f8..0657f28 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -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:
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 6a7e63b..2bb62b2 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -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 */
diff --git a/src/mpid/ch3/src/mpid_comm_failure_ack.c b/src/mpid/ch3/src/mpid_comm_failure_ack.c
index e64a7f4..e4c1b88 100644
--- a/src/mpid/ch3/src/mpid_comm_failure_ack.c
+++ b/src/mpid/ch3/src/mpid_comm_failure_ack.c
@@ -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;
+}
+
diff --git a/src/mpid/pamid/src/misc/mpid_unimpl.c b/src/mpid/pamid/src/misc/mpid_unimpl.c
index 41abeee..154364a 100644
--- a/src/mpid/pamid/src/misc/mpid_unimpl.c
+++ b/src/mpid/pamid/src/misc/mpid_unimpl.c
@@ -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;
}
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 28 +++++++++++++++++++++++++---
src/mpi/pt2pt/recv.c | 2 +-
src/mpi/pt2pt/sendrecv.c | 2 +-
src/mpi/pt2pt/test.c | 2 +-
src/mpi/pt2pt/testall.c | 2 +-
src/mpi/pt2pt/testany.c | 2 +-
src/mpi/pt2pt/testsome.c | 2 +-
src/mpi/pt2pt/wait.c | 4 ++--
src/mpi/pt2pt/waitall.c | 6 +++---
src/mpi/pt2pt/waitany.c | 2 +-
src/mpi/pt2pt/waitsome.c | 4 ++--
src/mpid/ch3/include/mpidpre.h | 3 ---
src/mpid/ch3/src/mpid_comm_failure_ack.c | 16 ++++++++++++++++
src/mpid/pamid/src/misc/mpid_unimpl.c | 14 +++++++++++---
14 files changed, 66 insertions(+), 23 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list