1
1

A more sensible fix, move the MCA variable in the verbs common area.

Этот коммит содержится в:
George Bosilca 2015-02-26 16:51:09 -05:00
родитель 6777f3ac3c
Коммит aeace0468e
3 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -34,6 +34,8 @@
const char *ibv_get_sysfs_path(void); const char *ibv_get_sysfs_path(void);
#endif #endif
int opal_verbs_want_fork_support;
#include "common_verbs.h" #include "common_verbs.h"
#include "opal/runtime/opal_params.h" #include "opal/runtime/opal_params.h"
#include "opal/util/show_help.h" #include "opal/util/show_help.h"
@ -68,6 +70,16 @@ int opal_common_verbs_fork_test(void)
{ {
/* Make sure that ibv_fork_init is called before the calls to other memory registering verbs, /* Make sure that ibv_fork_init is called before the calls to other memory registering verbs,
* which will be called after this function */ * 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 #ifdef HAVE_IBV_FORK_INIT
if (0 != opal_verbs_want_fork_support) { if (0 != opal_verbs_want_fork_support) {
/* Check if fork support is requested by the user */ /* Check if fork support is requested by the user */

Просмотреть файл

@ -275,16 +275,6 @@ int opal_register_params(void)
return ret; return ret;
} }
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);
return OPAL_SUCCESS; return OPAL_SUCCESS;
} }

Просмотреть файл

@ -30,8 +30,6 @@ extern char *opal_signal_string;
extern char *opal_net_private_ipv4; extern char *opal_net_private_ipv4;
extern char *opal_set_max_sys_limits; extern char *opal_set_max_sys_limits;
OPAL_DECLSPEC extern int opal_verbs_want_fork_support;
#if OPAL_ENABLE_TIMING #if OPAL_ENABLE_TIMING
extern char *opal_timing_sync_file; extern char *opal_timing_sync_file;
extern char *opal_timing_output; extern char *opal_timing_output;