diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 45a66673d1..d4c5f8a7b6 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -1003,8 +1003,11 @@ ompi_mtl_ofi_cancel(struct mca_mtl_base_module_t *mtl, */ while (!ofi_req->super.ompi_req->req_status._cancelled) { opal_progress(); + if (ofi_req->req_started) + goto ofi_cancel_not_possible; } } else { +ofi_cancel_not_possible: /** * Could not cancel the request. */