diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index e6f47463e1..83e6952ed8 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -556,6 +556,7 @@ void mca_btl_openib_endpoint_cpc_complete(mca_btl_openib_endpoint_t *endpoint) { /* If the CPC uses the CTS protocol, then start it up */ if (endpoint->endpoint_local_cpc->cbm_uses_cts) { + int transport_type_ib_p = 0; /* Post our receives, which will make credit management happy (i.e., rd_credits will be 0) */ if (OMPI_SUCCESS != mca_btl_openib_endpoint_post_recvs(endpoint)) { @@ -571,14 +572,15 @@ void mca_btl_openib_endpoint_cpc_complete(mca_btl_openib_endpoint_t *endpoint) receives this side's CTS). Also send the CTS if we already received the peer's CTS (e.g., if this process was slow to call cpc_complete(). */ +#if defined(HAVE_STRUCT_IBV_DEVICE_TRANSPORT_TYPE) + transport_type_ib_p = (IBV_TRANSPORT_IB == endpoint->endpoint_btl->device->ib_dev->transport_type); +#endif OPAL_OUTPUT((-1, "cpc_complete to peer %s: is IB %d, initiatior %d, cts received: %d", endpoint->endpoint_proc->proc_ompi->proc_hostname, - (IBV_TRANSPORT_IB == - endpoint->endpoint_btl->device->ib_dev->transport_type), + transport_type_ib_p, endpoint->endpoint_initiator, endpoint->endpoint_cts_received)); - if (IBV_TRANSPORT_IB == - endpoint->endpoint_btl->device->ib_dev->transport_type || + if (transport_type_ib_p || endpoint->endpoint_initiator || endpoint->endpoint_cts_received) { mca_btl_openib_endpoint_send_cts(endpoint);