For the autogen-challenged (i.e., Jeff), create a new ORTE constant that tells the user that a required module was not found. Update the errmgr select function to output the error if no module is found.
This commit was SVN r23032.
Этот коммит содержится в:
родитель
b62ebb8b94
Коммит
e3164d2ac1
@ -100,7 +100,8 @@ enum {
|
||||
ORTE_ERR_HNP_COULD_NOT_START = (ORTE_ERR_BASE - 28),
|
||||
ORTE_ERR_SYS_LIMITS_SOCKETS = (ORTE_ERR_BASE - 29),
|
||||
ORTE_ERR_SOCKET_NOT_AVAILABLE = (ORTE_ERR_BASE - 30),
|
||||
ORTE_ERR_SYSTEM_WILL_BOOTSTRAP = (ORTE_ERR_BASE - 31)
|
||||
ORTE_ERR_SYSTEM_WILL_BOOTSTRAP = (ORTE_ERR_BASE - 31),
|
||||
ORTE_ERR_MODULE_NOT_FOUND = (ORTE_ERR_BASE - 32)
|
||||
};
|
||||
|
||||
#define ORTE_ERR_MAX (ORTE_ERR_BASE - 100)
|
||||
|
@ -57,7 +57,8 @@ int orte_errmgr_base_select(void)
|
||||
orte_errmgr_base_select_module_t *tmp_module = NULL, *tmp_module_sw = NULL;
|
||||
opal_pointer_array_t tmp_array;
|
||||
orte_errmgr_base_module_t *i_module = NULL;
|
||||
|
||||
bool none_found;
|
||||
|
||||
OBJ_CONSTRUCT(&tmp_array, opal_pointer_array_t);
|
||||
|
||||
opal_output_verbose(10, orte_errmgr_base_output,
|
||||
@ -67,6 +68,7 @@ int orte_errmgr_base_select(void)
|
||||
* Traverse the list of available components.
|
||||
* For each call their 'query' functions to determine relative priority.
|
||||
*/
|
||||
none_found = true;
|
||||
for (item = opal_list_get_first(&orte_errmgr_base_components_available);
|
||||
item != opal_list_get_end(&orte_errmgr_base_components_available);
|
||||
item = opal_list_get_next(item) ) {
|
||||
@ -114,8 +116,14 @@ int orte_errmgr_base_select(void)
|
||||
tmp_module->priority = priority;
|
||||
|
||||
opal_pointer_array_add(&tmp_array, (void*)tmp_module);
|
||||
none_found = false;
|
||||
}
|
||||
|
||||
if (none_found) {
|
||||
/* must have at least one module */
|
||||
return ORTE_ERR_MODULE_NOT_FOUND;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sort the list by decending priority
|
||||
*/
|
||||
|
@ -126,6 +126,10 @@ const char *orte_err2str(int errnum)
|
||||
case ORTE_ERR_SYSTEM_WILL_BOOTSTRAP:
|
||||
retval = "System will determine resources during bootstrap of daemons";
|
||||
break;
|
||||
case ORTE_ERR_MODULE_NOT_FOUND:
|
||||
retval = "Framework requires at least one active module, but none found";
|
||||
break;
|
||||
|
||||
default:
|
||||
retval = NULL;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user