1
1

Need to have the event thread running during init/finalize, but we still have a problem with cleanup - so comment out the event_base_free for now.

This commit was SVN r27738.
Этот коммит содержится в:
Ralph Castain 2013-01-03 02:16:57 +00:00
родитель c65de32218
Коммит 81a8e21939
2 изменённых файлов: 20 добавлений и 24 удалений

Просмотреть файл

@ -63,18 +63,6 @@ int orte_finalize(void)
/* set the flag indicating we are finalizing */
orte_finalizing = true;
#if ORTE_ENABLE_PROGRESS_THREADS
/* stop the progress thread */
orte_event_base_active = false;
/* break the event loop */
opal_event_base_loopbreak(orte_event_base);
/* wait for thread to exit */
opal_thread_join(&orte_progress_thread, NULL);
OBJ_DESTRUCT(&orte_progress_thread);
/* release the event base */
opal_event_base_free(orte_event_base);
#endif
/* close the orte_show_help system */
orte_show_help_finalize();
@ -84,6 +72,18 @@ int orte_finalize(void)
/* close the ess itself */
orte_ess_base_close();
#if ORTE_ENABLE_PROGRESS_THREADS
/* stop the progress thread */
orte_event_base_active = false;
/* break the event loop */
opal_event_base_loopbreak(orte_event_base);
/* wait for thread to exit */
opal_thread_join(&orte_progress_thread, NULL);
OBJ_DESTRUCT(&orte_progress_thread);
/* release the event base */
/* opal_event_base_free(orte_event_base); */
#endif
/* cleanup the process info */
orte_proc_info_finalize();

Просмотреть файл

@ -141,6 +141,14 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
#if OPAL_EVENT_HAVE_THREAD_SUPPORT
/* 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))) {
error = "orte progress thread start";
goto error;
}
#else
error = "event thread support is not configured";
ret = ORTE_ERROR;
@ -157,18 +165,6 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
goto error;
}
/* start the event thread, if required */
#if ORTE_ENABLE_PROGRESS_THREADS
/* 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))) {
error = "orte progress thread start";
goto error;
}
#endif
/* All done */
return ORTE_SUCCESS;