Add new loop mode OPAL_EVLOOP_ONELOOP that behaved like OPAL_EVLOOP_ONCE
did pre-libevent update. The problem is that the behavior of OPAL_EVLOOP_ONCE was changed by the OMPI team, which them broke things during the update, so it had to be reverted to the old meaning of loop until one event occurs. OPAL_EVLOOP_ONELOOP will go through the event loop once (like EVLOOP_NONBLOCK) but will pause in the event library for a bit (like EVLOOP_ONCE). fixes trac:234 This commit was SVN r11081. The following Trac tickets were found above: Ticket 234 --> https://svn.open-mpi.org/trac/ompi/ticket/234
Этот коммит содержится в:
родитель
7aac77a37c
Коммит
a84e557815
@ -114,17 +114,19 @@ int ompi_mpi_finalize(void)
|
||||
/* Proceed with MPI_FINALIZE */
|
||||
|
||||
ompi_mpi_finalized = true;
|
||||
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
opal_progress_events(OPAL_EVLOOP_NONBLOCK);
|
||||
opal_progress_events(OPAL_EVLOOP_ONELOOP);
|
||||
#endif
|
||||
|
||||
/* Change progress function priority back to RTE level stuff */
|
||||
opal_progress_mpi_disable();
|
||||
|
||||
/* If maffinity was setup, tear it down */
|
||||
if (ompi_mpi_maffinity_setup) {
|
||||
opal_maffinity_base_close();
|
||||
}
|
||||
|
||||
/* Change progress function priority back to RTE level stuff */
|
||||
opal_progress_mpi_disable();
|
||||
|
||||
/* begin recording compound command */
|
||||
/* if (OMPI_SUCCESS != (ret = orte_gpr.begin_compound_cmd())) {
|
||||
return ret;
|
||||
|
@ -591,11 +591,6 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* BWB - is this still needed? */
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
opal_progress_events(OPAL_EVLOOP_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* Second barrier -- wait for message from
|
||||
RMGR_PROC_STAGE_GATE_MGR to arrive */
|
||||
|
||||
@ -624,6 +619,12 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if OMPI_ENABLE_PROGRESS_THREADS == 0
|
||||
/* switch from letting us sit in the event library for a bit each
|
||||
time through opal_progress() to completely non-blocking */
|
||||
opal_progress_events(OPAL_EVLOOP_NONBLOCK);
|
||||
#endif
|
||||
|
||||
/* put the event library in "high performance MPI mode" */
|
||||
if (OMPI_SUCCESS != opal_progress_mpi_enable()) {
|
||||
error = "opal_progress_mpi_enable() failed";
|
||||
|
@ -609,7 +609,8 @@ opal_event_base_loop(struct event_base *base, int flags)
|
||||
opal_event_process_active(base);
|
||||
if (!base->event_count_active && (flags & OPAL_EVLOOP_ONCE))
|
||||
done = 1;
|
||||
} else if (flags & OPAL_EVLOOP_NONBLOCK)
|
||||
} else if ((flags & OPAL_EVLOOP_NONBLOCK) ||
|
||||
(flags & OPAL_EVLOOP_ONELOOP))
|
||||
done = 1;
|
||||
|
||||
if (evsel->recalc(base, evbase, 0) == -1) {
|
||||
|
@ -174,6 +174,10 @@ int opal_event_base_set(struct event_base *, struct opal_event *);
|
||||
|
||||
#define OPAL_EVLOOP_ONCE 0x01
|
||||
#define OPAL_EVLOOP_NONBLOCK 0x02
|
||||
/* run once through the loop, but do have the default timeout.
|
||||
Need to be both something special *AND* EVLOOP_ONCE */
|
||||
#define OPAL_EVLOOP_ONELOOP 0x03
|
||||
|
||||
OMPI_DECLSPEC int opal_event_loop(int);
|
||||
int opal_event_base_loop(struct event_base *, int);
|
||||
int opal_event_loopexit(struct timeval *); /* Causes the loop to exit */
|
||||
|
@ -33,7 +33,7 @@
|
||||
/*
|
||||
* default parameters
|
||||
*/
|
||||
static int opal_progress_event_flag = OPAL_EVLOOP_ONCE;
|
||||
static int opal_progress_event_flag = OPAL_EVLOOP_ONELOOP;
|
||||
#if OPAL_PROGRESS_USE_TIMERS
|
||||
static const opal_timer_t opal_progress_default_tick_rate = 10000; /* 10ms */
|
||||
#else
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user