[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-98-g93b114e

Service Account noreply at mpich.org
Mon Jun 15 14:37:53 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  93b114e3437d991eed22af6b9e2aede3d330401b (commit)
       via  9d3ddf8a530bf146228acd36a866a138fbf6966b (commit)
       via  2ae64ae52299d5448ab500659dc3ac6f6f146ed4 (commit)
       via  266a3adfb88d3338b4b2a9b61aff02a018997250 (commit)
      from  9d508d5d83f35978ffaaae1557280969ff47201c (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/93b114e3437d991eed22af6b9e2aede3d330401b

commit 93b114e3437d991eed22af6b9e2aede3d330401b
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Sun Jun 14 14:58:35 2015 -0500

    Bug-fix in Request_load_recv_iov() when initial value of segment_first is not 0.
    
    Originally Request_load_recv_iov() function assumes that
    the initial value of req->dev.segment_first is always zero,
    which is not correct if we set it to a non-zero value for
    streaming the RMA operations.
    
    The way Request_load_recv_iov() works is that, it is triggered
    multiple times for the same receiving request until all data is
    received. During this process, req->dev.segment_first is rewritten
    to the current offset value. When the initial value of
    req->dev.segment_first is non-zero, we need another variable
    to store that value until the receiving process for this request
    is finished. Here we use a static variable in this function to
    reach the purpose.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/src/ch3u_request.c b/src/mpid/ch3/src/ch3u_request.c
index 0be196d..b2cd014 100644
--- a/src/mpid/ch3/src/ch3u_request.c
+++ b/src/mpid/ch3/src/ch3u_request.c
@@ -300,6 +300,8 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
     return mpi_errno;
 }
 
+#define MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET (-1)
+
 /*
  * MPIDI_CH3U_Request_load_recv_iov()
  *
@@ -315,10 +317,16 @@ int MPIDI_CH3U_Request_load_send_iov(MPID_Request * const sreq,
 int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 {
     MPI_Aint last;
+    static MPIDI_msg_sz_t orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
     int mpi_errno = MPI_SUCCESS;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_RECV_IOV);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_REQUEST_LOAD_RECV_IOV);
+
+    if (orig_segment_first == MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET) {
+        orig_segment_first = rreq->dev.segment_first;
+    }
+
     if (rreq->dev.segment_first < rreq->dev.segment_size)
     {
 	/* still reading data that needs to go into the user buffer */
@@ -351,14 +359,15 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	    rreq->dev.iov[0].MPID_IOV_LEN = data_sz;
             rreq->dev.iov_offset = 0;
 	    rreq->dev.iov_count = 1;
-	    MPIU_Assert(rreq->dev.segment_first + data_sz + 
+	    MPIU_Assert(rreq->dev.segment_first - orig_segment_first + data_sz +
 			rreq->dev.tmpbuf_off <= rreq->dev.recv_data_sz);
-	    if (rreq->dev.segment_first + data_sz + rreq->dev.tmpbuf_off == 
+	    if (rreq->dev.segment_first - orig_segment_first + data_sz + rreq->dev.tmpbuf_off ==
 		rreq->dev.recv_data_sz)
 	    {
 		MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
 		  "updating rreq to read the remaining data into the SRBuf");
 		rreq->dev.OnDataAvail = MPIDI_CH3_ReqHandler_UnpackSRBufComplete;
+                orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
 	    }
 	    else
 	    {
@@ -407,12 +416,13 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
         }
 	/* --END ERROR HANDLING-- */
 
-	if (last == rreq->dev.recv_data_sz)
+	if (last == rreq->dev.recv_data_sz + orig_segment_first)
 	{
 	    MPIU_DBG_MSG(CH3_CHANNEL,VERBOSE,
      "updating rreq to read the remaining data directly into the user buffer");
 	    /* Eventually, use OnFinal for this instead */
 	    rreq->dev.OnDataAvail = rreq->dev.OnFinal;
+            orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
 	}
 	else if (MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_ACCUM_RECV ||
                  MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_GET_ACCUM_RECV ||
@@ -484,6 +494,7 @@ int MPIDI_CH3U_Request_load_recv_iov(MPID_Request * const rreq)
 	    MPIU_Assert(MPIDI_Request_get_type(rreq) == MPIDI_REQUEST_TYPE_RECV);
 	    /* Eventually, use OnFinal for this instead */
 	    rreq->dev.OnDataAvail = rreq->dev.OnFinal;
+            orig_segment_first = MPIDI_LOAD_RECV_IOV_ORIG_SEGMENT_FIRST_UNSET;
 	}
 	else
 	{

http://git.mpich.org/mpich.git/commitdiff/9d3ddf8a530bf146228acd36a866a138fbf6966b

commit 9d3ddf8a530bf146228acd36a866a138fbf6966b
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Sun Jun 14 11:37:17 2015 -0500

    Bug-fix in calculating streaming size in GetAccumulate pkt handler.
    
    In this patch, we fix the mistakes in calculating the streaming
    size in GetAccumulate pkt handler on the target side. The original
    code has two mistakes here:
    
    1. The original code use the size and extent of the target datatype,
       which is wrong. Here we should use the size / extent of the basic
       type in the target datatype.
    
    2. The original code always use the total data size to calculate
       the current streaming size, which is wrong. Here we should use
       the current rest data size to calculate.
    
    This patch fixes these two issues.
    
    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 2eddc41..981f877 100644
--- a/src/mpid/ch3/src/ch3u_handle_recv_req.c
+++ b/src/mpid/ch3/src/ch3u_handle_recv_req.c
@@ -264,13 +264,22 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
     }
     MPIU_Assert(basic_type != MPI_DATATYPE_NULL);
 
+    if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) {
+        MPIU_Assert(rreq->dev.ext_hdr_ptr != NULL);
+        stream_offset = ((MPIDI_CH3_Ext_pkt_get_accum_t *) rreq->dev.ext_hdr_ptr)->stream_offset;
+    }
+    else {
+        stream_offset = 0;
+    }
+
     /* Use target data to calculate current stream unit size */
     MPID_Datatype_get_size_macro(rreq->dev.datatype, type_size);
     total_len = type_size * rreq->dev.user_count;
-    MPID_Datatype_get_extent_macro(rreq->dev.datatype, extent);
-    stream_data_len = MPIR_MIN(total_len, (MPIDI_CH3U_SRBuf_size / extent) * type_size);
-
     MPID_Datatype_get_size_macro(basic_type, predef_dtp_size);
+    MPID_Datatype_get_extent_macro(basic_type, extent);
+    stream_data_len = MPIR_MIN(total_len - (stream_offset / extent) * predef_dtp_size,
+                               (MPIDI_CH3U_SRBuf_size / extent) * predef_dtp_size);
+
     predef_count = stream_data_len / predef_dtp_size;
     MPIU_Assert(predef_count > 0);
 
@@ -285,14 +294,6 @@ int MPIDI_CH3_ReqHandler_GaccumRecvComplete(MPIDI_VC_t * vc, MPID_Request * rreq
         (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_UNLOCK))
         get_accum_resp_pkt->flags |= MPIDI_CH3_PKT_FLAG_RMA_FLUSH_ACK;
 
-    if (rreq->dev.flags & MPIDI_CH3_PKT_FLAG_RMA_STREAM) {
-        MPIU_Assert(rreq->dev.ext_hdr_ptr != NULL);
-        stream_offset = ((MPIDI_CH3_Ext_pkt_get_accum_t *) rreq->dev.ext_hdr_ptr)->stream_offset;
-    }
-    else {
-        stream_offset = 0;
-    }
-
     /* check if data is contiguous and get true lb */
     MPID_Datatype_is_contig(rreq->dev.datatype, &is_contig);
     MPID_Datatype_get_true_lb(rreq->dev.datatype, &dt_true_lb);

http://git.mpich.org/mpich.git/commitdiff/2ae64ae52299d5448ab500659dc3ac6f6f146ed4

commit 2ae64ae52299d5448ab500659dc3ac6f6f146ed4
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Sun Jun 14 11:48:58 2015 -0500

    Use MPIDI_msg_sz_t instead of int for orig_segment_first.
    
    Here we assign req->dev.segment_first to orig_segment_first.
    Since req->dev.segment_first is a MPIDI_msg_sz_t type, we should
    use the same type for orig_segment_first.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
index fb14c55..b7770fb 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3i_eagernoncontig.c
@@ -22,7 +22,7 @@ int MPIDI_CH3I_SendNoncontig( MPIDI_VC_t *vc, MPID_Request *sreq, void *header,
 {
     int mpi_errno = MPI_SUCCESS;
     int again = 0;
-    int orig_segment_first = sreq->dev.segment_first;
+    MPIDI_msg_sz_t orig_segment_first = sreq->dev.segment_first;
     MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);
 
     MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SENDNONCONTIG);

http://git.mpich.org/mpich.git/commitdiff/266a3adfb88d3338b4b2a9b61aff02a018997250

commit 266a3adfb88d3338b4b2a9b61aff02a018997250
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Sun Jun 14 21:31:30 2015 -0500

    Increase time limit of test/mpi/rma/atomic_get test to 5 min.
    
    This test occasionally run more than 3 min (default time limit)
    on OFI platform. This patch increases the time limit to 5 min.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index 475cc43..fbf65cc 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -131,7 +131,7 @@ at_complete 2
 atomic_rmw_fop 3
 atomic_rmw_cas 3
 atomic_rmw_gacc 3
-atomic_get 3 mpiversion=3.0
+atomic_get 3 mpiversion=3.0 timeLimit=300
 aint 2 mpiversion=3.1
 acc-pairtype 2
 manyget 2

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

Summary of changes:
 .../ch3/channels/nemesis/src/ch3i_eagernoncontig.c |    2 +-
 src/mpid/ch3/src/ch3u_handle_recv_req.c            |   23 ++++++++++---------
 src/mpid/ch3/src/ch3u_request.c                    |   17 ++++++++++++--
 test/mpi/rma/testlist.in                           |    2 +-
 4 files changed, 28 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list