1
1

Once again, fix the blasted singleton comm_spawn

Этот коммит содержится в:
Ralph Castain 2015-02-05 17:33:57 -08:00
родитель 0dbbffb753
Коммит a3275aa867
4 изменённых файлов: 27 добавлений и 14 удалений

Просмотреть файл

@ -190,19 +190,18 @@ static int native_init(void)
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
"%s pmix:native NULL uri",
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME));
if (opal_pmix_base_allow_delayed_server) {
if (NULL != (srv = getenv("PMIX_SERVER_URI"))) {
mca_pmix_native_component.uri = strdup(srv);
mca_pmix_native_component.id = OPAL_PROC_MY_NAME;
} else if (opal_pmix_base_allow_delayed_server) {
/* not ready yet, so decrement our init_cntr so we can come thru
* here again */
--init_cntr;
/* let the caller know that the server isn't available yet */
return OPAL_ERR_SERVER_NOT_AVAIL;
}
if (NULL == (srv = getenv("PMIX_SERVER_URI"))) {
/* error out - should have been here, but isn't */
} else {
return OPAL_ERROR;
}
mca_pmix_native_component.uri = strdup(srv);
mca_pmix_native_component.id = OPAL_PROC_MY_NAME;
}
/* if we have it, setup the path to the daemon rendezvous point */

Просмотреть файл

@ -80,7 +80,7 @@ static int pmi_component_query(mca_base_module_t **module, int *priority)
return ret;
}
if (OPAL_SUCCESS != (ret = opal_pmix_base_select())) {
ORTE_ERROR_LOG(ret);
/* don't error log this as it might not be an error at all */
*priority = -1;
*module = NULL;
(void) mca_base_framework_close(&opal_pmix_base_framework);

Просмотреть файл

@ -99,9 +99,10 @@ int orte_plm_proxy_spawn(orte_job_t *jdata)
{
opal_buffer_t *buf;
orte_plm_cmd_flag_t command;
int rc;
int rc, i;
orte_proxy_spawn_t *ps;
orte_app_context_t *app;
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
"%s plm:base:proxy spawn child job",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
@ -136,7 +137,18 @@ int orte_plm_proxy_spawn(orte_job_t *jdata)
OBJ_RELEASE(buf);
goto CLEANUP;
}
/* ensure that our prefix is passed along so that any launching daemons
* use the correct path */
for (i=0; i < jdata->apps->size; i++) {
if (NULL != (app = (orte_app_context_t*)opal_pointer_array_get_item(jdata->apps, i))) {
if (!orte_get_attribute(&app->attributes, ORTE_APP_PREFIX_DIR, NULL, OPAL_STRING)) {
orte_set_attribute(&app->attributes, ORTE_APP_PREFIX_DIR, ORTE_ATTR_GLOBAL,
opal_install_dirs.prefix, OPAL_STRING);
}
}
}
/* pack the jdata object */
if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &jdata, 1, ORTE_JOB))) {
ORTE_ERROR_LOG(rc);

Просмотреть файл

@ -3,6 +3,7 @@
* All rights reserved.
* Copyright (c) 2004-2008 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -49,15 +50,16 @@ orte_routed_component_t mca_routed_direct_component = {
static int orte_routed_direct_component_query(mca_base_module_t **module, int *priority)
{
/* if we are an app and no daemon URI has been provided, then
* we must be chosen */
if (ORTE_PROC_IS_APP && !ORTE_PROC_IS_SINGLETON &&
NULL == orte_process_info.my_daemon_uri) {
/* if we are an app and no daemon URI has been provided, or
* we are a singleton, then we must be chosen */
if (ORTE_PROC_IS_APP && NULL == orte_process_info.my_daemon_uri) {
/* we are direct launched, so set some arbitrary value
* for the daemon name */
ORTE_PROC_MY_DAEMON->jobid = 0;
ORTE_PROC_MY_DAEMON->vpid = 0;
*priority = 100;
} else if (ORTE_PROC_IS_SINGLETON) {
*priority = 100;
} else {
/* allow selection only when specifically requested */
*priority = 0;