[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b1-17-g983a60e

Service Account noreply at mpich.org
Fri Mar 27 18:30:27 CDT 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  983a60e8fd6490daf15301f5f092795de941ed8d (commit)
      from  ed383176b480dd5ae2dff1d444a5d6ba3ca713a9 (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/983a60e8fd6490daf15301f5f092795de941ed8d

commit 983a60e8fd6490daf15301f5f092795de941ed8d
Author: Huiwei Lu <huiweilu at mcs.anl.gov>
Date:   Thu Mar 26 20:23:54 2015 -0500

    Fixes build failure with per-object thread-cs
    
    When configured with --enable-thread-cs=per-object, MPICH build will go
    wrong because MPID_cc_t will be defined as OPA_int_t, which can not be
    directly compared with or assigned with int.
    
    This patch adds one macro,  MPID_cc_get, for correctly reading
    MPID_cc_t. Also, change writing to MPID_cc_t to use MPID_cc_set.
    
    Fixes #2250

diff --git a/src/include/mpiimplthread.h b/src/include/mpiimplthread.h
index f0141c6..625cc90 100644
--- a/src/include/mpiimplthread.h
+++ b/src/include/mpiimplthread.h
@@ -910,6 +910,7 @@ do {                                           \
 do {                                           \
     *(was_incomplete_) = (*(cc_ptr_))++;       \
 } while (0)
+#define MPID_cc_get(cc_) (cc_)
 
 # elif MPIU_THREAD_GRANULARITY == MPIU_THREAD_GRANULARITY_PER_OBJECT
 
@@ -977,6 +978,8 @@ static MPIU_DBG_INLINE_KEYWORD int MPID_cc_is_complete(MPID_cc_t *cc_ptr)
         *(was_incomplete_) = OPA_fetch_and_incr_int(cc_ptr_);               \
     } while (0)
 
+#define MPID_cc_get(cc_) OPA_load_int(&(cc_))
+
 # else
 #  error "unexpected thread granularity"
 # endif /* granularity */
@@ -993,6 +996,7 @@ do {                                           \
 do {                                           \
     *(was_incomplete_) = (*(cc_ptr_))++;       \
 } while (0)
+#define MPID_cc_get(cc_) (cc_)
 
 #endif /* defined(MPICH_IS_THREADED) */
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
index c38968c..5f12566 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
@@ -158,7 +158,7 @@ static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((u
     MPIDI_VC_t *vc;
 
     BEGIN_FUNC(FCNAME);
-    if (rreq->cc == 1) {
+    if (MPID_cc_get(rreq->cc) == 1) {
         vc = REQ_OFI(rreq)->vc;
         MPIU_Assert(vc);
         MPI_RC(MPID_nem_handle_pkt(vc, REQ_OFI(rreq)->pack_buffer, REQ_OFI(rreq)->pack_buffer_size))
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
index 2a67e31..fece219 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c
@@ -105,7 +105,7 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
     req_fn reqFn;
     uint64_t tag = 0;
     BEGIN_FUNC(FCNAME);
-    if (sreq->cc == 2) {
+    if (MPID_cc_get(sreq->cc) == 2) {
         vc = REQ_OFI(sreq)->vc;
         REQ_OFI(sreq)->tag = tag | MPID_MSG_DATA;
         FI_RC(fi_tsend(gl_data.endpoint,
@@ -115,7 +115,7 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
                          VC_OFI(vc)->direct_addr,
                          wc->tag | MPID_MSG_DATA, (void *) &(REQ_OFI(sreq)->ofi_context)), tsend);
     }
-    if (sreq->cc == 1) {
+    if (MPID_cc_get(sreq->cc) == 1) {
         if (REQ_OFI(sreq)->pack_buffer)
             MPIU_Free(REQ_OFI(sreq)->pack_buffer);
 
diff --git a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
index 4ee5de1..d1ad140 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/portals4/ptl_send.c
@@ -73,7 +73,7 @@ static int handler_send(const ptl_event_t *e)
     MPIU_Assert(e->type == PTL_EVENT_SEND || e->type == PTL_EVENT_GET);
 
     /* if we are done, release all resources and complete the request */
-    if (sreq->cc == 1) {
+    if (MPID_cc_get(sreq->cc) == 1) {
         if (REQ_PTL(sreq)->md != PTL_INVALID_HANDLE) {
             ret = PtlMDRelease(REQ_PTL(sreq)->md);
             MPIU_ERR_CHKANDJUMP1(ret, mpi_errno, MPI_ERR_OTHER, "**ptlmdrelease", "**ptlmdrelease %s", MPID_nem_ptl_strerror(ret));
diff --git a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
index e7cdb6e..c07d322 100644
--- a/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
+++ b/src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c
@@ -205,7 +205,7 @@ static int pkt_RTS_handler(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, MPIDI_msg_sz_t
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_exit;
     }
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
index 3dc40d2..7f31cd8 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsg.c
@@ -131,7 +131,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
 		    MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
 		sreq->kind = MPID_REQUEST_SEND;
-		sreq->cc = 0;
+		MPID_cc_set(&(sreq->cc), 0);
 		sreq->status.MPI_ERROR = MPIR_Err_create_code( rc,
 			       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
 			       MPI_ERR_INTERN, "**ch3|sock|writefailed",
@@ -199,7 +199,7 @@ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * hdr, MPIDI_msg_sz_t hdr_sz,
 	    MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
 	sreq->kind = MPID_REQUEST_SEND;
-	sreq->cc   = 0;
+	MPID_cc_set(&sreq->cc, 0);
 	
 	sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS,
 		       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
diff --git a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
index 223b854..0b9d402 100644
--- a/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
+++ b/src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c
@@ -163,7 +163,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov,
 		    MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 		}
 		sreq->kind = MPID_REQUEST_SEND;
-		sreq->cc = 0;
+        MPID_cc_set(&(sreq->cc), 0);
 		sreq->status.MPI_ERROR = MPIR_Err_create_code( rc,
 			       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
 			       MPI_ERR_INTERN, "**ch3|sock|writefailed", 
@@ -231,7 +231,7 @@ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPID_IOV * iov, int n_iov,
 	    MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**nomem");
 	}
 	sreq->kind = MPID_REQUEST_SEND;
-	sreq->cc = 0;
+    MPID_cc_set(&(sreq->cc), 0);
 	sreq->status.MPI_ERROR = MPIR_Err_create_code( MPI_SUCCESS,
 		       MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, 
 		       MPI_ERR_INTERN, "**ch3|sock|connectionfailed",0 );
diff --git a/src/mpid/ch3/src/ch3u_eager.c b/src/mpid/ch3/src/ch3u_eager.c
index 92440a0..2f16890 100644
--- a/src/mpid/ch3/src/ch3u_eager.c
+++ b/src/mpid/ch3/src/ch3u_eager.c
@@ -308,7 +308,7 @@ int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_fail;
     }
@@ -622,7 +622,7 @@ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_fail;
     }
@@ -706,7 +706,7 @@ int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_fail;
     }
diff --git a/src/mpid/ch3/src/ch3u_eagersync.c b/src/mpid/ch3/src/ch3u_eagersync.c
index 48cd5eb..89f5872 100644
--- a/src/mpid/ch3/src/ch3u_eagersync.c
+++ b/src/mpid/ch3/src/ch3u_eagersync.c
@@ -239,7 +239,7 @@ int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_fail;
     }
diff --git a/src/mpid/ch3/src/ch3u_rndv.c b/src/mpid/ch3/src/ch3u_rndv.c
index 6861f44..9d64e7a 100644
--- a/src/mpid/ch3/src/ch3u_rndv.c
+++ b/src/mpid/ch3/src/ch3u_rndv.c
@@ -131,7 +131,7 @@ int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt,
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         *rreqp = NULL;
         goto fn_fail;
     }
diff --git a/src/mpid/ch3/src/mpid_send.c b/src/mpid/ch3/src/mpid_send.c
index bb9338d..cf25242 100644
--- a/src/mpid/ch3/src/mpid_send.c
+++ b/src/mpid/ch3/src/mpid_send.c
@@ -56,7 +56,7 @@ int MPID_Send(const void * buf, int count, MPI_Datatype datatype, int rank,
 	   will not be made (long-term FIXME) */
 #       ifndef MPICH_IS_THREADED
 	{
-	    if (sreq != NULL && sreq->cc != 0) {
+	    if (sreq != NULL && MPID_cc_get(sreq->cc) != 0) {
 		MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,
 				    "**dev|selfsenddeadlock");
 	    }
diff --git a/src/mpid/ch3/src/mpid_ssend.c b/src/mpid/ch3/src/mpid_ssend.c
index 7ee8883..b3d735c 100644
--- a/src/mpid/ch3/src/mpid_ssend.c
+++ b/src/mpid/ch3/src/mpid_ssend.c
@@ -55,7 +55,7 @@ int MPID_Ssend(const void * buf, int count, MPI_Datatype datatype, int rank, int
 #       ifndef MPICH_IS_THREADED
 	{
 	    /* --BEGIN ERROR HANDLING-- */
-	    if (sreq != NULL && sreq->cc != 0)
+	    if (sreq != NULL && MPID_cc_get(sreq->cc) != 0)
 	    {
 		mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER,
 						 "**dev|selfsenddeadlock", 0);
diff --git a/src/mpid/ch3/src/mpidi_isend_self.c b/src/mpid/ch3/src/mpidi_isend_self.c
index b003e6e..7521c68 100644
--- a/src/mpid/ch3/src/mpidi_isend_self.c
+++ b/src/mpid/ch3/src/mpidi_isend_self.c
@@ -59,7 +59,7 @@ int MPIDI_Isend_self(const void * buf, int count, MPI_Datatype datatype, int ran
     /* If the completion counter is 0, that means that the communicator to
      * which this message is being sent has been revoked and we shouldn't
      * bother finishing this. */
-    if (!found && rreq->cc == 0) {
+    if (!found && MPID_cc_get(rreq->cc) == 0) {
         MPIU_Object_set_ref(sreq, 0);
         MPIDI_CH3_Request_destroy(sreq);
         sreq = NULL;

-----------------------------------------------------------------------

Summary of changes:
 src/include/mpiimplthread.h                        |    4 ++++
 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c  |    2 +-
 src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c |    4 ++--
 .../channels/nemesis/netmod/portals4/ptl_send.c    |    2 +-
 src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c   |    2 +-
 src/mpid/ch3/channels/sock/src/ch3_istartmsg.c     |    4 ++--
 src/mpid/ch3/channels/sock/src/ch3_istartmsgv.c    |    4 ++--
 src/mpid/ch3/src/ch3u_eager.c                      |    6 +++---
 src/mpid/ch3/src/ch3u_eagersync.c                  |    2 +-
 src/mpid/ch3/src/ch3u_rndv.c                       |    2 +-
 src/mpid/ch3/src/mpid_send.c                       |    2 +-
 src/mpid/ch3/src/mpid_ssend.c                      |    2 +-
 src/mpid/ch3/src/mpidi_isend_self.c                |    2 +-
 13 files changed, 21 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list