Merge pull request #2225 from ggouaillardet/topic/port_in_hostfile
add support for port=<port> in a hostfile for plm/rsh
Этот коммит содержится в:
Коммит
4237f1192e
@ -990,6 +990,7 @@ static void launch_daemons(int fd, short args, void *cbdata)
|
|||||||
orte_plm_rsh_caddy_t *caddy;
|
orte_plm_rsh_caddy_t *caddy;
|
||||||
opal_list_t coll;
|
opal_list_t coll;
|
||||||
char *username;
|
char *username;
|
||||||
|
int port, *portptr;
|
||||||
orte_namelist_t *child;
|
orte_namelist_t *child;
|
||||||
|
|
||||||
/* if we are launching debugger daemons, then just go
|
/* if we are launching debugger daemons, then just go
|
||||||
@ -1242,6 +1243,15 @@ static void launch_daemons(int fd, short args, void *cbdata)
|
|||||||
caddy = OBJ_NEW(orte_plm_rsh_caddy_t);
|
caddy = OBJ_NEW(orte_plm_rsh_caddy_t);
|
||||||
caddy->argc = argc;
|
caddy->argc = argc;
|
||||||
caddy->argv = opal_argv_copy(argv);
|
caddy->argv = opal_argv_copy(argv);
|
||||||
|
/* insert the alternate port if any */
|
||||||
|
portptr = &port;
|
||||||
|
if (orte_get_attribute(&node->attributes, ORTE_NODE_PORT, (void**)&portptr, OPAL_INT)) {
|
||||||
|
char portname[16];
|
||||||
|
/* for the sake of simplicity, insert "-p" <port> in the duplicated argv */
|
||||||
|
opal_argv_insert_element(&caddy->argv, node_name_index1+1, "-p");
|
||||||
|
snprintf (portname, 15, "%d", port);
|
||||||
|
opal_argv_insert_element(&caddy->argv, node_name_index1+2, portname);
|
||||||
|
}
|
||||||
caddy->daemon = node->daemon;
|
caddy->daemon = node->daemon;
|
||||||
OBJ_RETAIN(caddy->daemon);
|
OBJ_RETAIN(caddy->daemon);
|
||||||
opal_list_append(&launch_list, &caddy->super);
|
opal_list_append(&launch_list, &caddy->super);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved
|
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved
|
||||||
* Copyright (c) 2014 Research Organization for Information Science
|
* Copyright (c) 2014-2016 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -173,6 +173,8 @@ const char *orte_attr_key_to_str(orte_attribute_key_t key)
|
|||||||
|
|
||||||
case ORTE_NODE_USERNAME:
|
case ORTE_NODE_USERNAME:
|
||||||
return "NODE-USERNAME";
|
return "NODE-USERNAME";
|
||||||
|
case ORTE_NODE_PORT:
|
||||||
|
return "NODE-PORT";
|
||||||
case ORTE_NODE_LAUNCH_ID:
|
case ORTE_NODE_LAUNCH_ID:
|
||||||
return "NODE-LAUNCHID";
|
return "NODE-LAUNCHID";
|
||||||
case ORTE_NODE_HOSTID:
|
case ORTE_NODE_HOSTID:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved
|
* Copyright (c) 2014-2016 Intel, Inc. All rights reserved
|
||||||
|
* Copyright (c) 2016 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -68,6 +70,7 @@ typedef uint8_t orte_node_flags_t;
|
|||||||
// we need to know the id of our "host" to help any procs on us to determine locality
|
// we need to know the id of our "host" to help any procs on us to determine locality
|
||||||
#define ORTE_NODE_ALIAS (ORTE_NODE_START_KEY + 4) // comma-separate list of alternate names for the node
|
#define ORTE_NODE_ALIAS (ORTE_NODE_START_KEY + 4) // comma-separate list of alternate names for the node
|
||||||
#define ORTE_NODE_SERIAL_NUMBER (ORTE_NODE_START_KEY + 5) // string - serial number: used if node is a coprocessor
|
#define ORTE_NODE_SERIAL_NUMBER (ORTE_NODE_START_KEY + 5) // string - serial number: used if node is a coprocessor
|
||||||
|
#define ORTE_NODE_PORT (ORTE_NODE_START_KEY + 6) // int32 - Alternate port to be passed to plm
|
||||||
|
|
||||||
#define ORTE_NODE_MAX_KEY 200
|
#define ORTE_NODE_MAX_KEY 200
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
# Copyright (c) 2012 Los Alamos National Security, LLC
|
# Copyright (c) 2012 Los Alamos National Security, LLC
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
# Copyright (c) 2016 Research Organization for Information Science
|
||||||
|
# and Technology (RIST). All rights reserved.
|
||||||
# $COPYRIGHT$
|
# $COPYRIGHT$
|
||||||
#
|
#
|
||||||
# Additional copyrights may follow
|
# Additional copyrights may follow
|
||||||
@ -24,6 +26,11 @@
|
|||||||
Open RTE was unable to open the hostfile:
|
Open RTE was unable to open the hostfile:
|
||||||
%s
|
%s
|
||||||
Check to make sure the path and filename are correct.
|
Check to make sure the path and filename are correct.
|
||||||
|
[port]
|
||||||
|
Open RTE detected a bad parameter in the hostfile:
|
||||||
|
%s
|
||||||
|
The port parameter is less than 0:
|
||||||
|
port=%d
|
||||||
[slots]
|
[slots]
|
||||||
Open RTE detected a bad parameter in the hostfile:
|
Open RTE detected a bad parameter in the hostfile:
|
||||||
%s
|
%s
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
* Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
@ -341,6 +341,17 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ORTE_HOSTFILE_PORT:
|
||||||
|
rc = hostfile_parse_int();
|
||||||
|
if (rc < 0) {
|
||||||
|
orte_show_help("help-hostfile.txt", "port",
|
||||||
|
true,
|
||||||
|
cur_hostfile_name, rc);
|
||||||
|
return ORTE_ERROR;
|
||||||
|
}
|
||||||
|
orte_set_attribute(&node->attributes, ORTE_NODE_PORT, ORTE_ATTR_LOCAL, &rc, OPAL_INT);
|
||||||
|
break;
|
||||||
|
|
||||||
case ORTE_HOSTFILE_COUNT:
|
case ORTE_HOSTFILE_COUNT:
|
||||||
case ORTE_HOSTFILE_CPU:
|
case ORTE_HOSTFILE_CPU:
|
||||||
case ORTE_HOSTFILE_SLOTS:
|
case ORTE_HOSTFILE_SLOTS:
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
* Copyright (c) 2016 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -78,5 +80,6 @@ extern orte_hostfile_value_t orte_util_hostfile_value;
|
|||||||
#define ORTE_HOSTFILE_CORES_PER_SOCKET 19
|
#define ORTE_HOSTFILE_CORES_PER_SOCKET 19
|
||||||
/* ensure we can handle a rank_file input */
|
/* ensure we can handle a rank_file input */
|
||||||
#define ORTE_HOSTFILE_RANK 20
|
#define ORTE_HOSTFILE_RANK 20
|
||||||
|
#define ORTE_HOSTFILE_PORT 21
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
||||||
* Copyright (c) 2015 Research Organization for Information Science
|
* Copyright (c) 2015-2016 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
@ -127,6 +127,9 @@ username { orte_util_hostfile_value.sval = yytext;
|
|||||||
"user_name" { orte_util_hostfile_value.sval = yytext;
|
"user_name" { orte_util_hostfile_value.sval = yytext;
|
||||||
return ORTE_HOSTFILE_USERNAME; }
|
return ORTE_HOSTFILE_USERNAME; }
|
||||||
|
|
||||||
|
port { orte_util_hostfile_value.sval = yytext;
|
||||||
|
return ORTE_HOSTFILE_PORT; }
|
||||||
|
|
||||||
boards { orte_util_hostfile_value.sval = yytext;
|
boards { orte_util_hostfile_value.sval = yytext;
|
||||||
return ORTE_HOSTFILE_BOARDS; }
|
return ORTE_HOSTFILE_BOARDS; }
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user