Changeset 9a8c8b


Ignore:
Timestamp:
01/18/17 19:47:47 (10 months ago)
Author:
Pavan Balaji <balaji@…>
Branches:
3.2.x
Children:
e9eaec5
Parents:
15218a
git-author:
Mikhail Shiryaev <mikhail.shiryaev@…> (03/28/16 10:32:56)
git-committer:
Pavan Balaji <balaji@…> (01/18/17 19:47:47)
Message:

OFI-netmod: fix mprobe/mrecv functionality

Change-Id: I931d718a4df83b43d6d9dda23d164983ecad192b

Location:
src/mpid/ch3/channels/nemesis/netmod/ofi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h

    re3df9d r9a8c8b  
    235235#define PEEK_INIT      0 
    236236#define PEEK_FOUND     1 
     237#define PEEK_NOT_FOUND 2 
    237238 
    238239#define MEM_TAG_FORMAT (0xFFFF00000000LLU) 
  • src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_probe_template.c

    r02b3a8 r9a8c8b  
    5252    BEGIN_FUNC(FCNAME); 
    5353    if (rreq_ptr) { 
    54         MPIDI_Request_create_rreq(rreq, mpi_errno, goto fn_exit); 
     54        MPIDI_CH3I_NM_OFI_RC(MPID_nem_ofi_create_req(&rreq, 1)); 
     55        rreq->kind = MPID_REQUEST_RECV; 
     56 
    5557        *rreq_ptr = rreq; 
    5658        rreq->comm = comm; 
     
    6466        rreq->dev.OnDataAvail = NULL; 
    6567    } 
     68 
     69    REQ_OFI(rreq)->pack_buffer    = NULL; 
    6670    REQ_OFI(rreq)->event_callback = ADD_SUFFIX(peek_callback); 
    6771    REQ_OFI(rreq)->match_state    = PEEK_INIT; 
     
    109113    while (PEEK_INIT == REQ_OFI(rreq)->match_state) 
    110114        MPID_nem_ofi_poll(MPID_BLOCKING_POLL); 
    111     *status = rreq->status; 
     115 
     116    if (PEEK_NOT_FOUND == REQ_OFI(rreq)->match_state) { 
     117        if (rreq_ptr) { 
     118            MPID_Request_release(rreq); 
     119            *rreq_ptr = NULL; 
     120            *flag = 0; 
     121        } 
     122        MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL); 
     123        goto fn_exit; 
     124    } 
     125 
     126    if (status != MPI_STATUS_IGNORE) 
     127        *status = rreq->status; 
     128 
     129    MPIR_Request_add_ref(rreq); 
    112130    *flag = 1; 
    113131    END_FUNC_RC(FCNAME); 
     
    143161    int s; 
    144162    BEGIN_FUNC(FCNAME); 
    145     *flag = NORMAL_PEEK; 
     163    *flag = CLAIM_PEEK; 
    146164    s = ADD_SUFFIX(MPID_nem_ofi_iprobe_impl)(vc, source, 
    147165                                             tag, comm, context_offset, flag, status, message); 
  • src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c

    r05a87d2 r9a8c8b  
    111111                        MPIR_STATUS_SET_CANCEL_BIT(req->status, TRUE); 
    112112                } 
     113                else if (error.err == FI_ENOMSG) { 
     114                        req = context_to_req(error.op_context); 
     115                        REQ_OFI(req)->match_state = PEEK_NOT_FOUND; 
     116                } 
    113117                else { 
    114118                        mpi_errno = MPI_ERR_OTHER; 
  • src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged_template.c

    re3df9d r9a8c8b  
    392392    /* Initialize the request   */ 
    393393    /* ------------------------ */ 
    394     MPID_nem_ofi_init_req(rreq); 
     394    if (REQ_OFI(rreq)->match_state != PEEK_FOUND) 
     395        MPID_nem_ofi_init_req(rreq); 
     396 
    395397    REQ_OFI(rreq)->event_callback = ADD_SUFFIX(MPID_nem_ofi_recv_callback); 
    396398    REQ_OFI(rreq)->vc = vc; 
     
    429431    iov.iov_base = recv_buffer; 
    430432    iov.iov_len  = data_sz; 
    431     if(REQ_OFI(rreq)->match_state == PEEK_FOUND) 
    432       msgflags = FI_CLAIM; 
     433    if (REQ_OFI(rreq)->match_state == PEEK_FOUND) { 
     434        msgflags = FI_CLAIM; 
     435        REQ_OFI(rreq)->match_state = PEEK_INIT; 
     436    } 
    433437    else 
    434       msgflags = 0ULL; 
     438        msgflags = 0ULL; 
    435439 
    436440    msg.msg_iov   = &iov; 
Note: See TracChangeset for help on using the changeset viewer.