Fixes trac:1338: Have the MCA base specifically check for all requested
components. If they are not found / able to be opened, a warning will be printed and the mca_base_component_find() will return OPAL_ERR_NOT_FOUND. It is the upper-layer's responsibility to handle this error appropriately. This commit was SVN r18707. The following Trac tickets were found above: Ticket 1338 --> https://svn.open-mpi.org/trac/ompi/ticket/1338
Этот коммит содержится в:
родитель
937380df2f
Коммит
bdaaf01d8a
@ -10,6 +10,7 @@
|
|||||||
# University of Stuttgart. All rights reserved.
|
# University of Stuttgart. All rights reserved.
|
||||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -29,12 +30,18 @@ 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
|
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
|
value of the "component_path" MCA parameter and ensure that it has at
|
||||||
least one directory that contains valid MCA components.
|
least one directory that contains valid MCA components.
|
||||||
|
#
|
||||||
[find-available:not-valid]
|
[find-available:not-valid]
|
||||||
The %s component was not found!
|
A requested component was not found, or was unable to be opened. This
|
||||||
|
means that this component is either not installed or is unable to be
|
||||||
|
used on your system (e.g., sometimes this means that shared libraries
|
||||||
|
that the component requires are unable to be found/loaded). Note that
|
||||||
|
Open MPI stopped checking at the first component that it did not find.
|
||||||
|
|
||||||
This means that this component is either not installed, or unable to be
|
Host: %s
|
||||||
used on your system.
|
Framework: %s
|
||||||
|
Component: %s
|
||||||
|
#
|
||||||
[framework-param:too-many-negates]
|
[framework-param:too-many-negates]
|
||||||
MCA framework parameters can only take a single negation operator
|
MCA framework parameters can only take a single negation operator
|
||||||
("^"), and it must be at the beginning of the value. The following
|
("^"), and it must be at the beginning of the value. The following
|
||||||
|
@ -23,12 +23,14 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#if OMPI_WANT_LIBLTDL
|
#if OMPI_WANT_LIBLTDL
|
||||||
#include "opal/libltdl/ltdl.h"
|
#include "opal/libltdl/ltdl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "opal/util/output.h"
|
#include "opal/util/output.h"
|
||||||
|
#include "opal/util/show_help.h"
|
||||||
#include "opal/class/opal_list.h"
|
#include "opal/class/opal_list.h"
|
||||||
#include "opal/mca/mca.h"
|
#include "opal/mca/mca.h"
|
||||||
#include "opal/mca/base/base.h"
|
#include "opal/mca/base/base.h"
|
||||||
@ -132,6 +134,7 @@ int mca_base_component_find(const char *directory, const char *type,
|
|||||||
bool open_dso_components)
|
bool open_dso_components)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
opal_list_item_t *item;
|
||||||
mca_base_component_list_item_t *cli;
|
mca_base_component_list_item_t *cli;
|
||||||
|
|
||||||
/* Find all the components that were statically linked in */
|
/* Find all the components that were statically linked in */
|
||||||
@ -168,6 +171,30 @@ int mca_base_component_find(const char *directory, const char *type,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Ensure that *all* requested components exist. Print a warning
|
||||||
|
and abort if they do not. */
|
||||||
|
for (i = 0; NULL != requested_component_names &&
|
||||||
|
NULL != requested_component_names[i]; ++i) {
|
||||||
|
for (item = opal_list_get_first(found_components);
|
||||||
|
opal_list_get_end(found_components) != item;
|
||||||
|
item = opal_list_get_next(item)) {
|
||||||
|
cli = (mca_base_component_list_item_t*) item;
|
||||||
|
if (0 == strcmp(requested_component_names[i],
|
||||||
|
cli->cli_component->mca_component_name)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opal_list_get_end(found_components) == item) {
|
||||||
|
char h[HOST_NAME_MAX];
|
||||||
|
gethostname(h, sizeof(h));
|
||||||
|
opal_show_help("help-mca-base.txt",
|
||||||
|
"find-available:not-valid", true,
|
||||||
|
h, type, requested_component_names[i]);
|
||||||
|
return OPAL_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* All done */
|
/* All done */
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user