Skip to content

Commit 5257cc3

Browse files
authored
Merge pull request #9480 from wzamazon/evloop_once
2 parents 4b50f26 + f22d897 commit 5257cc3

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
10091009
CPU utilization for the remainder of MPI_INIT when we are
10101010
blocking on RTE-level events, but may greatly reduce non-TCP
10111011
latency. */
1012-
opal_progress_set_event_flag(OPAL_EVLOOP_NONBLOCK);
1012+
int old_event_flags = opal_progress_set_event_flag(0);
1013+
opal_progress_set_event_flag(old_event_flags | OPAL_EVLOOP_NONBLOCK);
10131014
#endif
10141015

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

opal/runtime/opal_progress.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,19 @@ OPAL_DECLSPEC int opal_progress(void);
6666
* Control how the event library is called
6767
*
6868
* Adjust the flags argument used to call opal_event_loop() from
69-
* opal_progress(). The default argument is OPAL_EVLOOP_ONELOOP,
70-
* meaning that the call to opal_event_loop() will block pending
71-
* events, but may block for a period of time.
69+
* opal_progress(). The default argument is
7270
*
73-
* @param flags One of the valid vlags argument to
71+
* OPAL_EVLOOP_NONBLOCK | OPAL_EVLOOP_ONCE
72+
*
73+
* OPAL_EVLOOP_NONBLOCK means that if there is no active events,
74+
* opal_event_loop() should return immediately (instead of
75+
* waiting for active events).
76+
*
77+
* OPAL_EVLOOP_ONCE means opal_event_loop() should onlyrun one
78+
* iteration, which includes poll the event queue and process
79+
* the active events.
80+
*
81+
* @param flags One of the valid flags argument to
7482
* opal_event_loop().
7583
* @return Previous value of flags used to call
7684
* opal_event_loop().

0 commit comments

Comments
 (0)