allow node number as hostname for bproc
This commit was SVN r8357.
Этот коммит содержится в:
родитель
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);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user