diff --git a/ompi/mca/mtl/ofi/mtl_ofi.h b/ompi/mca/mtl/ofi/mtl_ofi.h index 539533e73b..e62c5b8225 100644 --- a/ompi/mca/mtl/ofi/mtl_ofi.h +++ b/ompi/mca/mtl/ofi/mtl_ofi.h @@ -1013,8 +1013,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. */