Skip to content

Commit 8744320

Browse files
author
Ralph Castain
authored
Merge pull request #5476 from nrspruit/ns_cancel_fix
MTL OFI: Fix Deadlock in fi_cancel given completion during cancel
2 parents f614438 + 767135c commit 8744320

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,8 +1013,11 @@ ompi_mtl_ofi_cancel(struct mca_mtl_base_module_t *mtl,
10131013
*/
10141014
while (!ofi_req->super.ompi_req->req_status._cancelled) {
10151015
opal_progress();
1016+
if (ofi_req->req_started)
1017+
goto ofi_cancel_not_possible;
10161018
}
10171019
} else {
1020+
ofi_cancel_not_possible:
10181021
/**
10191022
* Could not cancel the request.
10201023
*/

0 commit comments

Comments
 (0)