Skip to content

Commit f22d897

Browse files
committed
ompi/runtime: add instead of set opal_progress_event_flags
Currently, ompi_mpi_init() call opal_progress_set_event_flag(OPAL_EVLOOP_NONBLOCK), whith the intention to ensure OPAL_EVLOOP_NONBLOCK is set in opal_progress_event_flag. However, this call will remove other existing flags (like OPAL_EVLOOP_ONCE) in opal_progress_event_flag, which can cause deadlock. This patch address the issue by adding OPAL_EVLOOP_NONBLOCK to that flag. Signed-off-by: Wei Zhang <[email protected]>
1 parent fce9e93 commit f22d897

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
999999
CPU utilization for the remainder of MPI_INIT when we are
10001000
blocking on RTE-level events, but may greatly reduce non-TCP
10011001
latency. */
1002-
opal_progress_set_event_flag(OPAL_EVLOOP_NONBLOCK);
1002+
int old_event_flags = opal_progress_set_event_flag(0);
1003+
opal_progress_set_event_flag(old_event_flags | OPAL_EVLOOP_NONBLOCK);
10031004
#endif
10041005

10051006
/* wire up the mpi interface, if requested. Do this after the

0 commit comments

Comments
 (0)