There is no reason for tools to have an async progress thread as they can loop the event library themselves. This has the added benefit of causing the tool to "block" while waiting for events so they don't use cpu.
Also, fix orte-submit so it appropriately handles --help option
Этот коммит содержится в:
родитель
4694b16256
Коммит
836f49597d
@ -77,18 +77,6 @@ int orte_ess_base_tool_setup(void)
|
||||
orte_process_info.super.proc_arch = opal_local_arch;
|
||||
opal_proc_local_set(&orte_process_info.super);
|
||||
|
||||
if (NULL != orte_process_info.my_hnp_uri) {
|
||||
/* if we were given an HNP, then we want
|
||||
* to look like an application as well as being a tool.
|
||||
* Need to do this before opening the routed framework
|
||||
* so it will do the right things.
|
||||
*/
|
||||
orte_process_info.proc_type |= ORTE_PROC_NON_MPI;
|
||||
/* get a separate orte event base */
|
||||
orte_event_base = opal_start_progress_thread("orte", true);
|
||||
progress_thread_running = true;
|
||||
orte_event_base_active = true;
|
||||
}
|
||||
/* open and setup the state machine */
|
||||
if (ORTE_SUCCESS != (ret = mca_base_framework_open(&orte_state_base_framework, 0))) {
|
||||
ORTE_ERROR_LOG(ret);
|
||||
|
@ -435,6 +435,32 @@ int main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Check for help request */
|
||||
if (myglobals.help) {
|
||||
char *str, *args = NULL;
|
||||
char *project_name = NULL;
|
||||
opal_output(0, "GETTING HELP");
|
||||
if (0 == strcmp(myglobals.basename, "mpirun")) {
|
||||
project_name = "Open MPI";
|
||||
} else {
|
||||
project_name = "OpenRTE";
|
||||
}
|
||||
args = opal_cmd_line_get_usage_msg(&cmd_line);
|
||||
opal_output(0, "CMD LINE %s", args);
|
||||
str = opal_show_help_string("help-orterun.txt", "orterun:usage", false,
|
||||
myglobals.basename, project_name, OPAL_VERSION,
|
||||
myglobals.basename, args,
|
||||
PACKAGE_BUGREPORT);
|
||||
if (NULL != str) {
|
||||
printf("%s", str);
|
||||
free(str);
|
||||
}
|
||||
free(args);
|
||||
|
||||
/* If someone asks for help, that should be all we do */
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Check for some "global" command line params */
|
||||
parse_globals(argc, argv, &cmd_line);
|
||||
|
||||
@ -691,11 +717,15 @@ int main(int argc, char *argv[])
|
||||
orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, req, ORTE_RML_TAG_DAEMON, orte_rml_send_callback, NULL);
|
||||
|
||||
// wait for response and unpack the status, jobid
|
||||
ORTE_WAIT_FOR_COMPLETION(myspawn);
|
||||
while (myspawn) {
|
||||
opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE);
|
||||
}
|
||||
opal_output(0, "Job %s has launched", ORTE_JOBID_PRINT(jdata->jobid));
|
||||
|
||||
waiting:
|
||||
ORTE_WAIT_FOR_COMPLETION(mywait);
|
||||
while (mywait) {
|
||||
opal_event_loop(orte_event_base, OPAL_EVLOOP_ONCE);
|
||||
}
|
||||
|
||||
DONE:
|
||||
/* cleanup and leave */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user