Converted some MCA parameters from the old version to the new.
Have the ras_base_schedule_policy MCA parameter working once again. before it would only do slot based allocation, even if the MCA parameter was set properly. Currently you can specify to orterun a node allocation by either: -mca ras_base_schedule_policy node -bynode and slot allocation (which is the default) by: -mca ras_base_schedule_policy slot -byslot This commit was SVN r7513.
Этот коммит содержится в:
родитель
844cf6ae39
Коммит
a23370c007
@ -92,6 +92,7 @@ int orte_ras_base_open(void)
|
|||||||
orte_ras_base_module_t *module;
|
orte_ras_base_module_t *module;
|
||||||
int param, priority, value;
|
int param, priority, value;
|
||||||
orte_ras_base_cmp_t *cmp;
|
orte_ras_base_cmp_t *cmp;
|
||||||
|
char * policy;
|
||||||
|
|
||||||
/* Debugging / verbose output */
|
/* Debugging / verbose output */
|
||||||
|
|
||||||
@ -105,6 +106,13 @@ int orte_ras_base_open(void)
|
|||||||
orte_ras_base.ras_output = -1;
|
orte_ras_base.ras_output = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
param = mca_base_param_reg_string_name("ras_base", "schedule_policy",
|
||||||
|
"Scheduling Policy for RAS. [slot | node]",
|
||||||
|
false, false, "slot", &policy);
|
||||||
|
if (0 == strcmp(policy, "node")) {
|
||||||
|
mca_base_param_set_string(param, "node");
|
||||||
|
}
|
||||||
|
|
||||||
/* Open up all available components */
|
/* Open up all available components */
|
||||||
|
|
||||||
if (ORTE_SUCCESS !=
|
if (ORTE_SUCCESS !=
|
||||||
|
@ -61,44 +61,35 @@ orte_ras_host_component_t mca_ras_host_component = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convenience functions to lookup MCA parameter values.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int orte_ras_host_param_register_int(
|
|
||||||
const char* param_name,
|
|
||||||
int default_value)
|
|
||||||
{
|
|
||||||
int id = mca_base_param_register_int("ras","host",param_name,NULL,default_value);
|
|
||||||
int param_value = default_value;
|
|
||||||
mca_base_param_lookup_int(id,¶m_value);
|
|
||||||
return param_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *orte_ras_host_param_register_string(
|
|
||||||
const char * a, const char *b, const char *c,
|
|
||||||
char *default_value)
|
|
||||||
{
|
|
||||||
int id = mca_base_param_register_string(a, b, c, NULL, default_value);
|
|
||||||
char *param_value = default_value;
|
|
||||||
mca_base_param_lookup_string(id,¶m_value);
|
|
||||||
return param_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* component open/close/init function
|
* component open/close/init function
|
||||||
*/
|
*/
|
||||||
static int orte_ras_host_open(void)
|
static int orte_ras_host_open(void)
|
||||||
{
|
{
|
||||||
mca_ras_host_component.debug =
|
size_t id;
|
||||||
orte_ras_host_param_register_int("debug", 1);
|
|
||||||
mca_ras_host_component.priority =
|
mca_base_param_reg_int(&mca_ras_host_component.super.ras_version, "debug",
|
||||||
orte_ras_host_param_register_int("priority", 1);
|
"Toggle debug output for Host RAS component",
|
||||||
|
false, false, 1,
|
||||||
|
&mca_ras_host_component.debug);
|
||||||
|
|
||||||
|
mca_base_param_reg_int(&mca_ras_host_component.super.ras_version, "debug",
|
||||||
|
"Selection priority for the Host RAS component",
|
||||||
|
false, false, 1,
|
||||||
|
&mca_ras_host_component.priority);
|
||||||
|
|
||||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||||
mca_ras_host_component.schedule_policy =
|
id = mca_base_param_find("ras_base", NULL, "schedule_policy");
|
||||||
orte_ras_host_param_register_string("ras", "base", "schedule_policy", "slot");
|
if (0 > id) {
|
||||||
|
id = mca_base_param_reg_string_name("ras_base", "schedule_policy",
|
||||||
|
"Scheduling Policy for RAS. [slot | node]",
|
||||||
|
false, false, "slot",
|
||||||
|
&mca_ras_host_component.schedule_policy);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mca_base_param_lookup_string(id, &mca_ras_host_component.schedule_policy);
|
||||||
|
}
|
||||||
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,45 +61,36 @@ orte_rmaps_round_robin_component_t mca_rmaps_round_robin_component = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convience functions to lookup MCA parameter values.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static int orte_rmaps_round_robin_param_register_int(
|
|
||||||
const char* param_name,
|
|
||||||
int default_value)
|
|
||||||
{
|
|
||||||
int id = mca_base_param_register_int("rmaps","round_robin",
|
|
||||||
param_name,NULL,default_value);
|
|
||||||
int param_value = default_value;
|
|
||||||
mca_base_param_lookup_int(id,¶m_value);
|
|
||||||
return param_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static char *orte_rmaps_round_robin_param_register_string(
|
|
||||||
const char *a, const char *b, const char *c,
|
|
||||||
char *default_value)
|
|
||||||
{
|
|
||||||
int id = mca_base_param_register_string(a, b, c, NULL, default_value);
|
|
||||||
char *param_value = default_value;
|
|
||||||
mca_base_param_lookup_string(id,¶m_value);
|
|
||||||
return param_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* component open/close/init function
|
* component open/close/init function
|
||||||
*/
|
*/
|
||||||
static int orte_rmaps_round_robin_open(void)
|
static int orte_rmaps_round_robin_open(void)
|
||||||
{
|
{
|
||||||
mca_rmaps_round_robin_component.debug =
|
size_t id;
|
||||||
orte_rmaps_round_robin_param_register_int("debug", 1);
|
|
||||||
mca_rmaps_round_robin_component.priority =
|
mca_base_param_reg_int(&mca_rmaps_round_robin_component.super.rmaps_version, "debug",
|
||||||
orte_rmaps_round_robin_param_register_int("priority", 1);
|
"Toggle debug output for Round Robin RMAPS component",
|
||||||
|
false, false, 1,
|
||||||
|
&mca_rmaps_round_robin_component.debug);
|
||||||
|
|
||||||
|
mca_base_param_reg_int(&mca_rmaps_round_robin_component.super.rmaps_version, "priority",
|
||||||
|
"Selection priority for Round Robin RMAPS component",
|
||||||
|
false, false, 1,
|
||||||
|
&mca_rmaps_round_robin_component.priority);
|
||||||
|
|
||||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||||
mca_rmaps_round_robin_component.schedule_policy =
|
|
||||||
orte_rmaps_round_robin_param_register_string("ras", "base", "schedule_policy", "slot");
|
id = mca_base_param_find("ras_base", NULL, "schedule_policy");
|
||||||
|
if (0 > id) {
|
||||||
|
id = mca_base_param_reg_string_name("ras_base", "schedule_policy",
|
||||||
|
"Scheduling Policy for RAS. [slot | node]",
|
||||||
|
false, false, "slot",
|
||||||
|
&mca_rmaps_round_robin_component.schedule_policy);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mca_base_param_lookup_string(id, &mca_rmaps_round_robin_component.schedule_policy);
|
||||||
|
}
|
||||||
|
|
||||||
return ORTE_SUCCESS;
|
return ORTE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +646,7 @@ static int init_globals(void)
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
false,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
NULL,
|
NULL,
|
||||||
@ -706,14 +706,26 @@ static int parse_globals(int argc, char* argv[])
|
|||||||
MCA param. */
|
MCA param. */
|
||||||
|
|
||||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||||
id = mca_base_param_register_string("ras", "base", "schedule_policy",
|
/* Don't initialize the MCA parameter here unless we have to,
|
||||||
NULL, "slot");
|
* since it really should be initialized in ras_base_open */
|
||||||
if (orterun_globals.by_node) {
|
if (orterun_globals.by_node || orterun_globals.by_slot) {
|
||||||
orterun_globals.by_slot = false;
|
char *policy = NULL;
|
||||||
mca_base_param_set_string(id, "node");
|
id = mca_base_param_reg_string_name("ras_base", "schedule_policy",
|
||||||
} else {
|
"Scheduling Policy for RAS. [slot | node]",
|
||||||
|
false, false, "slot", &policy);
|
||||||
|
|
||||||
|
if (orterun_globals.by_node) {
|
||||||
|
orterun_globals.by_slot = false;
|
||||||
|
mca_base_param_set_string(id, "node");
|
||||||
|
} else {
|
||||||
|
orterun_globals.by_slot = true;
|
||||||
|
mca_base_param_set_string(id, "slot");
|
||||||
|
}
|
||||||
|
free(policy);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* Default */
|
||||||
orterun_globals.by_slot = true;
|
orterun_globals.by_slot = true;
|
||||||
mca_base_param_set_string(id, "slot");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we don't want to wait, we don't want to wait */
|
/* If we don't want to wait, we don't want to wait */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user