[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-243-gea020d5

Service Account noreply at mpich.org
Fri Oct 2 23:50:54 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  ea020d563d53b0a85437c05db5a378d01d86e439 (commit)
       via  6b49892b67d4244fc09bd1d89e00f8cba77fb574 (commit)
       via  d77d8d622e355f6995ddb6852d0d0be1f0711c20 (commit)
      from  fe2991e0ce3fb0f789b745161e6f9a571aceabe7 (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/ea020d563d53b0a85437c05db5a378d01d86e439

commit ea020d563d53b0a85437c05db5a378d01d86e439
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Oct 2 17:04:10 2015 -0500

    Code cleanup.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_handle_recv_req.c b/src/mpid/ch3/src/ch3u_handle_recv_req.c
index 89b83ef..9973d89 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -1282,8 +1282,7 @@ static inline int perform_get_in_lock_queue(MPID_Win * win_ptr,
         sreq->dev.segment_size = get_pkt->count * type_size;
 
         mpi_errno = target_lock_entry->vc->sendNoncontig_fn(target_lock_entry->vc, sreq,
-                                                            iov[0].MPL_IOV_BUF,
-                                                            iov[0].MPL_IOV_LEN);
+                                                            iov[0].MPL_IOV_BUF, iov[0].MPL_IOV_LEN);
         MPIR_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**ch3|rmamsg");
     }
 
diff --git a/src/mpid/ch3/src/mpidi_printf.c b/src/mpid/ch3/src/mpidi_printf.c
index 83be2dc..031bef9 100644
--- a/src/mpid/ch3/src/mpidi_printf.c
+++ b/src/mpid/ch3/src/mpidi_printf.c
@@ -238,74 +238,74 @@ const char *MPIDI_Pkt_GetDescString(MPIDI_CH3_Pkt_t * pkt)
     switch (pkt->type) {
     case MPIDI_CH3_PKT_EAGER_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
-                      pkt->eager_send.match.parts.context_id,
-                      (int) pkt->eager_send.match.parts.tag,
-                      pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
+                     "EAGER_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+                     pkt->eager_send.match.parts.context_id,
+                     (int) pkt->eager_send.match.parts.tag,
+                     pkt->eager_send.match.parts.rank, pkt->eager_send.data_sz);
         break;
     case MPIDI_CH3_PKT_EAGER_SYNC_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
-                      pkt->eager_sync_send.match.parts.context_id,
-                      (int) pkt->eager_sync_send.match.parts.tag,
-                      pkt->eager_sync_send.match.parts.rank,
-                      pkt->eager_sync_send.data_sz, pkt->eager_sync_send.sender_req_id);
+                     "EAGER_SYNC_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+                     pkt->eager_sync_send.match.parts.context_id,
+                     (int) pkt->eager_sync_send.match.parts.tag,
+                     pkt->eager_sync_send.match.parts.rank,
+                     pkt->eager_sync_send.data_sz, pkt->eager_sync_send.sender_req_id);
         break;
     case MPIDI_CH3_PKT_EAGER_SYNC_ACK:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "EAGER_SYNC_ACK - req=%d", pkt->eager_sync_ack.sender_req_id);
+                     "EAGER_SYNC_ACK - req=%d", pkt->eager_sync_ack.sender_req_id);
         break;
     case MPIDI_CH3_PKT_READY_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
-                      pkt->ready_send.match.parts.context_id,
-                      (int) pkt->ready_send.match.parts.tag,
-                      pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
+                     "READY_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT,
+                     pkt->ready_send.match.parts.context_id,
+                     (int) pkt->ready_send.match.parts.tag,
+                     pkt->ready_send.match.parts.rank, pkt->ready_send.data_sz);
         break;
     case MPIDI_CH3_PKT_RNDV_REQ_TO_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
-                      pkt->rndv_req_to_send.match.parts.context_id,
-                      (int) pkt->rndv_req_to_send.match.parts.tag,
-                      pkt->rndv_req_to_send.match.parts.rank,
-                      pkt->rndv_req_to_send.data_sz, pkt->rndv_req_to_send.sender_req_id);
+                     "RNDV_REQ_TO_SEND - (%d,%d,%d,)" MPIDI_MSG_SZ_FMT " req=%d",
+                     pkt->rndv_req_to_send.match.parts.context_id,
+                     (int) pkt->rndv_req_to_send.match.parts.tag,
+                     pkt->rndv_req_to_send.match.parts.rank,
+                     pkt->rndv_req_to_send.data_sz, pkt->rndv_req_to_send.sender_req_id);
         break;
     case MPIDI_CH3_PKT_RNDV_CLR_TO_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "RNDV_CLRTO_SEND - req=%d, recv req=%d",
-                      pkt->rndv_clr_to_send.sender_req_id, pkt->rndv_clr_to_send.receiver_req_id);
+                     "RNDV_CLRTO_SEND - req=%d, recv req=%d",
+                     pkt->rndv_clr_to_send.sender_req_id, pkt->rndv_clr_to_send.receiver_req_id);
         break;
     case MPIDI_CH3_PKT_RNDV_SEND:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "RNDV_SEND - recv req=%d", pkt->rndv_send.receiver_req_id);
+                     "RNDV_SEND - recv req=%d", pkt->rndv_send.receiver_req_id);
         break;
     case MPIDI_CH3_PKT_CANCEL_SEND_REQ:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "CANCEL_SEND_REQ - req=%d", pkt->cancel_send_req.sender_req_id);
+                     "CANCEL_SEND_REQ - req=%d", pkt->cancel_send_req.sender_req_id);
         break;
     case MPIDI_CH3_PKT_CANCEL_SEND_RESP:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "CANCEL_SEND_RESP - req=%d ack=%d",
-                      pkt->cancel_send_resp.sender_req_id, pkt->cancel_send_resp.ack);
+                     "CANCEL_SEND_RESP - req=%d ack=%d",
+                     pkt->cancel_send_resp.sender_req_id, pkt->cancel_send_resp.ack);
         break;
     case MPIDI_CH3_PKT_PUT:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "PUT - (%p,%d,0x%08X)",
-                      pkt->put.addr, pkt->put.count, pkt->put.target_win_handle);
+                     "PUT - (%p,%d,0x%08X)",
+                     pkt->put.addr, pkt->put.count, pkt->put.target_win_handle);
         break;
     case MPIDI_CH3_PKT_GET:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "GET - (%p,%d,0x%08X) req=%d",
-                      pkt->get.addr,
-                      pkt->get.count, pkt->get.target_win_handle, pkt->get.request_handle);
+                     "GET - (%p,%d,0x%08X) req=%d",
+                     pkt->get.addr,
+                     pkt->get.count, pkt->get.target_win_handle, pkt->get.request_handle);
         break;
     case MPIDI_CH3_PKT_GET_RESP:
         MPL_snprintf(pktmsg, sizeof(pktmsg), "GET_RESP - req=%d", pkt->get_resp.request_handle);
         break;
     case MPIDI_CH3_PKT_ACCUMULATE:
         MPL_snprintf(pktmsg, sizeof(pktmsg),
-                      "ACCUMULATE - (%p,%d,0x%08X)",
-                      pkt->accum.addr, pkt->accum.count, pkt->accum.target_win_handle);
+                     "ACCUMULATE - (%p,%d,0x%08X)",
+                     pkt->accum.addr, pkt->accum.count, pkt->accum.target_win_handle);
         break;
     case MPIDI_CH3_PKT_LOCK:
         MPL_snprintf(pktmsg, sizeof(pktmsg), "LOCK - %d", pkt->lock.target_win_handle);

http://git.mpich.org/mpich.git/commitdiff/6b49892b67d4244fc09bd1d89e00f8cba77fb574

commit 6b49892b67d4244fc09bd1d89e00f8cba77fb574
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Sep 18 09:57:16 2015 -0500

    Modify comments.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 267524c..6d0c5b5 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -356,8 +356,7 @@ static inline int flush_local_all(MPID_Win * win_ptr)
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_POP(mpi_errno);
 
-    /* wait for remote completion for those targets that disable flush_local,
-     * and wait for local completion for other targets */
+    /* Wait for local completion */
     do {
         MPIDI_CH3I_RMA_ops_win_local_completion(win_ptr, local_completed);
 

http://git.mpich.org/mpich.git/commitdiff/d77d8d622e355f6995ddb6852d0d0be1f0711c20

commit d77d8d622e355f6995ddb6852d0d0be1f0711c20
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Fri Oct 2 13:57:16 2015 -0500

    Wait for outstanding ACKs in ending synchronization calls.
    
    When ordering of AM-based operations is not provided by network,
    the runtime needs to add an ACK_REQ when issuing each operation,
    so that any future internal FLUSH is guaranteed to be correct
    (for example, when the runtime tries to reclaim resource). In the
    ending synchronization, the runtime should wait for all ACKs to
    come back before exit, no matter whether that synchronization is
    waiting for local completion or remote completion.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 360b017..9a25b58 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -354,6 +354,8 @@ typedef struct MPIDI_Win_basic_info {
     int active; /* specify if this window is active or not */           \
     struct MPID_Win *prev;                                              \
     struct MPID_Win *next;                                              \
+    int outstanding_acks; /* keep track of # of outstanding ACKs window \
+                             wide. */                                   \
 
 extern struct MPID_Win *MPIDI_RMA_Win_active_list_head, *MPIDI_RMA_Win_inactive_list_head;
 
diff --git a/src/mpid/ch3/include/mpidrma.h b/src/mpid/ch3/include/mpidrma.h
index 1bdd393..1b1f64f 100644
--- a/src/mpid/ch3/include/mpidrma.h
+++ b/src/mpid/ch3/include/mpidrma.h
@@ -871,6 +871,9 @@ static inline int MPIDI_CH3I_RMA_Handle_ack(MPID_Win * win_ptr, int target_rank)
     t->sync.outstanding_acks--;
     MPIU_Assert(t->sync.outstanding_acks >= 0);
 
+    win_ptr->outstanding_acks--;
+    MPIU_Assert(win_ptr->outstanding_acks >= 0);
+
   fn_exit:
     return mpi_errno;
   fn_fail:
diff --git a/src/mpid/ch3/src/ch3u_rma_progress.c b/src/mpid/ch3/src/ch3u_rma_progress.c
index e5b20ed..e781e64 100644
--- a/src/mpid/ch3/src/ch3u_rma_progress.c
+++ b/src/mpid/ch3/src/ch3u_rma_progress.c
@@ -152,6 +152,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
                 if (target->sync.sync_flag == MPIDI_RMA_SYNC_FLUSH &&
                     target->num_ops_flush_not_issued > 0) {
                     flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH;
+                    win_ptr->outstanding_acks++;
                     target->sync.outstanding_acks++;
                     target->num_ops_flush_not_issued = 0;
                 }
@@ -171,6 +172,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
                 if (target->target_rank != rank) {
                     if (target->num_ops_flush_not_issued > 0) {
 
+                        win_ptr->outstanding_acks++;
                         target->sync.outstanding_acks++;
                         target->num_ops_flush_not_issued = 0;
 
@@ -199,6 +201,7 @@ static inline int check_and_switch_target_state(MPID_Win * win_ptr, MPIDI_RMA_Ta
                         flag = MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK;
                     }
                     else {
+                        win_ptr->outstanding_acks++;
                         target->sync.outstanding_acks++;
                         target->num_ops_flush_not_issued = 0;
                     }
@@ -315,6 +318,7 @@ static inline int issue_ops_target(MPID_Win * win_ptr, MPIDI_RMA_Target_t * targ
          * but without LOCK piggyback. */
         if (((flags & MPIDI_CH3_PKT_FLAG_RMA_FLUSH)
              || (flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))) {
+            win_ptr->outstanding_acks++;
             target->sync.outstanding_acks++;
             target->num_ops_flush_not_issued = 0;
         }
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 24a8bce..267524c 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -608,6 +608,13 @@ int MPID_Win_fence(int assert, MPID_Win * win_ptr)
             MPIR_ERR_POP(mpi_errno);
     }
 
+    /* waiting for all outstanding ACKs */
+    while (win_ptr->outstanding_acks > 0) {
+        mpi_errno = wait_progress_engine();
+        if (mpi_errno != MPI_SUCCESS)
+            MPIR_ERR_POP(mpi_errno);
+    }
+
     /* Cleanup all targets on window. */
     mpi_errno = MPIDI_CH3I_RMA_Cleanup_targets_win(win_ptr);
     if (mpi_errno != MPI_SUCCESS)
@@ -1007,6 +1014,13 @@ int MPID_Win_complete(MPID_Win * win_ptr)
     if (mpi_errno != MPI_SUCCESS)
         MPIR_ERR_POP(mpi_errno);
 
+    /* waiting for all outstanding ACKs */
+    while (win_ptr->outstanding_acks > 0) {
+        mpi_errno = wait_progress_engine();
+        if (mpi_errno != MPI_SUCCESS)
+            MPIR_ERR_POP(mpi_errno);
+    }
+
     /* Cleanup all targets on this window. */
     mpi_errno = MPIDI_CH3I_RMA_Cleanup_targets_win(win_ptr);
     if (mpi_errno != MPI_SUCCESS)
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 24e451f..6c570d4 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -306,6 +306,7 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
     (*win_ptr)->active = FALSE;
     (*win_ptr)->next = NULL;
     (*win_ptr)->prev = NULL;
+    (*win_ptr)->outstanding_acks = 0;
 
     /* Initialize the info flags */
     (*win_ptr)->info_args.no_locks = 0;

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

Summary of changes:
 src/mpid/ch3/include/mpidpre.h          |    2 +
 src/mpid/ch3/include/mpidrma.h          |    3 +
 src/mpid/ch3/src/ch3u_handle_recv_req.c |    3 +-
 src/mpid/ch3/src/ch3u_rma_progress.c    |    4 ++
 src/mpid/ch3/src/ch3u_rma_sync.c        |   17 +++++++-
 src/mpid/ch3/src/mpid_rma.c             |    1 +
 src/mpid/ch3/src/mpidi_printf.c         |   64 +++++++++++++++---------------
 7 files changed, 58 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list