Skip to content

Commit 564cea2

Browse files
authored
Merge pull request #4332 from jsquyres/pr/v3.0.x/add-configure-cli-option-to-set-default-value-for-component-show-load-errors
configure: add --en|disable-show-load-errors-by-default
2 parents 874beee + 3e4b280 commit 564cea2

File tree

3 files changed

+61
-4
lines changed

3 files changed

+61
-4
lines changed

README

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,33 @@ INSTALLATION OPTIONS
827827
are build as static or dynamic via --enable|disable-static and
828828
--enable|disable-shared.
829829

830+
--disable-show-load-errors-by-default
831+
Set the default value of the mca_base_component_show_load_errors MCA
832+
variable: the --enable form of this option sets the MCA variable to
833+
true, the --disable form sets the MCA variable to false. The MCA
834+
mca_base_component_show_load_errors variable can still be overridden
835+
at run time via the usual MCA-variable-setting mechanisms; this
836+
configure option simply sets the default value.
837+
838+
The --disable form of this option is intended for Open MPI packagers
839+
who tend to enable support for many different types of networks and
840+
systems in their packages. For example, consider a packager who
841+
includes support for both the FOO and BAR networks in their Open MPI
842+
package, both of which require support libraries (libFOO.so and
843+
libBAR.so). If an end user only has BAR hardware, they likely only
844+
have libBAR.so available on their systems -- not libFOO.so.
845+
Disabling load errors by default will prevent the user from seeing
846+
potentially confusing warnings about the FOO components failing to
847+
load because libFOO.so is not available on their systems.
848+
849+
Conversely, system administrators tend to build an Open MPI that is
850+
targeted at their specific environment, and contains few (if any)
851+
components that are not needed. In such cases, they might want
852+
their users to be warned that the FOO network components failed to
853+
load (e.g., if libFOO.so was mistakenly unavailable), because Open
854+
MPI may otherwise silently failover to a slower network path for MPI
855+
traffic.
856+
830857
--with-platform=FILE
831858
Load configure options for the build from FILE. Options on the
832859
command line that are not in FILE are also used. Options on the

config/opal_configure_options.m4

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
1010
dnl University of Stuttgart. All rights reserved.
1111
dnl Copyright (c) 2004-2005 The Regents of the University of California.
1212
dnl All rights reserved.
13-
dnl Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
13+
dnl Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
1414
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
1515
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
1616
dnl Copyright (c) 2009 Los Alamos National Security, LLC. All rights
@@ -286,6 +286,34 @@ fi
286286
AC_DEFINE_UNQUOTED(OPAL_ENABLE_DLOPEN_SUPPORT, $OPAL_ENABLE_DLOPEN_SUPPORT,
287287
[Whether we want to enable dlopen support])
288288

289+
290+
#
291+
# Do we want to show component load error messages by default?
292+
#
293+
294+
AC_MSG_CHECKING([for default value of mca_base_component_show_load_errors])
295+
AC_ARG_ENABLE([show-load-errors-by-default],
296+
[AC_HELP_STRING([--enable-show-load-errors-by-default],
297+
[Set the default value for the MCA parameter
298+
mca_base_component_show_load_errors (but can be
299+
overridden at run time by the usual
300+
MCA-variable-setting mechansism). This MCA variable
301+
controls whether warnings are displayed when an MCA
302+
component fails to load at run time due to an error.
303+
(default: enabled, meaning that
304+
mca_base_component_show_load_errors is enabled
305+
by default])])
306+
if test "$enable_show_load_errors_by_default" = "no" ; then
307+
OPAL_SHOW_LOAD_ERRORS_DEFAULT=0
308+
AC_MSG_RESULT([disabled by default])
309+
else
310+
OPAL_SHOW_LOAD_ERRORS_DEFAULT=1
311+
AC_MSG_RESULT([enabled by default])
312+
fi
313+
AC_DEFINE_UNQUOTED(OPAL_SHOW_LOAD_ERRORS_DEFAULT, $OPAL_SHOW_LOAD_ERRORS_DEFAULT,
314+
[Default value for mca_base_component_show_load_errors MCA variable])
315+
316+
289317
#
290318
# Heterogeneous support
291319
#

opal/mca/base/mca_base_open.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2017 IBM Corporation. All rights reserved.
@@ -48,7 +48,8 @@ char *mca_base_component_path = NULL;
4848
int mca_base_opened = 0;
4949
char *mca_base_system_default_path = NULL;
5050
char *mca_base_user_default_path = NULL;
51-
bool mca_base_component_show_load_errors = true;
51+
bool mca_base_component_show_load_errors =
52+
(bool) OPAL_SHOW_LOAD_ERRORS_DEFAULT;
5253
bool mca_base_component_disable_dlopen = false;
5354

5455
static char *mca_base_verbose = NULL;
@@ -101,7 +102,8 @@ int mca_base_open(void)
101102
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
102103
free(value);
103104

104-
mca_base_component_show_load_errors = true;
105+
mca_base_component_show_load_errors =
106+
(bool) OPAL_SHOW_LOAD_ERRORS_DEFAULT;
105107
var_id = mca_base_var_register("opal", "mca", "base", "component_show_load_errors",
106108
"Whether to show errors for components that failed to load or not",
107109
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,

0 commit comments

Comments
 (0)