[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2-241-g54f737a

Service Account noreply at mpich.org
Fri Apr 1 09:02:51 CDT 2016


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  54f737a842003d9838c5c48742c410c0befffe14 (commit)
      from  d677b7d4009a9e9a3f9605863d3edf96d78aab70 (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/54f737a842003d9838c5c48742c410c0befffe14

commit 54f737a842003d9838c5c48742c410c0befffe14
Author: Mikhail Shiryaev <mikhail.shiryaev at intel.com>
Date:   Mon Mar 28 18:32:56 2016 +0300

    OFI-netmod: fix mprobe/mrecv functionality
    
    Change-Id: I931d718a4df83b43d6d9dda23d164983ecad192b

diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
index 0cb92dc..8b3c34f 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
@@ -234,6 +234,7 @@ fn_fail:                      \
 
 #define PEEK_INIT      0
 #define PEEK_FOUND     1
+#define PEEK_NOT_FOUND 2
 
 #define MEM_TAG_FORMAT (0xFFFF00000000LLU)
 /* ******************************** */
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
index afe97b1..4de25f0 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c
@@ -51,7 +51,9 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
 
     BEGIN_FUNC(FCNAME);
     if (rreq_ptr) {
-        MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_exit);
+        MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_create_req(&rreq, 1));
+        rreq->kind = MPID_REQUEST_RECV;
+
         *rreq_ptr = rreq;
         rreq->comm = comm;
         rreq->dev.match.parts.rank = source;
@@ -63,6 +65,8 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
         rreq = &rreq_s;
         rreq->dev.OnDataAvail = NULL;
     }
+
+    REQ_OFI(rreq)->pack_buffer    = NULL;
     REQ_OFI(rreq)->event_callback = ADD_SUFFIX(peek_callback);
     REQ_OFI(rreq)->match_state    = PEEK_INIT;
     OFI_ADDR_INIT(source, vc, remote_proc);
@@ -108,7 +112,21 @@ int ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(struct MPIDI_VC *vc,
 
     while (PEEK_INIT == REQ_OFI(rreq)->match_state)
         MPID_nem_ofi_poll(MPID_BLOCKING_POLL);
-    *status = rreq->status;
+
+    if (PEEK_NOT_FOUND == REQ_OFI(rreq)->match_state) {
+        if (rreq_ptr) {
+            MPID_Request_release(rreq);
+            *rreq_ptr = NULL;
+            *flag = 0;
+        }
+        MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
+        goto fn_exit;
+    }
+
+    if (status != MPI_STATUS_IGNORE)
+        *status = rreq->status;
+
+    MPIR_Request_add_ref(rreq);
     *flag = 1;
     END_FUNC_RC(FCNAME);
 }
@@ -142,7 +160,7 @@ int ADD_SUFFIX(MPID_nem_ofi_improbe)(struct MPIDI_VC *vc,
     int old_error = status->MPI_ERROR;
     int s;
     BEGIN_FUNC(FCNAME);
-    *flag = NORMAL_PEEK;
+    *flag = CLAIM_PEEK;
     s = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source,
                                              tag, comm, context_offset, flag, status, message);
     if (*flag) {
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
index 73627a7..f48e021 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
@@ -110,6 +110,10 @@ int MPID_nem_ofi_poll(int in_blocking_poll)
 			req = context_to_req(error.op_context);
 			MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE);
 		}
+                else if (error.err == FI_ENOMSG) {
+                        req = context_to_req(error.op_context);
+                        REQ_OFI(req)->match_state = PEEK_NOT_FOUND;
+                }
 		else {
                         mpi_errno = MPI_ERR_OTHER;
 		}
diff --git a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
index f57ceee..0875ee7 100644
--- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
+++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c
@@ -390,7 +390,9 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
     /* ------------------------ */
     /* Initialize the request   */
     /* ------------------------ */
-    MPID_nem_ofi_init_req(rreq);
+    if (REQ_OFI(rreq)->match_state != PEEK_FOUND)
+        MPID_nem_ofi_init_req(rreq);
+
     REQ_OFI(rreq)->event_callback = ADD_SUFFIX(MPID_nem_ofi_recv_callback);
     REQ_OFI(rreq)->vc = vc;
 
@@ -427,10 +429,12 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques
     msg_tagged_t msg;
     iov.iov_base = recv_buffer;
     iov.iov_len  = data_sz;
-    if(REQ_OFI(rreq)->match_state == PEEK_FOUND)
-      msgflags = FI_CLAIM;
+    if (REQ_OFI(rreq)->match_state == PEEK_FOUND) {
+        msgflags = FI_CLAIM;
+        REQ_OFI(rreq)->match_state = PEEK_INIT;
+    }
     else
-      msgflags = 0ULL;
+        msgflags = 0ULL;
 
     msg.msg_iov   = &iov;
     msg.desc      = NULL;

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

Summary of changes:
 .../ch3/channels/nemesis/netmod/ofi/ofi_impl.h     |    1 +
 .../nemesis/netmod/ofi/ofi_probe_template.c        |   24 +++++++++++++++++--
 .../ch3/channels/nemesis/netmod/ofi/ofi_progress.c |    4 +++
 .../nemesis/netmod/ofi/ofi_tagged_template.c       |   12 ++++++---
 4 files changed, 34 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list