1
1

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.
Этот коммит содержится в:
Josh Hursey 2005-09-27 02:54:15 +00:00
родитель 844cf6ae39
Коммит a23370c007
4 изменённых файлов: 75 добавлений и 73 удалений

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

@ -92,6 +92,7 @@ int orte_ras_base_open(void)
orte_ras_base_module_t *module;
int param, priority, value;
orte_ras_base_cmp_t *cmp;
char * policy;
/* Debugging / verbose output */
@ -105,6 +106,13 @@ int orte_ras_base_open(void)
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 */
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,&param_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,&param_value);
return param_value;
}
/**
* component open/close/init function
*/
static int orte_ras_host_open(void)
{
mca_ras_host_component.debug =
orte_ras_host_param_register_int("debug", 1);
mca_ras_host_component.priority =
orte_ras_host_param_register_int("priority", 1);
size_t id;
mca_base_param_reg_int(&mca_ras_host_component.super.ras_version, "debug",
"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 */
mca_ras_host_component.schedule_policy =
orte_ras_host_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_ras_host_component.schedule_policy);
}
else {
mca_base_param_lookup_string(id, &mca_ras_host_component.schedule_policy);
}
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,&param_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,&param_value);
return param_value;
}
/**
* component open/close/init function
*/
static int orte_rmaps_round_robin_open(void)
{
mca_rmaps_round_robin_component.debug =
orte_rmaps_round_robin_param_register_int("debug", 1);
mca_rmaps_round_robin_component.priority =
orte_rmaps_round_robin_param_register_int("priority", 1);
size_t id;
mca_base_param_reg_int(&mca_rmaps_round_robin_component.super.rmaps_version, "debug",
"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 */
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;
}

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

@ -646,7 +646,7 @@ static int init_globals(void)
false,
false,
false,
true,
false,
0,
0,
NULL,
@ -706,14 +706,26 @@ static int parse_globals(int argc, char* argv[])
MCA param. */
/* JMS To be changed post-beta to LAM's C/N command line notation */
id = mca_base_param_register_string("ras", "base", "schedule_policy",
NULL, "slot");
if (orterun_globals.by_node) {
orterun_globals.by_slot = false;
mca_base_param_set_string(id, "node");
} else {
/* Don't initialize the MCA parameter here unless we have to,
* since it really should be initialized in ras_base_open */
if (orterun_globals.by_node || orterun_globals.by_slot) {
char *policy = NULL;
id = mca_base_param_reg_string_name("ras_base", "schedule_policy",
"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;
mca_base_param_set_string(id, "slot");
}
/* If we don't want to wait, we don't want to wait */