Fixed remote environment setup. Submitted by: Tim Woodall
This commit was SVN r9759.
Этот коммит содержится в:
родитель
bafc16f724
Коммит
7a6e0c9ebf
@ -244,6 +244,15 @@ int orte_pls_xcpu_launch(orte_jobid_t jobid){
|
|||||||
*/
|
*/
|
||||||
opal_argv_insert(&(map->app->argv), 0, header);
|
opal_argv_insert(&(map->app->argv), 0, header);
|
||||||
|
|
||||||
|
/** we also need to pass the proper environment to the remote
|
||||||
|
* process so it knows its universe, gpr and ns replicas, etc. Since this
|
||||||
|
* can be specified by the user for each app, we have to do this
|
||||||
|
* each time.
|
||||||
|
*/
|
||||||
|
if (ORTE_SUCCESS != (rc = orte_pls_xcpu_setup_env(&map->app->env))) {
|
||||||
|
ORTE_ERROR_LOG(rc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/** since it is possible that each node could be executing a different application,
|
/** since it is possible that each node could be executing a different application,
|
||||||
* we cannot just do a mass launch - that would only be supported in the special
|
* we cannot just do a mass launch - that would only be supported in the special
|
||||||
@ -252,6 +261,7 @@ int orte_pls_xcpu_launch(orte_jobid_t jobid){
|
|||||||
*/
|
*/
|
||||||
proc_id=0;
|
proc_id=0;
|
||||||
while (proc_id < map->num_procs){
|
while (proc_id < map->num_procs){
|
||||||
|
char** env;
|
||||||
proc = (orte_rmaps_base_proc_t*)(map->procs[proc_id]);
|
proc = (orte_rmaps_base_proc_t*)(map->procs[proc_id]);
|
||||||
node = proc->proc_node;
|
node = proc->proc_node;
|
||||||
proc_id++;
|
proc_id++;
|
||||||
@ -269,22 +279,15 @@ int orte_pls_xcpu_launch(orte_jobid_t jobid){
|
|||||||
if (NULL != map->app->argv[1]) free(map->app->argv[1]);
|
if (NULL != map->app->argv[1]) free(map->app->argv[1]);
|
||||||
map->app->argv[1] = strdup(node->node->node_name);
|
map->app->argv[1] = strdup(node->node->node_name);
|
||||||
|
|
||||||
/** we also need to pass the proper environment to the remote
|
/* create a copy of the environment and modify for this proc */
|
||||||
* process so it knows its universe, gpr and ns replicas, etc. Since this
|
env = opal_argv_copy(map->app->env);
|
||||||
* can be specified by the user for each app, we have to do this
|
|
||||||
* each time.
|
|
||||||
*/
|
|
||||||
if (ORTE_SUCCESS != (rc = orte_pls_xcpu_setup_env(&map->app->env))) {
|
|
||||||
ORTE_ERROR_LOG(rc);
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** now setup the process name in the environment so we can
|
/** now setup the process name in the environment so we can
|
||||||
* retrieve it on the other end
|
* retrieve it on the other end
|
||||||
*/
|
*/
|
||||||
if (ORTE_SUCCESS != (rc = orte_ns_nds_env_put(&(proc->proc_name),
|
if (ORTE_SUCCESS != (rc = orte_ns_nds_env_put(&(proc->proc_name),
|
||||||
vpid_start, map->num_procs,
|
vpid_start, map->num_procs,
|
||||||
&(map->app->env)))) {
|
&env))) {
|
||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@ -298,18 +301,18 @@ int orte_pls_xcpu_launch(orte_jobid_t jobid){
|
|||||||
t_stack=temp_stack;
|
t_stack=temp_stack;
|
||||||
|
|
||||||
/** launch the process */
|
/** launch the process */
|
||||||
t_stack->tid=lrx(argc, map->app->argv, map->app->env);
|
t_stack->tid=lrx(argc, map->app->argv, env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** wait for all threads that have launched processes on remote nodes */
|
/** wait for all threads that have launched processes on remote nodes */
|
||||||
temp_stack=t_stack;
|
/*temp_stack=t_stack;
|
||||||
while(t_stack){
|
while(t_stack){
|
||||||
pthread_join(t_stack->tid, NULL);
|
pthread_join(t_stack->tid, NULL);
|
||||||
t_stack=t_stack->next;
|
t_stack=t_stack->next;
|
||||||
}
|
}
|
||||||
orte_soh.begin_monitoring_job(jobid);
|
orte_soh.begin_monitoring_job(jobid);
|
||||||
|
*/
|
||||||
/** cleanup local storage */
|
/** cleanup local storage */
|
||||||
orte_pls_xcpu_free_stack(temp_stack);
|
orte_pls_xcpu_free_stack(temp_stack);
|
||||||
OBJ_DESTRUCT(&mapping);
|
OBJ_DESTRUCT(&mapping);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user