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 64b775637d138f297c87306901c0978b5e671b37 (commit) via 43da8bb0113125a4a4415ebb60cc33d38c8c0f62 (commit) from 60482cc2ca9a740d049444a9261a04a3007bc306 (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/64b775637d138f297c87306901c0978b5e... commit 64b775637d138f297c87306901c0978b5e671b37 Author: Jithin Jose <[email protected]> Date: Wed May 6 15:53:24 2015 -0700 OFI: Set address length correctly while adding to business card Signed-off-by: Jithin Jose <[email protected]> Signed-off-by: Charles J Archer <[email protected]> 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 a1e2538..dce84d0 100644 --- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c +++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c @@ -595,7 +595,7 @@ int MPID_nem_ofi_get_business_card(int my_rank ATTRIBUTE((unused)), str_errno = MPIU_Str_add_binary_arg(bc_val_p, val_max_sz_p, "OFI", - (char *) &gl_data.bound_addr, sizeof(gl_data.bound_addr)); + (char *) &gl_data.bound_addr, gl_data.bound_addrlen); if (str_errno) { MPIU_ERR_CHKANDJUMP(str_errno == MPIU_STR_NOMEM, mpi_errno, MPI_ERR_OTHER, "**buscard_len"); MPIU_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**buscard"); http://git.mpich.org/mpich.git/commitdiff/43da8bb0113125a4a4415ebb60cc33d38c... commit 43da8bb0113125a4a4415ebb60cc33d38c8c0f62 Author: Jithin Jose <[email protected]> Date: Wed May 6 15:58:22 2015 -0700 OFI: Added FI_RC_RETRY and use it for all TX/RX operations. Signed-off-by: Jithin Jose <[email protected]> Signed-off-by: Charles J Archer <[email protected]> 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 e3302ae..a1e2538 100644 --- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c +++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c @@ -108,7 +108,7 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Re MPIU_Memcpy(bc, rreq->dev.user_buf, wc->len); bc[wc->len] = '\0'; MPIU_Assert(gl_data.conn_req == rreq); - FI_RC(fi_trecv(gl_data.endpoint, + FI_RC_RETRY(fi_trecv(gl_data.endpoint, gl_data.conn_req->dev.user_buf, OFI_KVSAPPSTRLEN, gl_data.mr, @@ -228,7 +228,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R REQ_OFI(new_rreq)->vc = vc; REQ_OFI(new_rreq)->pack_buffer = pack_buffer; REQ_OFI(new_rreq)->pack_buffer_size = pkt_len; - FI_RC(fi_trecv(gl_data.endpoint, + FI_RC_RETRY(fi_trecv(gl_data.endpoint, REQ_OFI(new_rreq)->pack_buffer, REQ_OFI(new_rreq)->pack_buffer_size, gl_data.mr, @@ -240,7 +240,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R sreq->dev.next = NULL; REQ_OFI(sreq)->event_callback = MPID_nem_ofi_cts_send_callback; REQ_OFI(sreq)->parent = new_rreq; - FI_RC(fi_tsend(gl_data.endpoint, + FI_RC_RETRY(fi_tsend(gl_data.endpoint, NULL, 0, gl_data.mr, @@ -249,7 +249,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R MPIU_Assert(gl_data.persistent_req == rreq); rreq->dev.user_count = 0; - FI_RC(fi_trecv(gl_data.endpoint, + FI_RC_RETRY(fi_trecv(gl_data.endpoint, &rreq->dev.user_count, sizeof rreq->dev.user_count, gl_data.mr, @@ -318,7 +318,7 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) persistent_req->dev.next = NULL; REQ_OFI(persistent_req)->vc = NULL; REQ_OFI(persistent_req)->event_callback = MPID_nem_ofi_preposted_callback; - FI_RC(fi_trecv(gl_data.endpoint, + FI_RC_RETRY(fi_trecv(gl_data.endpoint, &persistent_req->dev.user_count, sizeof persistent_req->dev.user_count, gl_data.mr, @@ -337,7 +337,7 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused))) conn_req->dev.next = NULL; REQ_OFI(conn_req)->vc = NULL; /* We don't know the source yet */ REQ_OFI(conn_req)->event_callback = MPID_nem_ofi_conn_req_callback; - FI_RC(fi_trecv(gl_data.endpoint, + FI_RC_RETRY(fi_trecv(gl_data.endpoint, conn_req->dev.user_buf, OFI_KVSAPPSTRLEN, gl_data.mr, @@ -554,7 +554,7 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) REQ_OFI(sreq)->pack_buffer = my_bc; if (gl_data.api_set == API_SET_1) { conn_req_send_bits = init_sendtag(0, MPIR_Process.comm_world->rank, 0, MPID_CONN_REQ); - FI_RC(fi_tsend(gl_data.endpoint, + FI_RC_RETRY(fi_tsend(gl_data.endpoint, REQ_OFI(sreq)->pack_buffer, my_bc_len, gl_data.mr, @@ -562,7 +562,7 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc) conn_req_send_bits, &(REQ_OFI(sreq)->ofi_context)), tsend); } else { conn_req_send_bits = init_sendtag_2(0, 0, MPID_CONN_REQ); - FI_RC(fi_tsenddata(gl_data.endpoint, + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, REQ_OFI(sreq)->pack_buffer, my_bc_len, gl_data.mr, 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 5cab470..0aa9c4e 100644 --- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h +++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h @@ -132,6 +132,28 @@ fn_fail: \ fi_strerror(-_ret)); \ } while (0) +#define FI_RC_RETRY(FUNC,STR) \ + do { \ + ssize_t _ret; \ + do { \ + _ret = FUNC; \ + if(likely(_ret==0)) break; \ + MPIU_ERR_##CHKANDJUMP4(_ret != -FI_EAGAIN, \ + mpi_errno, \ + MPI_ERR_OTHER, \ + "**ofi_"#STR, \ + "**ofi_"#STR" %s %d %s %s", \ + __SHORT_FILE__, \ + __LINE__, \ + FCNAME, \ + fi_strerror(-_ret)); \ + mpi_errno = MPID_nem_ofi_poll(0); \ + if(mpi_errno != MPI_SUCCESS) \ + MPIU_ERR_POP(mpi_errno); \ + } while (_ret == -FI_EAGAIN); \ + } while (0) + + #define PMI_RC(FUNC,STR) \ do \ { \ 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 9352936..dcad1d4 100644 --- a/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c +++ b/src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c @@ -79,7 +79,7 @@ REQ_OFI(cts_req)->event_callback = MPID_nem_ofi_cts_recv_callback; \ REQ_OFI(cts_req)->parent = sreq; \ \ - FI_RC(fi_trecv(gl_data.endpoint, \ + FI_RC_RETRY(fi_trecv(gl_data.endpoint, \ NULL, \ 0, \ gl_data.mr, \ @@ -88,7 +88,7 @@ 0, /* Exact tag match, no ignore bits */ \ &(REQ_OFI(cts_req)->ofi_context)),trecv); \ if (gl_data.api_set == API_SET_1){ \ - FI_RC(fi_tsend(gl_data.endpoint, \ + FI_RC_RETRY(fi_tsend(gl_data.endpoint, \ &REQ_OFI(sreq)->pack_buffer_size, \ sizeof(REQ_OFI(sreq)->pack_buffer_size), \ gl_data.mr, \ @@ -96,7 +96,7 @@ match_bits, \ &(REQ_OFI(sreq)->ofi_context)),tsend); \ }else{ \ - FI_RC(fi_tsenddata(gl_data.endpoint, \ + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, \ &REQ_OFI(sreq)->pack_buffer_size, \ sizeof(REQ_OFI(sreq)->pack_buffer_size), \ gl_data.mr, \ @@ -125,7 +125,7 @@ static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre switch (wc->tag & MPID_PROTOCOL_MASK) { case MPID_MSG_CTS: vc = REQ_OFI(sreq)->vc; - FI_RC(fi_tsend(gl_data.endpoint, + FI_RC_RETRY(fi_tsend(gl_data.endpoint, REQ_OFI(sreq)->pack_buffer, REQ_OFI(sreq)->pack_buffer_size, gl_data.mr, 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 3c6140b..28d33c7 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 @@ -70,9 +70,9 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_callback)(cq_tagged_entry_t * wc, MPID_Request REQ_OFI(sync_req)->event_callback = MPID_nem_ofi_sync_recv_callback; REQ_OFI(sync_req)->parent = rreq; #if API_SET == API_SET_1 - FI_RC(fi_tsend(gl_data.endpoint, + FI_RC_RETRY(fi_tsend(gl_data.endpoint, #elif API_SET == API_SET_2 - FI_RC(fi_tsenddata(gl_data.endpoint, + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, #endif NULL, 0, @@ -168,7 +168,7 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc, ssend_match = init_recvtag_2(&ssend_mask, comm->context_id + context_offset, tag); #endif ssend_match |= MPID_SYNC_SEND_ACK; - FI_RC(fi_trecv(gl_data.endpoint, /* endpoint */ + FI_RC_RETRY(fi_trecv(gl_data.endpoint, /* endpoint */ NULL, /* recvbuf */ 0, /* data sz */ gl_data.mr, /* dynamic mr */ @@ -178,9 +178,9 @@ ADD_SUFFIX(do_isend)(struct MPIDI_VC *vc, &(REQ_OFI(sync_req)->ofi_context)), trecv); } #if API_SET == API_SET_1 - FI_RC(fi_tsend(gl_data.endpoint, /* Endpoint */ + FI_RC_RETRY(fi_tsend(gl_data.endpoint, /* Endpoint */ #elif API_SET == API_SET_2 - FI_RC(fi_tsenddata(gl_data.endpoint, /* Endpoint */ + FI_RC_RETRY(fi_tsenddata(gl_data.endpoint, /* Endpoint */ #endif send_buffer, /* Send buffer(packed or user) */ data_sz, /* Size of the send */ @@ -333,7 +333,7 @@ int ADD_SUFFIX(MPID_nem_ofi_recv_posted)(struct MPIDI_VC *vc, struct MPID_Reques msg.ignore = mask_bits; msg.context = (void *) &(REQ_OFI(rreq)->ofi_context); msg.data = 0; - FI_RC(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv); + FI_RC_RETRY(fi_trecvmsg(gl_data.endpoint,&msg,msgflags), trecv); END_FUNC_RC(FCNAME); } ----------------------------------------------------------------------- Summary of changes: src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c | 18 ++++++++-------- .../ch3/channels/nemesis/netmod/ofi/ofi_impl.h | 22 ++++++++++++++++++++ src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c | 8 +++--- .../nemesis/netmod/ofi/ofi_tagged_template.c | 12 +++++----- 4 files changed, 41 insertions(+), 19 deletions(-) hooks/post-receive -- MPICH primary repository