From fefec03e78fcc3de8ae33f53eca2a7dbe0abdfd1 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Mon, 12 Nov 2012 02:54:09 +0000 Subject: [PATCH] Enable all ORTE tools to use progress threads if they are enabled This commit was SVN r27593. --- orte/orted/orted_main.c | 4 +--- orte/runtime/orte_init.c | 17 ----------------- orte/tools/orterun/orterun.c | 4 +--- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index a909448121..e58f6acbda 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -799,9 +799,7 @@ int orte_daemon(int argc, char *argv[]) } /* loop the event lib until an exit event is detected */ - while (orte_event_base_active) { - opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE); - } + ORTE_WAIT_FOR_COMPLETION(orte_event_base_active); /* ensure all local procs are dead */ orte_odls.kill_local_procs(NULL); diff --git a/orte/runtime/orte_init.c b/orte/runtime/orte_init.c index 4529c72b81..eed9f9b775 100644 --- a/orte/runtime/orte_init.c +++ b/orte/runtime/orte_init.c @@ -149,7 +149,6 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags) goto error; } - if (ORTE_PROC_IS_APP) { #if !ORTE_DISABLE_FULL_SUPPORT && ORTE_ENABLE_PROGRESS_THREADS #if OPAL_EVENT_HAVE_THREAD_SUPPORT /* get a separate orte event base */ @@ -160,18 +159,6 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags) */ opal_event_set(orte_event_base, &orte_finalize_event, -1, OPAL_EV_WRITE, ignore_callback, NULL); opal_event_set_priority(&orte_finalize_event, ORTE_ERROR_PRI); -#if 0 - { - /* seems strange, but wake us up once a second just so we can check for new events */ - opal_event_t *ev; - struct timeval tv = {1,0}; - ev = opal_event_alloc(); - opal_event_evtimer_set(orte_event_base, - ev, ignore_callback, ev); - opal_event_set_priority(ev, ORTE_INFO_PRI); - opal_event_evtimer_add(ev, &tv); - } -#endif /* construct the thread object */ OBJ_CONSTRUCT(&orte_progress_thread, opal_thread_t); /* fork off a thread to progress it */ @@ -189,10 +176,6 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags) /* set the event base to the opal one */ orte_event_base = opal_event_base; #endif - } else { - /* set the event base to the opal one */ - orte_event_base = opal_event_base; - } /* initialize the RTE for this environment */ if (ORTE_SUCCESS != (ret = orte_ess.init())) { diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 2ede41e329..73e58a4eb8 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -1020,9 +1020,7 @@ int orterun(int argc, char *argv[]) rc = orte_plm.spawn(jdata); /* loop the event lib until an exit event is detected */ - while (orte_event_base_active) { - opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE); - } + ORTE_WAIT_FOR_COMPLETION(orte_event_base_active); /* ensure all local procs are dead */ orte_odls.kill_local_procs(NULL);