diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 15119cdbd1f..7c573763e57 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -78,7 +78,7 @@ extern opal_thread_local struct fi_cq_tagged_entry ompi_mtl_ofi_wc[MTL_OFI_MAX_P #endif #define MCA_MTL_OFI_CID_NOT_EXCHANGED 2 -#define MCA_MTL_OFI_CID_EXCHANGING 1 +#define MCA_MTL_OFI_CID_EXCHANGING 1 #define MCA_MTL_OFI_CID_EXCHANGED 0 typedef struct { @@ -598,7 +598,7 @@ ompi_mtl_ofi_post_recv_excid_buffer(bool blocking, struct ompi_communicator_t *c mca_mtl_ofi_cid_hdr_t *start = malloc(sizeof(mca_mtl_ofi_cid_hdr_t)); size_t length = sizeof(mca_mtl_ofi_cid_hdr_t); mca_mtl_comm_t *mtl_comm; - + mtl_comm = comm->c_mtl_comm; set_thread_context(ctxt_id); @@ -711,7 +711,7 @@ ompi_mtl_ofi_send_excid(struct mca_mtl_base_module_t *mtl, mca_mtl_ofi_endpoint_t *endpoint = NULL; fi_addr_t sep_peer_fiaddr = 0; mca_mtl_comm_t *mtl_comm; - + ofi_req = (ompi_mtl_ofi_request_t *)malloc(sizeof(ompi_mtl_ofi_request_t)); if (NULL == ofi_req) { ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -1661,7 +1661,7 @@ ompi_mtl_ofi_improbe_generic(struct mca_mtl_base_module_t *mtl, if (!OMPI_COMM_IS_GLOBAL_INDEX(comm)) { mtl_comm = comm->c_mtl_comm; - if ((src == MPI_ANY_SOURCE || mtl_comm->c_index_vec[src].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) + if ((src == MPI_ANY_SOURCE || mtl_comm->c_index_vec[src].c_index_state > MCA_MTL_OFI_CID_EXCHANGED) && !ompi_mtl_ofi.has_posted_initial_buffer) { ompi_mtl_ofi.has_posted_initial_buffer = true; ret = ompi_mtl_ofi_post_recv_excid_buffer(false, comm, -1); diff --git a/ompi/mca/mtl/ofi/mtl_ofi_component.c b/ompi/mca/mtl/ofi/mtl_ofi_component.c index 1f4be90119d..c8f336ca8f0 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi_component.c +++ b/ompi/mca/mtl/ofi/mtl_ofi_component.c @@ -1066,7 +1066,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads, ompi_mtl_ofi.any_addr = FI_ADDR_UNSPEC; ompi_mtl_ofi.is_initialized = false; ompi_mtl_ofi.has_posted_initial_buffer = false; - + ompi_mtl_ofi.base.mtl_flags |= MCA_MTL_BASE_FLAG_SUPPORTS_EXT_CID; return &ompi_mtl_ofi.base;