Minor fixes so orte_progress_thread can work
This commit was SVN r26248.
Этот коммит содержится в:
родитель
f09e3ce5a4
Коммит
48de3a2501
@ -59,6 +59,15 @@ int orte_finalize(void)
|
||||
/* close the orte_show_help system */
|
||||
orte_show_help_finalize();
|
||||
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT && ORTE_ENABLE_PROGRESS_THREAD
|
||||
if (ORTE_PROC_IS_APP) {
|
||||
/* stop the progress thread */
|
||||
orte_event_base_active = false;
|
||||
opal_thread_join(&orte_progress_thread, NULL);
|
||||
OBJ_DESTRUCT(&orte_progress_thread);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* call the finalize function for this environment */
|
||||
orte_ess.finalize();
|
||||
|
||||
|
@ -133,6 +133,8 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT && ORTE_ENABLE_PROGRESS_THREAD
|
||||
/* get a separate orte event base */
|
||||
orte_event_base = opal_event_base_create();
|
||||
/* construct the thread object */
|
||||
OBJ_CONSTRUCT(&orte_progress_thread, opal_thread_t);
|
||||
/* fork off a thread to progress it */
|
||||
orte_progress_thread.t_run = orte_progress_thread_engine;
|
||||
if (OPAL_SUCCESS != (ret = opal_thread_start(&orte_progress_thread))) {
|
||||
@ -172,7 +174,7 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT && ORTE_ENABLE_PROGRESS_THREAD
|
||||
static void* orte_progress_thread_engine(opal_object_t *obj)
|
||||
{
|
||||
while (orte_event_base->active) {
|
||||
while (orte_event_base_active) {
|
||||
opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE);
|
||||
}
|
||||
return OPAL_THREAD_CANCELLED;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user