Skip to content

Commit fba6990

Browse files
authored
Merge pull request #4330 from jsquyres/pr/configure-option-for-show-load-errors
configure: add --en|disable-show-load-errors-by-default
2 parents 1c52d9d + 5705192 commit fba6990

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
@@ -838,6 +838,33 @@ INSTALLATION OPTIONS
838838
are build as static or dynamic via --enable|disable-static and
839839
--enable|disable-shared.
840840

841+
--disable-show-load-errors-by-default
842+
Set the default value of the mca_base_component_show_load_errors MCA
843+
variable: the --enable form of this option sets the MCA variable to
844+
true, the --disable form sets the MCA variable to false. The MCA
845+
mca_base_component_show_load_errors variable can still be overridden
846+
at run time via the usual MCA-variable-setting mechanisms; this
847+
configure option simply sets the default value.
848+
849+
The --disable form of this option is intended for Open MPI packagers
850+
who tend to enable support for many different types of networks and
851+
systems in their packages. For example, consider a packager who
852+
includes support for both the FOO and BAR networks in their Open MPI
853+
package, both of which require support libraries (libFOO.so and
854+
libBAR.so). If an end user only has BAR hardware, they likely only
855+
have libBAR.so available on their systems -- not libFOO.so.
856+
Disabling load errors by default will prevent the user from seeing
857+
potentially confusing warnings about the FOO components failing to
858+
load because libFOO.so is not available on their systems.
859+
860+
Conversely, system administrators tend to build an Open MPI that is
861+
targeted at their specific environment, and contains few (if any)
862+
components that are not needed. In such cases, they might want
863+
their users to be warned that the FOO network components failed to
864+
load (e.g., if libFOO.so was mistakenly unavailable), because Open
865+
MPI may otherwise silently failover to a slower network path for MPI
866+
traffic.
867+
841868
--with-platform=FILE
842869
Load configure options for the build from FILE. Options on the
843870
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_track_load_errors = false;
5354
bool mca_base_component_disable_dlopen = false;
5455

@@ -102,7 +103,8 @@ int mca_base_open(void)
102103
MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
103104
free(value);
104105

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

0 commit comments

Comments
 (0)