add mca param to enable/disable mxm
This commit was SVN r25813.
Этот коммит содержится в:
родитель
9f0ca9dfc0
Коммит
8ed781d7e9
@ -72,6 +72,12 @@ static int ompi_mtl_mxm_component_register(void)
|
|||||||
0,
|
0,
|
||||||
&ompi_mtl_mxm.verbose);
|
&ompi_mtl_mxm.verbose);
|
||||||
|
|
||||||
|
mca_base_param_reg_int(&mca_mtl_mxm_component.super.mtl_version, "enable",
|
||||||
|
"Enable/Disable MXM component",
|
||||||
|
false, false,
|
||||||
|
1,
|
||||||
|
&ompi_mtl_mxm.enabled);
|
||||||
|
|
||||||
return OMPI_SUCCESS;
|
return OMPI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,6 +88,11 @@ static int ompi_mtl_mxm_component_open(void)
|
|||||||
mca_mtl_mxm_output = opal_output_open(NULL);
|
mca_mtl_mxm_output = opal_output_open(NULL);
|
||||||
opal_output_set_verbosity(mca_mtl_mxm_output, ompi_mtl_mxm.verbose);
|
opal_output_set_verbosity(mca_mtl_mxm_output, ompi_mtl_mxm.verbose);
|
||||||
|
|
||||||
|
if (0 == ompi_mtl_mxm.enabled) {
|
||||||
|
MXM_VERBOSE(1, "MTL/MXM was disabled on user request");
|
||||||
|
return OPAL_ERR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
mxm_fill_context_opts(&ompi_mtl_mxm.mxm_opts);
|
mxm_fill_context_opts(&ompi_mtl_mxm.mxm_opts);
|
||||||
err = mxm_init(&ompi_mtl_mxm.mxm_opts, &ompi_mtl_mxm.mxm_context);
|
err = mxm_init(&ompi_mtl_mxm.mxm_opts, &ompi_mtl_mxm.mxm_context);
|
||||||
if (MXM_OK != err) {
|
if (MXM_OK != err) {
|
||||||
|
@ -27,6 +27,7 @@ BEGIN_C_DECLS
|
|||||||
typedef struct mca_mtl_mxm_module_t {
|
typedef struct mca_mtl_mxm_module_t {
|
||||||
mca_mtl_base_module_t super; /**< base MTL interface */
|
mca_mtl_base_module_t super; /**< base MTL interface */
|
||||||
int verbose;
|
int verbose;
|
||||||
|
int enabled;
|
||||||
mxm_h mxm_context;
|
mxm_h mxm_context;
|
||||||
mxm_context_opts_t mxm_opts;
|
mxm_context_opts_t mxm_opts;
|
||||||
mxm_ep_h ep;
|
mxm_ep_h ep;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user