orte/util/hostfile: add the port=<port> option
add the option to pass an alternate port to plm for example node0 port=2222 directs the plm (via the ORTE_NODE_PORT) attribute to use the non default port 2222 (e.g. ssh -p 2222 node0 ...)
Этот коммит содержится в:
родитель
73ea87800b
Коммит
40424c9d0f
@ -12,6 +12,8 @@
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2012 Los Alamos National Security, LLC
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2016 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -24,6 +26,11 @@
|
||||
Open RTE was unable to open the hostfile:
|
||||
%s
|
||||
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]
|
||||
Open RTE detected a bad parameter in the hostfile:
|
||||
%s
|
||||
|
@ -13,7 +13,7 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2011 Cisco Systems, 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.
|
||||
* Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -341,6 +341,17 @@ static int hostfile_parse_line(int token, opal_list_t* updates,
|
||||
}
|
||||
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_CPU:
|
||||
case ORTE_HOSTFILE_SLOTS:
|
||||
|
@ -10,6 +10,8 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* 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$
|
||||
*
|
||||
@ -78,5 +80,6 @@ extern orte_hostfile_value_t orte_util_hostfile_value;
|
||||
#define ORTE_HOSTFILE_CORES_PER_SOCKET 19
|
||||
/* ensure we can handle a rank_file input */
|
||||
#define ORTE_HOSTFILE_RANK 20
|
||||
#define ORTE_HOSTFILE_PORT 21
|
||||
|
||||
#endif
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* 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.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -127,6 +127,9 @@ username { orte_util_hostfile_value.sval = yytext;
|
||||
"user_name" { orte_util_hostfile_value.sval = yytext;
|
||||
return ORTE_HOSTFILE_USERNAME; }
|
||||
|
||||
port { orte_util_hostfile_value.sval = yytext;
|
||||
return ORTE_HOSTFILE_PORT; }
|
||||
|
||||
boards { orte_util_hostfile_value.sval = yytext;
|
||||
return ORTE_HOSTFILE_BOARDS; }
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user