Skip to content

Commit 9fcaac2

Browse files
committed
mtl/ofi: scope down ompi_mtl_ofi_wc to function level
Currently, ompi_mtl_ofi_wc is scoped to be thread level, but not function level, so if calls to ompi_mtl_ofi_context_progress are nested, the ompi_mtl_ofi_wc will be overwritten. In ompi_mtl_ofi_context_progress, the callback of the ofi_req extracted from the cq entry can trigger progress engine in the ssend path, in which the receiver will post a tsendmsg to sender as ack. After the callback finishes, it falls back to the original progress engine loop, then it could progress the cqe that is already finished in the callback. Signed-off-by: Shi Jin <[email protected]>
1 parent 479c746 commit 9fcaac2

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

ompi/mca/mtl/ofi/mtl_ofi.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ int ompi_mtl_ofi_progress_no_inline(void);
7474

7575
#if OPAL_HAVE_THREAD_LOCAL
7676
extern opal_thread_local int ompi_mtl_ofi_per_thread_ctx;
77-
extern opal_thread_local struct fi_cq_tagged_entry ompi_mtl_ofi_wc[MTL_OFI_MAX_PROG_EVENT_COUNT];
7877
#endif
7978

8079
#define MCA_MTL_OFI_CID_NOT_EXCHANGED 2
@@ -136,9 +135,7 @@ ompi_mtl_ofi_context_progress(int ctxt_id)
136135
ompi_mtl_ofi_request_t *ofi_req = NULL;
137136
struct fi_cq_err_entry error = { 0 };
138137
ssize_t ret;
139-
#if !OPAL_HAVE_THREAD_LOCAL
140138
struct fi_cq_tagged_entry ompi_mtl_ofi_wc[MTL_OFI_MAX_PROG_EVENT_COUNT];
141-
#endif
142139

143140
/**
144141
* Read the work completions from the CQ.

ompi/mca/mtl/ofi/mtl_ofi_component.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ static int ofi_tag_mode;
3939

4040
#if OPAL_HAVE_THREAD_LOCAL
4141
opal_thread_local int ompi_mtl_ofi_per_thread_ctx;
42-
opal_thread_local struct fi_cq_tagged_entry ompi_mtl_ofi_wc[MTL_OFI_MAX_PROG_EVENT_COUNT];
4342
#endif
4443

4544
/*

0 commit comments

Comments
 (0)