1
1

Add a global option for inputing the head node name for Windows CCP trough command line.

This commit was SVN r22688.
Этот коммит содержится в:
Shiqing Fan 2010-02-23 19:42:51 +00:00
родитель cfe37fb5a1
Коммит 7a5a5ce024
5 изменённых файлов: 37 добавлений и 23 удалений

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

@ -650,20 +650,24 @@ static int plm_ccp_connect(ICluster* pCluster)
size_t i, len;
char *cluster_head = NULL;
HRESULT hr = S_OK;
/* Get the cluster head nodes name */
_dupenv_s(&cluster_head, &len, "LOGONSERVER");
if(cluster_head == NULL) {
OPAL_OUTPUT_VERBOSE((1, orte_plm_globals.output,
"plm:ccp:allocate: connot find cluster head node!"));
return ORTE_ERROR;
}
if (NULL == orte_ccp_headnode) {
/* Get the cluster head nodes name */
_dupenv_s(&cluster_head, &len, "LOGONSERVER");
/* Get rid of the beginning '//'. */
for( i = 0; i < len; i++){
cluster_head[i] = cluster_head[i+2];
cluster_head[i+2] = '\0';
if(cluster_head == NULL) {
OPAL_OUTPUT_VERBOSE((1, orte_plm_globals.output,
"plm:ccp:allocate: connot find cluster head node!"));
return ORTE_ERROR;
}
/* Get rid of the beginning '//'. */
for( i = 0; i < len; i++){
cluster_head[i] = cluster_head[i+2];
cluster_head[i+2] = '\0';
}
} else {
cluster_head = orte_ccp_headnode;
}
/* Connect to the cluster's head node */

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

@ -84,19 +84,23 @@ static int orte_ras_ccp_allocate(opal_list_t *nodes)
return ORTE_ERROR;
}
/* Get the cluster head nodes name */
_dupenv_s(&cluster_head, &len, "LOGONSERVER");
if(NULL == orte_ccp_headnode) {
/* Get the cluster head nodes name */
_dupenv_s(&cluster_head, &len, "LOGONSERVER");
if(cluster_head == NULL) {
OPAL_OUTPUT_VERBOSE((1, orte_ras_base.ras_output,
"ras:ccp:allocate: connot find cluster head node!"));
return ORTE_ERROR;
}
if(cluster_head == NULL) {
OPAL_OUTPUT_VERBOSE((1, orte_ras_base.ras_output,
"ras:ccp:allocate: connot find cluster head node!"));
return ORTE_ERROR;
}
/* Get rid of the beginning '//'. */
for( i = 0; i < len - 2; i++){
cluster_head[i] = cluster_head[i+2];
cluster_head[i+2] = '\0';
/* Get rid of the beginning '//'. */
for( i = 0; i < len - 2; i++){
cluster_head[i] = cluster_head[i+2];
cluster_head[i+2] = '\0';
}
} else {
cluster_head = orte_ccp_headnode;
}
/* Connect to the cluster's head node */

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

@ -148,6 +148,7 @@ uint8_t orte_default_num_cores_per_socket;
char *orte_default_cpu_set;
char *orte_default_hostfile = NULL;
char *orte_rankfile;
char *orte_ccp_headnode;
/* default rank assigment and binding policy */
orte_mapping_policy_t orte_default_mapping_policy = 0;

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

@ -623,6 +623,7 @@ ORTE_DECLSPEC extern uint8_t orte_default_num_cores_per_socket;
ORTE_DECLSPEC extern char *orte_default_cpu_set;
ORTE_DECLSPEC extern char *orte_default_hostfile;
ORTE_DECLSPEC extern char *orte_rankfile;
ORTE_DECLSPEC extern char *orte_ccp_headnode;
/* default rank assigment and binding policy */
ORTE_DECLSPEC extern orte_mapping_policy_t orte_default_mapping_policy;

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

@ -224,6 +224,10 @@ int orte_register_params(void)
mca_base_param_reg_syn_name(tmp, "rmaps", "rank_file_path", false);
mca_base_param_lookup_string(tmp, &orte_rankfile);
mca_base_param_reg_string_name("orte", "ccp_headnode",
"Name of the cluster head node. (For Windows CCP only.)",
false, false,
NULL, &orte_ccp_headnode);
/* whether or not to keep FQDN hostnames */
mca_base_param_reg_int_name("orte", "keep_fqdn_hostnames",