1
1

No need for ORTE tools to use orte progress thread

This commit was SVN r28445.
Этот коммит содержится в:
Ralph Castain 2013-05-04 21:13:20 +00:00
родитель 422331b4da
Коммит 27e3e382d5
4 изменённых файлов: 19 добавлений и 36 удалений

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

@ -811,19 +811,9 @@ int orte_daemon(int argc, char *argv[])
}
/* loop the event lib until an exit event is detected */
#if ORTE_ENABLE_PROGRESS_THREADS
while (orte_event_base_active) {
/* provide a very short quiet period so we
* don't hammer the cpu while
*/
struct timespec tp = {0, 100};
nanosleep(&tp, NULL);
}
#else
while (orte_event_base_active) {
opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE);
}
#endif
/* ensure all local procs are dead */
orte_odls.kill_local_procs(NULL);

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

@ -72,6 +72,7 @@ int orte_finalize(void)
/* close the ess itself */
(void) mca_base_framework_close(&orte_ess_base_framework);
if (ORTE_PROC_IS_APP) {
#if ORTE_ENABLE_PROGRESS_THREADS
/* stop the progress thread */
orte_event_base_active = false;
@ -81,8 +82,9 @@ int orte_finalize(void)
opal_thread_join(&orte_progress_thread, NULL);
OBJ_DESTRUCT(&orte_progress_thread);
/* release the event base */
/* opal_event_base_free(orte_event_base); */
opal_event_base_free(orte_event_base);
#endif
}
/* cleanup the process info */
orte_proc_info_finalize();

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

@ -138,8 +138,8 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
goto error;
}
if (ORTE_PROC_IS_APP) {
#if ORTE_ENABLE_PROGRESS_THREADS
#if OPAL_EVENT_HAVE_THREAD_SUPPORT
/* get a separate orte event base */
orte_event_base = opal_event_base_create();
/* construct the thread object */
@ -150,15 +150,16 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags)
error = "orte progress thread start";
goto error;
}
#else
error = "event thread support is not configured";
ret = ORTE_ERROR;
goto error;
#endif
#else
/* set the event base to the opal one */
orte_event_base = opal_event_base;
#endif
} else {
/* ORTE tools "block" in their own loop over the event
* base, so no progress thread is required
*/
orte_event_base = opal_event_base;
}
/* initialize the RTE for this environment */
if (ORTE_SUCCESS != (ret = orte_ess.init())) {

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

@ -1025,19 +1025,9 @@ int orterun(int argc, char *argv[])
rc = orte_plm.spawn(jdata);
/* loop the event lib until an exit event is detected */
#if ORTE_ENABLE_PROGRESS_THREADS
while (orte_event_base_active) {
/* provide a very short quiet period so we
* don't hammer the cpu while
*/
struct timespec tp = {0, 100};
nanosleep(&tp, NULL);
}
#else
while (orte_event_base_active) {
opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE);
}
#endif
/* ensure all local procs are dead */
orte_odls.kill_local_procs(NULL);