From fa4c2af9edea6752378ce357708ccf5d0c3be93b Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Wed, 5 Sep 2012 19:36:19 +0000 Subject: [PATCH] THe Portals 4 reference implementation will sometimes return a NI_FLOWCTL for both a send and an ack. I'm not sure whether this violates the spec, so work around until we decide... This commit was SVN r27244. --- ompi/mca/mtl/portals4/mtl_portals4_flowctl.h | 1 + ompi/mca/mtl/portals4/mtl_portals4_send.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ompi/mca/mtl/portals4/mtl_portals4_flowctl.h b/ompi/mca/mtl/portals4/mtl_portals4_flowctl.h index d7bf30df66..d6242c5d02 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_flowctl.h +++ b/ompi/mca/mtl/portals4/mtl_portals4_flowctl.h @@ -25,6 +25,7 @@ struct ompi_mtl_portals4_pending_request_t { int contextid; int tag; int my_rank; + int fc_notified; struct mca_mtl_base_endpoint_t *endpoint; struct ompi_mtl_portals4_isend_request_t *ptl_request; }; diff --git a/ompi/mca/mtl/portals4/mtl_portals4_send.c b/ompi/mca/mtl/portals4/mtl_portals4_send.c index 7d69cd782a..9ba589c71e 100644 --- a/ompi/mca/mtl/portals4/mtl_portals4_send.c +++ b/ompi/mca/mtl/portals4/mtl_portals4_send.c @@ -47,8 +47,14 @@ ompi_mtl_portals4_callback(ptl_event_t *ev, ptl_request->pending; OPAL_OUTPUT_VERBOSE((10, ompi_mtl_base_output, - "send %lu hit flow control", - ptl_request->opcount)); + "send %lu hit flow control (%d)", + ptl_request->opcount, ev->type)); + + /* BWB: FIX ME: this is a hack.. */ + if (pending->fc_notified) { + return; + } + pending->fc_notified = 1; if (!PtlHandleIsEqual(ptl_request->me_h, PTL_INVALID_HANDLE)) { ret = PtlMEUnlink(ptl_request->me_h); @@ -414,6 +420,7 @@ ompi_mtl_portals4_send_start(struct mca_mtl_base_module_t* mtl, pending->contextid = comm->c_contextid; pending->tag = tag; pending->my_rank = comm->c_my_rank; + pending->fc_notified = 0; pending->endpoint = endpoint; pending->ptl_request = ptl_request;