Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using btls always consider the self component #1482

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions opal/mca/base/help-mca-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ all components *except* a and b", while "c,d" specifies the inclusive
behavior and means "use *only* components c and d."

You cannot mix inclusive and exclusive behavior.
[framework-param:exclude-always-component]
A request was made to exclude a component from consideration that
must always be considered.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this super clear for the user (per George's comment) that this component will be considered anyway.

Maybe change to:

Warning: A request was made to exclude a component from consideration that
must always be considered. This component (noted below) will -not- be excluded
from consideration. The program will continue running with this component being
made available for selection.

Framework: %s
Component: %s

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My $0.02: if someone tries to disable it and it can't be disabled, we should abort (in line with the philosophy of "a human asked for X, and OMPI can't provide X, so OMPI needs to abort and let a human figure it out").

Framework: %s
Component: %s
29 changes: 25 additions & 4 deletions opal/mca/base/mca_base_component_find.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -115,9 +115,21 @@ int mca_base_component_find (const char *directory, mca_base_framework_t *framew
/* Find all the components that were statically linked in */
if (static_components) {
for (int i = 0 ; NULL != static_components[i]; ++i) {
if ( use_component(include_mode,
(const char**)requested_component_names,
static_components[i]->mca_component_name) ) {
bool can_use;

can_use = use_component(include_mode, (const char **) requested_component_names,
static_components[i]->mca_component_name);

if (!can_use && static_components[i]->mca_component_flags & MCA_BASE_COMPONENT_FLAG_ALWAYS_CONSIDER) {
if (!include_mode) {
opal_show_help ("help-mca-base.txt", "framework-param:exclude-always-component", true,
framework->framework_name, static_components[i]->mca_component_name);
}

can_use = true;
}

if (can_use) {
cli = OBJ_NEW(mca_base_component_list_item_t);
if (NULL == cli) {
ret = OPAL_ERR_OUT_OF_RESOURCE;
Expand Down Expand Up @@ -192,6 +204,15 @@ int mca_base_components_filter (mca_base_framework_t *framework, uint32_t filter
can_use = use_component (include_mode, (const char **) requested_component_names,
cli->cli_component->mca_component_name);

if (!can_use && cli->cli_component->mca_component_flags & MCA_BASE_COMPONENT_FLAG_ALWAYS_CONSIDER) {
if (!include_mode) {
opal_show_help ("help-mca-base.txt", "framework-param:exclude-always-component", true,
framework->framework_name, cli->cli_component->mca_component_name);
}

can_use = true;
}

if (!can_use || (filter_flags & dummy->data.param_field) != filter_flags) {
if (can_use && (filter_flags & MCA_BASE_METADATA_PARAM_CHECKPOINT) &&
!(MCA_BASE_METADATA_PARAM_CHECKPOINT & dummy->data.param_field)) {
Expand Down
27 changes: 6 additions & 21 deletions opal/mca/btl/self/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,22 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

libmca_btl_self_la_sources = \
# Make self component always static
noinst_LTLIBRARIES = libmca_btl_self.la

libmca_btl_self_la_SOURCES = \
btl_self.c \
btl_self.h \
btl_self_component.c \
btl_self_frag.c \
btl_self_frag.h

# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).

if MCA_BUILD_opal_btl_self_DSO
component_noinst =
component_install = mca_btl_self.la
else
component_noinst = libmca_btl_self.la
component_install =
endif

mcacomponentdir = $(opallibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_btl_self_la_SOURCES = $(libmca_btl_self_la_sources)
mca_btl_self_la_LDFLAGS = -module -avoid-version

noinst_LTLIBRARIES = $(component_noinst)
libmca_btl_self_la_SOURCES = $(libmca_btl_self_la_sources)
libmca_btl_self_la_LDFLAGS = -module -avoid-version
1 change: 1 addition & 0 deletions opal/mca/btl/self/btl_self_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ mca_btl_self_component_t mca_btl_self_component = {
.mca_open_component = mca_btl_self_component_open,
.mca_close_component = mca_btl_self_component_close,
.mca_register_component_params = mca_btl_self_component_register,
.mca_component_flags = MCA_BASE_COMPONENT_FLAG_ALWAYS_CONSIDER,
},
.btl_data = {
/* The component is checkpoint ready */
Expand Down
19 changes: 19 additions & 0 deletions opal/mca/btl/self/configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- shell-script -*-
#
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
# reserved.
#
# Additional copyrights may follow
#
# $HEADER$
#

AC_DEFUN([MCA_opal_btl_self_COMPILE_MODE], [
AC_MSG_CHECKING([for MCA component btl:self compile mode])
$4=static
AC_MSG_RESULT([static])
])

AC_DEFUN([MCA_opal_btl_self_CONFIG], [
AC_CONFIG_FILES([opal/mca/btl/self/Makefile])
])
19 changes: 16 additions & 3 deletions opal/mca/mca.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
Expand Down Expand Up @@ -256,6 +256,15 @@ typedef int (*mca_base_register_component_params_2_0_0_fn_t)(void);
*/
#define MCA_BASE_MAX_COMPONENT_NAME_LEN 63

/**
* Component flags (mca_component_flags field)
*/
enum {
/** Always consider this component for selection. For this flag to
* work properly the component must always be built statically. */
MCA_BASE_COMPONENT_FLAG_ALWAYS_CONSIDER = 1,
};

/**
* Common type for all MCA components.
*
Expand Down Expand Up @@ -315,9 +324,13 @@ struct mca_base_component_2_1_0_t {
mca_base_register_component_params_2_0_0_fn_t mca_register_component_params;
/**< Method for registering the component's MCA parameters */

int32_t mca_component_flags;
/**< flags for this component */

/** Extra space to allow for expansion in the future without
breaking older components. */
char reserved[32];
breaking older components. NTH: reduced by 4 bytes for
mca_component_flags*/
char reserved[28];
};
/** Unversioned convenience typedef; use this name in
frameworks/components to stay forward source-compatible */
Expand Down