Fix the MCA param passing issue, at least for rsh at the moment. I will clean this up and move it to the other environments once I shift back to a local computer.
This commit was SVN r12224.
Этот коммит содержится в:
родитель
b07a6b1d7a
Коммит
02efd07b60
@ -531,12 +531,6 @@ static int odls_default_fork_local_proc(
|
||||
} else {
|
||||
environ_copy = opal_argv_copy(base_environ);
|
||||
}
|
||||
/* purge any disallowed component directives */
|
||||
if (ORTE_SUCCESS != orte_odls_base_purge_environment(&environ_copy)) {
|
||||
/* Tell the parent that Badness happened */
|
||||
write(p[1], &i, sizeof(int));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/* special case handling for --prefix: this is somewhat icky,
|
||||
but at least some users do this. :-\ It is possible that
|
||||
|
@ -922,19 +922,19 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
|
||||
* won't work on remote nodes
|
||||
*/
|
||||
var = mca_base_param_environ_variable("rds",NULL,NULL);
|
||||
opal_unsetenv(var, &env);
|
||||
opal_setenv(var, "0", true, &env);
|
||||
free(var);
|
||||
var = mca_base_param_environ_variable("ras",NULL,NULL);
|
||||
opal_unsetenv(var, &env);
|
||||
opal_setenv(var, "0", true, &env);
|
||||
free(var);
|
||||
var = mca_base_param_environ_variable("rmaps",NULL,NULL);
|
||||
opal_unsetenv(var, &env);
|
||||
opal_setenv(var, "0", true, &env);
|
||||
free(var);
|
||||
var = mca_base_param_environ_variable("pls",NULL,NULL);
|
||||
opal_unsetenv(var, &env);
|
||||
opal_setenv(var, "0", true, &env);
|
||||
free(var);
|
||||
var = mca_base_param_environ_variable("rmgr",NULL,NULL);
|
||||
opal_unsetenv(var, &env);
|
||||
opal_setenv(var, "0", true, &env);
|
||||
free(var);
|
||||
|
||||
/* exec the daemon */
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "opal/class/opal_list.h"
|
||||
#include "opal/util/trace.h"
|
||||
#include "opal/util/output.h"
|
||||
#include "opal/mca/base/mca_base_param.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/mca/rds/rds.h"
|
||||
@ -114,7 +116,9 @@ static int orte_rmgr_urm_setup_job(
|
||||
orte_jobid_t* jobid)
|
||||
{
|
||||
int rc;
|
||||
|
||||
char *param;
|
||||
orte_std_cntr_t i;
|
||||
|
||||
OPAL_TRACE(1);
|
||||
|
||||
/* allocate a jobid */
|
||||
@ -123,6 +127,35 @@ static int orte_rmgr_urm_setup_job(
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* for each app_context, we need to purge their environment of HNP
|
||||
* MCA component selection directives
|
||||
*/
|
||||
param = mca_base_param_environ_variable("rds",NULL,NULL);
|
||||
for (i=0; i < num_context; i++) {
|
||||
opal_setenv(param, "proxy", true, &app_context[i]->env);
|
||||
}
|
||||
free(param);
|
||||
param = mca_base_param_environ_variable("ras",NULL,NULL);
|
||||
for (i=0; i < num_context; i++) {
|
||||
opal_setenv(param, "proxy", true, &app_context[i]->env);
|
||||
}
|
||||
free(param);
|
||||
param = mca_base_param_environ_variable("rmaps",NULL,NULL);
|
||||
for (i=0; i < num_context; i++) {
|
||||
opal_setenv(param, "proxy", true, &app_context[i]->env);
|
||||
}
|
||||
free(param);
|
||||
param = mca_base_param_environ_variable("pls",NULL,NULL);
|
||||
for (i=0; i < num_context; i++) {
|
||||
opal_setenv(param, "proxy", true, &app_context[i]->env);
|
||||
}
|
||||
free(param);
|
||||
param = mca_base_param_environ_variable("rmgr",NULL,NULL);
|
||||
for (i=0; i < num_context; i++) {
|
||||
opal_setenv(param, "proxy", true, &app_context[i]->env);
|
||||
}
|
||||
free(param);
|
||||
|
||||
/* create and initialize job segment */ /* JJH C/N mapping before this */
|
||||
if (ORTE_SUCCESS !=
|
||||
(rc = orte_rmgr_base_put_app_context(*jobid, app_context,
|
||||
|
@ -5,6 +5,8 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
int msg;
|
||||
MPI_Comm parent, child;
|
||||
int rank, size;
|
||||
char hostname[512];
|
||||
|
||||
MPI_Init(NULL, NULL);
|
||||
MPI_Comm_get_parent(&parent);
|
||||
@ -22,11 +24,14 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
/* Otherwise, we're the child */
|
||||
else {
|
||||
printf("Hello from the child!\n");
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &size);
|
||||
gethostname(hostname, 512);
|
||||
printf("Hello from the child %d of %d on host %s\n", rank, size, hostname);
|
||||
MPI_Recv(&msg, 1, MPI_INT, 0, 1, parent, MPI_STATUS_IGNORE);
|
||||
printf("Child received msg: %d\n", msg);
|
||||
printf("Child %d received msg: %d\n", rank, msg);
|
||||
MPI_Comm_disconnect(&parent);
|
||||
printf("Child disconnected\n");
|
||||
printf("Child %d disconnected\n", rank);
|
||||
}
|
||||
|
||||
MPI_Finalize();
|
||||
|
@ -196,42 +196,11 @@ int main(int argc, char *argv[])
|
||||
char *jobidstring;
|
||||
orte_gpr_value_t *value;
|
||||
char *segment;
|
||||
char *param;
|
||||
int i;
|
||||
|
||||
/* initialize the globals */
|
||||
memset(&orted_globals, 0, sizeof(orted_globals_t));
|
||||
|
||||
/* Protect the daemon and any child processes from MCA params that select
|
||||
* specific components. We want to be free to select the proxy components,
|
||||
* so we have to ensure that we aren't picking up directives intended for HNPs.
|
||||
*/
|
||||
if(NULL == (param = mca_base_param_environ_variable("rds",NULL,NULL))) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
unsetenv(param);
|
||||
free(param);
|
||||
if(NULL == (param = mca_base_param_environ_variable("ras",NULL,NULL))) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
unsetenv(param);
|
||||
free(param);
|
||||
if(NULL == (param = mca_base_param_environ_variable("rmaps",NULL,NULL))) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
unsetenv(param);
|
||||
free(param);
|
||||
if(NULL == (param = mca_base_param_environ_variable("pls",NULL,NULL))) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
unsetenv(param);
|
||||
free(param);
|
||||
if(NULL == (param = mca_base_param_environ_variable("rmgr",NULL,NULL))) {
|
||||
return ORTE_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
unsetenv(param);
|
||||
free(param);
|
||||
|
||||
/* save the environment for use when launching application processes */
|
||||
orted_globals.saved_environ = opal_argv_copy(environ);
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user