OSHMEM: Fix issue with incorrect mca variables registration
Few components had wrong mca variables registration procedure List of them: - atomic basic and mxm - spml yoda and ikrit Two mca variables as runtime_api_verbose and runtime_lock_recursive change names to oshmem_api_verbose and oshmem_lock_recursive otherwise they were not shown by oshmem_info tool. fixed by Igor, reviewed by Miked cmr=v1.8.2:reviewer=ompi-rm1.8 This commit was SVN r31962.
Этот коммит содержится в:
родитель
f197af530c
Коммит
55e35e0f6e
@ -63,6 +63,9 @@ struct mca_atomic_base_component_1_0_0_t {
|
||||
mca_atomic_base_component_init_fn_t atomic_init;
|
||||
mca_atomic_base_component_finalize_fn_t atomic_finalize;
|
||||
mca_atomic_base_component_query_fn_t atomic_query;
|
||||
|
||||
/* priority for component */
|
||||
int priority;
|
||||
};
|
||||
typedef struct mca_atomic_base_component_1_0_0_t mca_atomic_base_component_1_0_0_t;
|
||||
|
||||
|
@ -24,8 +24,6 @@ BEGIN_C_DECLS
|
||||
OSHMEM_MODULE_DECLSPEC extern mca_atomic_base_component_1_0_0_t
|
||||
mca_atomic_basic_component;
|
||||
|
||||
extern int mca_atomic_basic_priority_param;
|
||||
|
||||
OSHMEM_DECLSPEC void atomic_basic_lock(int pe);
|
||||
OSHMEM_DECLSPEC void atomic_basic_unlock(int pe);
|
||||
|
||||
|
@ -24,11 +24,11 @@ const char *mca_atomic_basic_component_version_string =
|
||||
/*
|
||||
* Global variable
|
||||
*/
|
||||
int mca_atomic_basic_priority_param = -1;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int _basic_register(void);
|
||||
static int _basic_open(void);
|
||||
|
||||
/*
|
||||
@ -50,9 +50,14 @@ mca_atomic_base_component_t mca_atomic_basic_component = {
|
||||
OSHMEM_MINOR_VERSION,
|
||||
OSHMEM_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
/* component open */
|
||||
_basic_open,
|
||||
NULL
|
||||
/* component close */
|
||||
NULL,
|
||||
/* component query */
|
||||
NULL,
|
||||
/* component register */
|
||||
_basic_register
|
||||
},
|
||||
{
|
||||
/* The component is checkpoint ready */
|
||||
@ -66,17 +71,22 @@ mca_atomic_base_component_t mca_atomic_basic_component = {
|
||||
mca_atomic_basic_query
|
||||
};
|
||||
|
||||
static int _basic_register(void)
|
||||
{
|
||||
mca_atomic_basic_component.priority = 75;
|
||||
mca_base_component_var_register (&mca_atomic_basic_component.atomic_version,
|
||||
"priority", "Priority of the atomic:basic "
|
||||
"component (default: 75)", MCA_BASE_VAR_TYPE_INT,
|
||||
NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_3,
|
||||
MCA_BASE_VAR_SCOPE_ALL_EQ,
|
||||
&mca_atomic_basic_component.priority);
|
||||
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
static int _basic_open(void)
|
||||
{
|
||||
mca_atomic_basic_priority_param = 75;
|
||||
(void) mca_base_component_var_register(&mca_atomic_basic_component.atomic_version,
|
||||
"priority",
|
||||
"Priority of the atomic:basic component",
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
&mca_atomic_basic_priority_param);
|
||||
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ mca_atomic_basic_query(int *priority)
|
||||
{
|
||||
mca_atomic_basic_module_t *module;
|
||||
|
||||
*priority = mca_atomic_basic_priority_param;
|
||||
*priority = mca_atomic_basic_component.priority;
|
||||
|
||||
module = OBJ_NEW(mca_atomic_basic_module_t);
|
||||
if (module) {
|
||||
|
@ -28,8 +28,6 @@ BEGIN_C_DECLS
|
||||
OSHMEM_MODULE_DECLSPEC extern mca_atomic_base_component_1_0_0_t
|
||||
mca_atomic_mxm_component;
|
||||
|
||||
extern int mca_atomic_mxm_priority_param;
|
||||
|
||||
/* this component works with spml:ikrit only */
|
||||
extern mca_spml_ikrit_t *mca_spml_self;
|
||||
|
||||
|
@ -27,12 +27,12 @@ const char *mca_atomic_mxm_component_version_string =
|
||||
/*
|
||||
* Global variable
|
||||
*/
|
||||
int mca_atomic_mxm_priority_param = -1;
|
||||
mca_spml_ikrit_t *mca_spml_self = NULL;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
*/
|
||||
static int _mxm_register(void);
|
||||
static int _mxm_open(void);
|
||||
|
||||
/*
|
||||
@ -54,9 +54,14 @@ mca_atomic_base_component_t mca_atomic_mxm_component = {
|
||||
OSHMEM_MINOR_VERSION,
|
||||
OSHMEM_RELEASE_VERSION,
|
||||
|
||||
/* Component open and close functions */
|
||||
/* component open */
|
||||
_mxm_open,
|
||||
NULL
|
||||
/* component close */
|
||||
NULL,
|
||||
/* component query */
|
||||
NULL,
|
||||
/* component register */
|
||||
_mxm_register
|
||||
},
|
||||
{
|
||||
/* The component is checkpoint ready */
|
||||
@ -70,6 +75,20 @@ mca_atomic_base_component_t mca_atomic_mxm_component = {
|
||||
mca_atomic_mxm_query
|
||||
};
|
||||
|
||||
static int _mxm_register(void)
|
||||
{
|
||||
mca_atomic_mxm_component.priority = 100;
|
||||
mca_base_component_var_register (&mca_atomic_mxm_component.atomic_version,
|
||||
"priority", "Priority of the atomic:mxm "
|
||||
"component (default: 100)", MCA_BASE_VAR_TYPE_INT,
|
||||
NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_3,
|
||||
MCA_BASE_VAR_SCOPE_ALL_EQ,
|
||||
&mca_atomic_mxm_component.priority);
|
||||
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
static int _mxm_open(void)
|
||||
{
|
||||
/*
|
||||
@ -83,15 +102,6 @@ static int _mxm_open(void)
|
||||
}
|
||||
mca_spml_self = (mca_spml_ikrit_t *)mca_spml.self;
|
||||
|
||||
mca_atomic_mxm_priority_param = 100;
|
||||
(void) mca_base_component_var_register(&mca_atomic_mxm_component.atomic_version,
|
||||
"priority",
|
||||
"Priority of the basic atomic:mxm component",
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
&mca_atomic_mxm_priority_param);
|
||||
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ mca_atomic_mxm_query(int *priority)
|
||||
{
|
||||
mca_atomic_mxm_module_t *module;
|
||||
|
||||
*priority = mca_atomic_mxm_priority_param;
|
||||
*priority = mca_atomic_mxm_component.priority;
|
||||
|
||||
module = OBJ_NEW(mca_atomic_mxm_module_t);
|
||||
if (module) {
|
||||
|
@ -1077,7 +1077,7 @@ static inline int mca_spml_ikrit_put_internal(void* dst_addr,
|
||||
}
|
||||
#else
|
||||
if (mca_spml_ikrit.free_list_max - mca_spml_ikrit.n_active_puts <= SPML_IKRIT_PUT_LOW_WATER ||
|
||||
opal_list_get_size(&mca_spml_ikrit.active_peers) > mca_spml_ikrit.unsync_conn_max ||
|
||||
(int)opal_list_get_size(&mca_spml_ikrit.active_peers) > mca_spml_ikrit.unsync_conn_max ||
|
||||
(mca_spml_ikrit.mxm_peers[dst]->n_active_puts + 1) % SPML_IKRIT_PACKETS_PER_SYNC == 0) {
|
||||
put_req->mxm_req.flags = 0;
|
||||
need_progress = 1;
|
||||
|
@ -92,6 +92,7 @@ struct mca_spml_ikrit_t {
|
||||
int ud_only; /* only ud transport is used. In this case
|
||||
it is possible to speedup mkey exchange
|
||||
and not to register memheap */
|
||||
int np;
|
||||
#if MXM_API >= MXM_VERSION(2,0)
|
||||
int unsync_conn_max;
|
||||
#endif
|
||||
|
@ -60,7 +60,7 @@ mca_spml_base_component_2_0_0_t mca_spml_ikrit_component = {
|
||||
};
|
||||
|
||||
#if MXM_API >= MXM_VERSION(2,1)
|
||||
static int check_mxm_tls(char *var)
|
||||
static inline int check_mxm_tls(char *var)
|
||||
{
|
||||
char *str;
|
||||
|
||||
@ -88,7 +88,7 @@ static int check_mxm_tls(char *var)
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
static int set_mxm_tls()
|
||||
static inline int set_mxm_tls()
|
||||
{
|
||||
char *tls;
|
||||
|
||||
@ -106,25 +106,22 @@ static int set_mxm_tls()
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int mca_spml_ikrit_param_register_int(const char* param_name,
|
||||
static inline void mca_spml_ikrit_param_register_int(const char* param_name,
|
||||
int default_value,
|
||||
const char *help_msg)
|
||||
const char *help_msg,
|
||||
int *storage)
|
||||
{
|
||||
int param_value;
|
||||
|
||||
param_value = default_value;
|
||||
*storage = default_value;
|
||||
(void) mca_base_component_var_register(&mca_spml_ikrit_component.spmlm_version,
|
||||
param_name,
|
||||
help_msg,
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
¶m_value);
|
||||
|
||||
return param_value;
|
||||
storage);
|
||||
}
|
||||
|
||||
static void mca_spml_ikrit_param_register_string(const char* param_name,
|
||||
static inline void mca_spml_ikrit_param_register_string(const char* param_name,
|
||||
char* default_value,
|
||||
const char *help_msg,
|
||||
char **storage)
|
||||
@ -137,51 +134,51 @@ static void mca_spml_ikrit_param_register_string(const char* param_name,
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
storage);
|
||||
|
||||
}
|
||||
|
||||
static int mca_spml_ikrit_component_register(void)
|
||||
{
|
||||
int np;
|
||||
|
||||
mca_spml_ikrit.free_list_num =
|
||||
mca_spml_ikrit_param_register_int("free_list_num", 1024, 0);
|
||||
mca_spml_ikrit.free_list_max =
|
||||
mca_spml_ikrit_param_register_int("free_list_max", 1024, 0);
|
||||
mca_spml_ikrit.free_list_inc =
|
||||
mca_spml_ikrit_param_register_int("free_list_inc", 16, 0);
|
||||
mca_spml_ikrit.bulk_connect =
|
||||
mca_spml_ikrit_param_register_int("bulk_connect", 1, 0);
|
||||
mca_spml_ikrit.bulk_disconnect =
|
||||
mca_spml_ikrit_param_register_int("bulk_disconnect", 1, 0);
|
||||
mca_spml_ikrit.priority =
|
||||
mca_spml_ikrit_param_register_int("priority",
|
||||
20,
|
||||
"[integer] ikrit priority");
|
||||
mca_spml_ikrit_param_register_int("free_list_num", 1024,
|
||||
0,
|
||||
&mca_spml_ikrit.free_list_num);
|
||||
mca_spml_ikrit_param_register_int("free_list_max", 1024,
|
||||
0,
|
||||
&mca_spml_ikrit.free_list_max);
|
||||
mca_spml_ikrit_param_register_int("free_list_inc", 16,
|
||||
0,
|
||||
&mca_spml_ikrit.free_list_inc);
|
||||
mca_spml_ikrit_param_register_int("bulk_connect", 1,
|
||||
0,
|
||||
&mca_spml_ikrit.bulk_connect);
|
||||
mca_spml_ikrit_param_register_int("bulk_disconnect", 1,
|
||||
0,
|
||||
&mca_spml_ikrit.bulk_disconnect);
|
||||
mca_spml_ikrit_param_register_int("priority", 20,
|
||||
"[integer] ikrit priority",
|
||||
&mca_spml_ikrit.priority);
|
||||
|
||||
mca_spml_ikrit_param_register_string("mxm_tls",
|
||||
"rc,ud,self",
|
||||
"[string] TL channels for MXM",
|
||||
&mca_spml_ikrit.mxm_tls);
|
||||
|
||||
np = mca_spml_ikrit_param_register_int("np",
|
||||
mca_spml_ikrit_param_register_int("np",
|
||||
#if MXM_API <= MXM_VERSION(2,0)
|
||||
128,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
"[integer] Minimal allowed job's NP to activate ikrit");
|
||||
"[integer] Minimal allowed job's NP to activate ikrit", &mca_spml_ikrit.np);
|
||||
#if MXM_API >= MXM_VERSION(2,0)
|
||||
mca_spml_ikrit.unsync_conn_max =
|
||||
mca_spml_ikrit_param_register_int("unsync_conn_max",
|
||||
8,
|
||||
"[integer] Max number of connections that do not require notification of PUT operation remote completion. Increasing this number improves efficiency of p2p communication but increases overhead of shmem_fence/shmem_quiet/shmem_barrier");
|
||||
mca_spml_ikrit_param_register_int("unsync_conn_max", 8,
|
||||
"[integer] Max number of connections that do not require notification of PUT operation remote completion. Increasing this number improves efficiency of p2p communication but increases overhead of shmem_fence/shmem_quiet/shmem_barrier",
|
||||
&mca_spml_ikrit.unsync_conn_max);
|
||||
#endif
|
||||
|
||||
if (oshmem_num_procs() < np) {
|
||||
if (oshmem_num_procs() < mca_spml_ikrit.np) {
|
||||
SPML_VERBOSE(1,
|
||||
"Not enough ranks (%d<%d), disqualifying spml/ikrit",
|
||||
oshmem_num_procs(), np);
|
||||
oshmem_num_procs(), mca_spml_ikrit.np);
|
||||
return OSHMEM_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
|
@ -52,42 +52,40 @@ mca_spml_base_component_2_0_0_t mca_spml_yoda_component = {
|
||||
|
||||
};
|
||||
|
||||
static inline int mca_spml_yoda_param_register_int(const char *param_name,
|
||||
static inline void mca_spml_yoda_param_register_int(const char *param_name,
|
||||
int default_value,
|
||||
const char *help_msg)
|
||||
const char *help_msg,
|
||||
int *storage)
|
||||
{
|
||||
int param_value;
|
||||
|
||||
param_value = default_value;
|
||||
*storage = default_value;
|
||||
(void) mca_base_component_var_register(&mca_spml_yoda_component.spmlm_version,
|
||||
param_name,
|
||||
help_msg,
|
||||
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
|
||||
OPAL_INFO_LVL_9,
|
||||
MCA_BASE_VAR_SCOPE_READONLY,
|
||||
¶m_value);
|
||||
|
||||
return param_value;
|
||||
storage);
|
||||
}
|
||||
|
||||
static int mca_spml_yoda_component_register(void)
|
||||
{
|
||||
mca_spml_yoda.free_list_num =
|
||||
mca_spml_yoda_param_register_int("free_list_num", 1024, 0);
|
||||
mca_spml_yoda.free_list_max =
|
||||
mca_spml_yoda_param_register_int("free_list_max", 1024, 0);
|
||||
mca_spml_yoda.free_list_inc =
|
||||
mca_spml_yoda_param_register_int("free_list_inc", 16, 0);
|
||||
mca_spml_yoda.bml_alloc_threshold =
|
||||
mca_spml_yoda_param_register_int("bml_alloc_threshold",
|
||||
3,
|
||||
"number of puts to wait \
|
||||
in case of put/get temporary buffer \
|
||||
allocation failture");
|
||||
mca_spml_yoda.priority =
|
||||
mca_spml_yoda_param_register_int("priority",
|
||||
10,
|
||||
"[integer] yoda priority");
|
||||
mca_spml_yoda_param_register_int("free_list_num", 1024,
|
||||
0,
|
||||
&mca_spml_yoda.free_list_num);
|
||||
mca_spml_yoda_param_register_int("free_list_max", 1024,
|
||||
0,
|
||||
&mca_spml_yoda.free_list_max);
|
||||
mca_spml_yoda_param_register_int("free_list_inc", 16,
|
||||
0,
|
||||
&mca_spml_yoda.free_list_inc);
|
||||
mca_spml_yoda_param_register_int("bml_alloc_threshold", 3,
|
||||
"number of puts to wait \
|
||||
in case of put/get temporary buffer \
|
||||
allocation failture",
|
||||
&mca_spml_yoda.bml_alloc_threshold);
|
||||
mca_spml_yoda_param_register_int("priority", 10,
|
||||
"[integer] yoda priority",
|
||||
&mca_spml_yoda.priority);
|
||||
return OSHMEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ int oshmem_preconnect_all = 0;
|
||||
int oshmem_shmem_register_params(void)
|
||||
{
|
||||
(void) mca_base_var_register("oshmem",
|
||||
"runtime",
|
||||
"oshmem",
|
||||
NULL,
|
||||
"lock_recursive",
|
||||
"Whether or not distributed locking support recursive calls (default = no)",
|
||||
@ -33,7 +33,7 @@ int oshmem_shmem_register_params(void)
|
||||
&oshmem_shmem_lock_recursive);
|
||||
|
||||
(void) mca_base_var_register("oshmem",
|
||||
"runtime",
|
||||
"oshmem",
|
||||
NULL,
|
||||
"api_verbose",
|
||||
"Verbosity level of the shmem c functions (default = 0)",
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user