Fixes the BJS compile problem by updating it to use the new API. The
-bynode and -byslot orterun command line parameters now set a single MCA param (ras_base_schedule_policy) which is looked up by the following components to decide which RAS base API function to invoke: ras base bjs ras base host rmaps round_robin This commit was SVN r5941.
Этот коммит содержится в:
родитель
620e55516e
Коммит
9e9a93e2ab
@ -232,7 +232,11 @@ static int orte_ras_bjs_allocate(orte_jobid_t jobid)
|
||||
ORTE_ERROR_LOG(rc);
|
||||
return rc;
|
||||
}
|
||||
rc = orte_ras_base_allocate_nodes(jobid, &nodes);
|
||||
if (0 == strcmp(mca_ras_bjs_component.schedule_policy, "node")) {
|
||||
rc = orte_ras_base_allocate_nodes_by_node(jobid, &nodes);
|
||||
} else {
|
||||
rc = orte_ras_base_allocate_nodes_by_slot(jobid, &nodes);
|
||||
}
|
||||
if(ORTE_SUCCESS != rc) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ struct orte_ras_bjs_component_t {
|
||||
orte_ras_base_component_t super;
|
||||
int debug;
|
||||
int priority;
|
||||
char *schedule_policy;
|
||||
};
|
||||
typedef struct orte_ras_bjs_component_t orte_ras_bjs_component_t;
|
||||
|
||||
|
@ -77,11 +77,11 @@ static int orte_ras_bjs_param_register_int(
|
||||
|
||||
|
||||
static char* orte_ras_bjs_param_register_string(
|
||||
const char* param_name,
|
||||
const char * a, const char *b, const char *c,
|
||||
const char* default_value)
|
||||
{
|
||||
char *param_value;
|
||||
int id = mca_base_param_register_string("ras","bjs",param_name,NULL,default_value);
|
||||
int id = mca_base_param_register_string(a, b, c, NULL, default_value);
|
||||
mca_base_param_lookup_string(id, ¶m_value);
|
||||
return param_value;
|
||||
}
|
||||
@ -94,6 +94,9 @@ static int orte_ras_bjs_open(void)
|
||||
{
|
||||
mca_ras_bjs_component.debug = orte_ras_bjs_param_register_int("debug",1);
|
||||
mca_ras_bjs_component.priority = orte_ras_bjs_param_register_int("priority",75);
|
||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||
mca_ras_bjs_component.schedule_policy =
|
||||
orte_ras_bjs_param_register_string("ras", "base", "schedule_policy", "slot");
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -77,11 +77,10 @@ static int orte_ras_host_param_register_int(
|
||||
|
||||
|
||||
static char *orte_rmaps_round_robin_param_register_string(
|
||||
const char* param_name,
|
||||
const char * a, const char *b, const char *c,
|
||||
char *default_value)
|
||||
{
|
||||
int id = mca_base_param_register_string("ras", "host",
|
||||
param_name, NULL, 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;
|
||||
@ -97,8 +96,9 @@ static int orte_ras_host_open(void)
|
||||
orte_ras_host_param_register_int("debug", 1);
|
||||
mca_ras_host_component.priority =
|
||||
orte_ras_host_param_register_int("priority", 1);
|
||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||
mca_ras_host_component.schedule_policy =
|
||||
orte_rmaps_round_robin_param_register_string("policy", "slot");
|
||||
orte_rmaps_round_robin_param_register_string("ras", "base", "schedule_policy", "slot");
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -78,11 +78,10 @@ static int orte_rmaps_round_robin_param_register_int(
|
||||
|
||||
|
||||
static char *orte_rmaps_round_robin_param_register_string(
|
||||
const char* param_name,
|
||||
const char *a, const char *b, const char *c,
|
||||
char *default_value)
|
||||
{
|
||||
int id = mca_base_param_register_string("rmaps","round_robin",
|
||||
param_name,NULL,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;
|
||||
@ -98,8 +97,9 @@ static int orte_rmaps_round_robin_open(void)
|
||||
orte_rmaps_round_robin_param_register_int("debug", 1);
|
||||
mca_rmaps_round_robin_component.priority =
|
||||
orte_rmaps_round_robin_param_register_int("priority", 1);
|
||||
/* 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("policy", "slot");
|
||||
orte_rmaps_round_robin_param_register_string("ras", "base", "schedule_policy", "slot");
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ static int init_globals(void)
|
||||
static int parse_globals(int argc, char* argv[])
|
||||
{
|
||||
ompi_cmd_line_t cmd_line;
|
||||
int ras, rmaps;
|
||||
int ras;
|
||||
|
||||
/* Setup and parse the command line */
|
||||
|
||||
@ -644,21 +644,18 @@ static int parse_globals(int argc, char* argv[])
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Allocate and map by node or by slot? Shortcut for setting 2
|
||||
MCA params. */
|
||||
/* Allocate and map by node or by slot? Shortcut for setting an
|
||||
MCA param. */
|
||||
|
||||
ras = mca_base_param_register_string("ras", "host", "policy", NULL,
|
||||
"slot");
|
||||
rmaps = mca_base_param_register_string("rmaps", "round_robin", "policy",
|
||||
NULL, "slot");
|
||||
/* JMS To be changed post-beta to LAM's C/N command line notation */
|
||||
ras = 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(ras, "node");
|
||||
mca_base_param_set_string(rmaps, "node");
|
||||
} else {
|
||||
orterun_globals.by_slot = true;
|
||||
mca_base_param_set_string(ras, "slot");
|
||||
mca_base_param_set_string(rmaps, "slot");
|
||||
}
|
||||
|
||||
/* If we don't want to wait, we don't want to wait */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user