Added some userlevel error checking, and messaging.
This commit was SVN r6440.
Этот коммит содержится в:
родитель
29b6112358
Коммит
048d5c1415
@ -18,6 +18,7 @@
|
||||
|
||||
#include "opal/util/argv.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/pml/pml.h"
|
||||
@ -144,8 +145,9 @@ int mca_btl_base_select(bool enable_progress_threads,
|
||||
/* Finished querying all components. Check for the bozo case. */
|
||||
|
||||
if (0 == opal_list_get_size(&mca_btl_base_modules_initialized)) {
|
||||
/* JMS Replace with show_help */
|
||||
orte_abort(1, "No btl components available. This shouldn't happen.");
|
||||
opal_show_help("help-mca-base.txt", "find-available:none-found", true,
|
||||
"btl");
|
||||
orte_abort(1, "");
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/pml/pml.h"
|
||||
@ -110,8 +111,9 @@ int mca_pml_base_select(bool enable_progress_threads,
|
||||
/* Finished querying all components. Check for the bozo case. */
|
||||
|
||||
if( NULL == best_component ) {
|
||||
/* JMS Replace with show_help */
|
||||
orte_abort(1, "No pml component available. This shouldn't happen.");
|
||||
opal_show_help("help-mca-base.txt", "find-available:none-found", true,
|
||||
"pml");
|
||||
orte_abort(1, "");
|
||||
}
|
||||
|
||||
/* Finalize all non-selected components */
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "opal/util/argv.h"
|
||||
#include "runtime/runtime.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "mca/pml/pml.h"
|
||||
@ -136,8 +137,9 @@ int mca_ptl_base_select(bool enable_progress_threads,
|
||||
/* Finished querying all components. Check for the bozo case. */
|
||||
|
||||
if (0 == opal_list_get_size(&mca_ptl_base_modules_initialized)) {
|
||||
/* JMS Replace with show_help */
|
||||
orte_abort(1, "No ptl components available. This shouldn't happen.");
|
||||
opal_show_help("help-mca-base.txt", "find-available:none-found", true,
|
||||
"ptl");
|
||||
orte_abort(1, "");
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
@ -27,3 +27,9 @@ output of the "ompi_info" command and ensure that components of this
|
||||
type are available on your system. You may also wish to check the
|
||||
value of the "component_path" MCA parameter and ensure that it has at
|
||||
least one directory that contains valid MCA components.
|
||||
|
||||
[find-available:not-valid]
|
||||
The %s component was not found!
|
||||
|
||||
This means that this component is either not installed, or unable to be
|
||||
used on your system.
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "opal/util/strncpy.h"
|
||||
#include "opal/util/argv.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/util/show_help.h"
|
||||
#include "mca/mca.h"
|
||||
#include "mca/base/base.h"
|
||||
#include "include/constants.h"
|
||||
@ -161,6 +162,7 @@ static int open_components(const char *type_name, int output_id,
|
||||
const mca_base_component_t *component;
|
||||
mca_base_component_list_item_t *cli;
|
||||
bool acceptable;
|
||||
bool any_acceptable = true;
|
||||
bool called_open;
|
||||
bool opened;
|
||||
|
||||
@ -180,6 +182,47 @@ static int open_components(const char *type_name, int output_id,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check requested components for validity
|
||||
*/
|
||||
if (NULL != requested_component_names) {
|
||||
any_acceptable = false;
|
||||
|
||||
/* For every requested component ... */
|
||||
for (i = 0; NULL != requested_component_names[i]; ++i) {
|
||||
acceptable = false;
|
||||
|
||||
/* Try to match it to an item in the list */
|
||||
for (item = opal_list_get_first(components_found);
|
||||
opal_list_get_end(components_found) != item;
|
||||
item = opal_list_get_next(item)) {
|
||||
|
||||
cli = (mca_base_component_list_item_t *) item;
|
||||
component = cli->cli_component;
|
||||
|
||||
if (0 == strcmp(requested_component_names[i],
|
||||
component->mca_component_name)) {
|
||||
acceptable = true;
|
||||
any_acceptable = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Didn't find it in the list, warn the user */
|
||||
if (!acceptable) {
|
||||
opal_show_help("help-mca-base.txt", "find-available:not-valid", true,
|
||||
requested_component_names[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* None of the listed components were acceptable :( */
|
||||
if(!any_acceptable) {
|
||||
opal_show_help("help-mca-base.txt", "find-available:none-found", true,
|
||||
type_name);
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Traverse the list of found components */
|
||||
|
||||
OBJ_CONSTRUCT(components_available, opal_list_t);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user