1
1

Now that the abort code no longer involves a blocking rml send section, apps that call show_help followed by abort are not printing their error message. So block them in show_help until that message gets out.

This commit was SVN r31595.
Этот коммит содержится в:
Ralph Castain 2014-05-01 22:57:17 +00:00
родитель bf82ee2a14
Коммит 2b61f22973

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

@ -602,6 +602,15 @@ int orte_show_help(const char *filename, const char *topic,
return rc;
}
static void cbfunc(int status, orte_process_name_t* sender,
opal_buffer_t* buffer, orte_rml_tag_t tag,
void* cbdata)
{
bool *active = (bool*)cbdata;
OBJ_RELEASE(buffer);
*active = false;
}
int orte_show_help_norender(const char *filename, const char *topic,
bool want_error_header, const char *output)
{
@ -640,6 +649,7 @@ int orte_show_help_norender(const char *filename, const char *topic,
else {
opal_buffer_t *buf;
static bool am_inside = false;
volatile bool active;
/* JMS Note that we *may* have a recursion situation here where
the RML could call show_help. Need to think about this
@ -661,19 +671,23 @@ int orte_show_help_norender(const char *filename, const char *topic,
/* pack the resulting string */
opal_dss.pack(buf, &output, 1, OPAL_STRING);
/* send it to the HNP */
active = true;
if (ORTE_SUCCESS != (rc = orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, buf,
ORTE_RML_TAG_SHOW_HELP,
orte_rml_send_callback, NULL))) {
cbfunc, &active))) {
ORTE_ERROR_LOG(rc);
OBJ_RELEASE(buf);
} else {
rc = ORTE_SUCCESS;
if (ORTE_PROC_IS_APP) {
ORTE_WAIT_FOR_COMPLETION(active);
}
}
am_inside = false;
}
}
CLEANUP:
CLEANUP:
return rc;
}