1
1

allow node number as hostname for bproc

This commit was SVN r8357.
Этот коммит содержится в:
Tim Woodall 2005-12-01 17:44:08 +00:00
родитель e135f850af
Коммит 20e6f41fe2

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

@ -106,6 +106,7 @@ static orte_ras_node_t* orte_rds_hostfile_lookup(opal_list_t* nodes, const char*
static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_list_t* updates) static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_list_t* updates)
{ {
char buff[64];
int rc; int rc;
orte_ras_node_t* node; orte_ras_node_t* node;
bool update = false; bool update = false;
@ -113,13 +114,22 @@ static int orte_rds_hostfile_parse_line(int token, opal_list_t* existing, opal_l
if (ORTE_RDS_HOSTFILE_STRING == token || if (ORTE_RDS_HOSTFILE_STRING == token ||
ORTE_RDS_HOSTFILE_HOSTNAME == token || ORTE_RDS_HOSTFILE_HOSTNAME == token ||
ORTE_RDS_HOSTFILE_INT == token ||
ORTE_RDS_HOSTFILE_IPV4 == token) { ORTE_RDS_HOSTFILE_IPV4 == token) {
char* value = orte_rds_hostfile_value.sval; char* value;
char** argv = opal_argv_split (value, '@'); char** argv;
char* node_name = NULL; char* node_name = NULL;
char* username = NULL; char* username = NULL;
int cnt; int cnt;
if(ORTE_RDS_HOSTFILE_INT == token) {
sprintf(buff,"%d", orte_rds_hostfile_value.ival);
value = buff;
} else {
value = orte_rds_hostfile_value.sval;
}
argv = opal_argv_split (value, '@');
cnt = opal_argv_count (argv); cnt = opal_argv_count (argv);
if (1 == cnt) { if (1 == cnt) {
node_name = strdup(argv[0]); node_name = strdup(argv[0]);
@ -298,6 +308,7 @@ static int orte_rds_hostfile_parse(const char *hostfile, opal_list_t* existing,
* hostname.domain and user@hostname.domain * hostname.domain and user@hostname.domain
*/ */
case ORTE_RDS_HOSTFILE_STRING: case ORTE_RDS_HOSTFILE_STRING:
case ORTE_RDS_HOSTFILE_INT:
case ORTE_RDS_HOSTFILE_HOSTNAME: case ORTE_RDS_HOSTFILE_HOSTNAME:
case ORTE_RDS_HOSTFILE_IPV4: case ORTE_RDS_HOSTFILE_IPV4:
rc = orte_rds_hostfile_parse_line(token, existing, updates); rc = orte_rds_hostfile_parse_line(token, existing, updates);