Extend regex support to a bigger audience
This commit was SVN r25046.
Этот коммит содержится в:
родитель
ea4e2c2db4
Коммит
ca3d29a1e6
@ -34,6 +34,7 @@
|
|||||||
#include "orte/mca/errmgr/base/base.h"
|
#include "orte/mca/errmgr/base/base.h"
|
||||||
#include "orte/util/name_fns.h"
|
#include "orte/util/name_fns.h"
|
||||||
#include "orte/util/nidmap.h"
|
#include "orte/util/nidmap.h"
|
||||||
|
#include "orte/util/regex.h"
|
||||||
#include "orte/runtime/orte_globals.h"
|
#include "orte/runtime/orte_globals.h"
|
||||||
|
|
||||||
#include "orte/mca/ess/ess.h"
|
#include "orte/mca/ess/ess.h"
|
||||||
@ -79,7 +80,6 @@ static int rte_init(void)
|
|||||||
int ret;
|
int ret;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
char **hosts = NULL;
|
char **hosts = NULL;
|
||||||
char *nodelist;
|
|
||||||
|
|
||||||
/* run the prolog */
|
/* run the prolog */
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
||||||
@ -94,12 +94,12 @@ static int rte_init(void)
|
|||||||
* default procedure
|
* default procedure
|
||||||
*/
|
*/
|
||||||
if (ORTE_PROC_IS_DAEMON) {
|
if (ORTE_PROC_IS_DAEMON) {
|
||||||
/* get the list of nodes used for this job */
|
if (NULL != orte_node_regex) {
|
||||||
nodelist = getenv("OMPI_MCA_orte_nodelist");
|
/* extract the nodes */
|
||||||
|
if (ORTE_SUCCESS != (ret = orte_regex_extract_node_names(orte_node_regex, &hosts))) {
|
||||||
if (NULL != nodelist) {
|
error = "orte_regex_extract_node_names";
|
||||||
/* split the node list into an argv array */
|
goto error;
|
||||||
hosts = opal_argv_split(nodelist, ',');
|
}
|
||||||
}
|
}
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
||||||
ORTE_ERROR_LOG(ret);
|
ORTE_ERROR_LOG(ret);
|
||||||
|
14
orte/mca/ess/env/ess_env_module.c
поставляемый
14
orte/mca/ess/env/ess_env_module.c
поставляемый
@ -64,6 +64,7 @@
|
|||||||
#include "orte/util/session_dir.h"
|
#include "orte/util/session_dir.h"
|
||||||
#include "orte/util/name_fns.h"
|
#include "orte/util/name_fns.h"
|
||||||
#include "orte/util/nidmap.h"
|
#include "orte/util/nidmap.h"
|
||||||
|
#include "orte/util/regex.h"
|
||||||
|
|
||||||
#include "orte/runtime/runtime.h"
|
#include "orte/runtime/runtime.h"
|
||||||
#include "orte/runtime/orte_wait.h"
|
#include "orte/runtime/orte_wait.h"
|
||||||
@ -120,7 +121,6 @@ static int rte_init(void)
|
|||||||
int ret;
|
int ret;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
char **hosts = NULL;
|
char **hosts = NULL;
|
||||||
char *nodelist;
|
|
||||||
|
|
||||||
/* run the prolog */
|
/* run the prolog */
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
||||||
@ -135,12 +135,12 @@ static int rte_init(void)
|
|||||||
* default procedure
|
* default procedure
|
||||||
*/
|
*/
|
||||||
if (ORTE_PROC_IS_DAEMON) {
|
if (ORTE_PROC_IS_DAEMON) {
|
||||||
/* get the list of nodes used for this job */
|
if (NULL != orte_node_regex) {
|
||||||
nodelist = getenv("OMPI_MCA_orte_nodelist");
|
/* extract the nodes */
|
||||||
|
if (ORTE_SUCCESS != (ret = orte_regex_extract_node_names(orte_node_regex, &hosts))) {
|
||||||
if (NULL != nodelist) {
|
error = "orte_regex_extract_node_names";
|
||||||
/* split the node list into an argv array */
|
goto error;
|
||||||
hosts = opal_argv_split(nodelist, ',');
|
}
|
||||||
}
|
}
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
||||||
ORTE_ERROR_LOG(ret);
|
ORTE_ERROR_LOG(ret);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include "opal/mca/base/mca_base_param.h"
|
#include "opal/mca/base/mca_base_param.h"
|
||||||
#include "orte/mca/errmgr/errmgr.h"
|
#include "orte/mca/errmgr/errmgr.h"
|
||||||
#include "orte/util/nidmap.h"
|
#include "orte/util/nidmap.h"
|
||||||
|
#include "orte/util/regex.h"
|
||||||
|
|
||||||
#include "orte/mca/ess/ess.h"
|
#include "orte/mca/ess/ess.h"
|
||||||
#include "orte/mca/ess/base/base.h"
|
#include "orte/mca/ess/base/base.h"
|
||||||
@ -85,7 +86,6 @@ static int rte_init(void)
|
|||||||
int ret;
|
int ret;
|
||||||
char *error = NULL;
|
char *error = NULL;
|
||||||
char **hosts = NULL;
|
char **hosts = NULL;
|
||||||
char *nodelist;
|
|
||||||
|
|
||||||
/* run the prolog */
|
/* run the prolog */
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
|
||||||
@ -100,12 +100,12 @@ static int rte_init(void)
|
|||||||
* default procedure
|
* default procedure
|
||||||
*/
|
*/
|
||||||
if (ORTE_PROC_IS_DAEMON) {
|
if (ORTE_PROC_IS_DAEMON) {
|
||||||
/* get the list of nodes used for this job */
|
if (NULL != orte_node_regex) {
|
||||||
nodelist = getenv("OMPI_MCA_orte_nodelist");
|
/* extract the nodes */
|
||||||
|
if (ORTE_SUCCESS != (ret = orte_regex_extract_node_names(orte_node_regex, &hosts))) {
|
||||||
if (NULL != nodelist) {
|
error = "orte_regex_extract_node_names";
|
||||||
/* split the node list into an argv array */
|
goto error;
|
||||||
hosts = opal_argv_split(nodelist, ',');
|
}
|
||||||
}
|
}
|
||||||
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
if (ORTE_SUCCESS != (ret = orte_ess_base_orted_setup(hosts))) {
|
||||||
ORTE_ERROR_LOG(ret);
|
ORTE_ERROR_LOG(ret);
|
||||||
|
@ -323,6 +323,21 @@ static int spawn(orte_job_t *jdata)
|
|||||||
* doing this.
|
* doing this.
|
||||||
*/
|
*/
|
||||||
app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, 0);
|
app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, 0);
|
||||||
|
|
||||||
|
/* if we are using static ports, then setup a string showing the
|
||||||
|
* nodes so we can use a regex to pass connection info
|
||||||
|
*/
|
||||||
|
if (orte_static_ports) {
|
||||||
|
for (nnode=0; nnode < map->nodes->size; nnode++) {
|
||||||
|
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(map->nodes, nnode))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
opal_argv_append_nosize(&nodes, node->name);
|
||||||
|
}
|
||||||
|
nodelist = opal_argv_join(nodes, ',');
|
||||||
|
opal_argv_free(nodes);
|
||||||
|
}
|
||||||
|
|
||||||
/* we also need at least one node name so we can check what shell is
|
/* we also need at least one node name so we can check what shell is
|
||||||
* being used, if we have to
|
* being used, if we have to
|
||||||
*/
|
*/
|
||||||
@ -339,20 +354,6 @@ static int spawn(orte_job_t *jdata)
|
|||||||
}
|
}
|
||||||
prefix_dir = app->prefix_dir;
|
prefix_dir = app->prefix_dir;
|
||||||
|
|
||||||
/* if we are using static ports, then setup a string showing the
|
|
||||||
* nodes so we can use a regex to pass connection info
|
|
||||||
*/
|
|
||||||
if (orte_static_ports) {
|
|
||||||
for (nnode=0; nnode < map->nodes->size; nnode++) {
|
|
||||||
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(map->nodes, nnode))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
opal_argv_append_nosize(&nodes, node->name);
|
|
||||||
}
|
|
||||||
nodelist = opal_argv_join(nodes, ',');
|
|
||||||
opal_argv_free(nodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* setup the launch */
|
/* setup the launch */
|
||||||
if (ORTE_SUCCESS != (rc = orte_plm_base_rsh_setup_launch(&argc, &argv, node->name, &node_name_index1,
|
if (ORTE_SUCCESS != (rc = orte_plm_base_rsh_setup_launch(&argc, &argv, node->name, &node_name_index1,
|
||||||
&proc_vpid_index, prefix_dir, nodelist))) {
|
&proc_vpid_index, prefix_dir, nodelist))) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user