A better fix for the want_fork_support issue. I noticed a naming
conflict where ompi was used down in OPAL. I correctly renamd the MCA parameter, and created a deprecated synomym for the old name.
Этот коммит содержится в:
родитель
5c3ce3a737
Коммит
2c60c18e6f
@ -39,6 +39,7 @@ OPAL_DECLSPEC void opal_ibv_free_device_list(struct ibv_device **ib_devs);
|
||||
* common_verbs_mca.c
|
||||
*/
|
||||
extern bool opal_common_verbs_warn_nonexistent_if;
|
||||
extern int opal_verbs_want_fork_support;
|
||||
OPAL_DECLSPEC void opal_common_verbs_mca_register(mca_base_component_t *component);
|
||||
|
||||
/*
|
||||
|
@ -34,8 +34,6 @@
|
||||
const char *ibv_get_sysfs_path(void);
|
||||
#endif
|
||||
|
||||
int opal_verbs_want_fork_support;
|
||||
|
||||
#include "common_verbs.h"
|
||||
#include "opal/runtime/opal_params.h"
|
||||
#include "opal/util/show_help.h"
|
||||
@ -70,16 +68,6 @@ int opal_common_verbs_fork_test(void)
|
||||
{
|
||||
/* Make sure that ibv_fork_init is called before the calls to other memory registering verbs,
|
||||
* which will be called after this function */
|
||||
opal_verbs_want_fork_support = 1;
|
||||
ret = mca_base_var_register("opal", "opal", NULL, "verbs_want_fork_support",
|
||||
"Whether fork support is desired or not "
|
||||
"(negative = try to enable fork support, but continue even "
|
||||
"if it is not available, 0 = do not enable fork support, "
|
||||
"positive = try to enable fork support and fail if it is not available)",
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ,
|
||||
&opal_verbs_want_fork_support);
|
||||
|
||||
#ifdef HAVE_IBV_FORK_INIT
|
||||
if (0 != opal_verbs_want_fork_support) {
|
||||
/* Check if fork support is requested by the user */
|
||||
|
@ -25,12 +25,25 @@ static void register_internal(void)
|
||||
{
|
||||
opal_common_verbs_warn_nonexistent_if = true;
|
||||
warn_nonexistent_if_index =
|
||||
mca_base_var_register("ompi", "ompi_common", "verbs", "warn_nonexistent_if",
|
||||
mca_base_var_register("opal", "opal_common", "verbs", "warn_nonexistent_if",
|
||||
"Warn if non-existent devices and/or ports are specified in device include/exclude MCA parameters "
|
||||
"(0 = do not warn; any other value = warn)",
|
||||
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL,
|
||||
&opal_common_verbs_warn_nonexistent_if);
|
||||
/* A depreacated synonym */
|
||||
mca_base_var_register_synonym(warn_nonexistent_if_index, "ompi", "ompi_common",
|
||||
"verbs", "warn_nonexistent_if", MCA_BASE_VAR_SYN_FLAG_DEPRECATED);
|
||||
|
||||
opal_verbs_want_fork_support = 1;
|
||||
mca_base_var_register("opal", "opal_common", "verbs", "want_fork_support",
|
||||
"Whether fork support is desired or not "
|
||||
"(negative = try to enable fork support, but continue even "
|
||||
"if it is not available, 0 = do not enable fork support, "
|
||||
"positive = try to enable fork support and fail if it is not available)",
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_ALL_EQ,
|
||||
&opal_verbs_want_fork_support);
|
||||
|
||||
registered = true;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user