Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions orte/mca/ess/singleton/ess_singleton_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
* All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 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
Expand Down Expand Up @@ -74,7 +76,6 @@ static bool added_transport_keys=false;
static bool added_num_procs = false;
static bool added_app_ctx = false;
static bool added_pmix_envs = false;
static char *pmixenvars[4];
static bool progress_thread_running = false;

static int fork_hnp(void);
Expand All @@ -83,9 +84,9 @@ static int rte_init(void)
{
int rc, ret;
char *error = NULL;
char *envar, *ev1, *ev2;
uint64_t unique_key[2];
char *string_key;
char *envar;
opal_value_t *kv;
char *val;
int u32, *u32ptr;
Expand Down Expand Up @@ -225,13 +226,17 @@ static int rte_init(void)
* MPI-3 required info key
*/
if (NULL == getenv(OPAL_MCA_PREFIX"orte_ess_num_procs")) {
asprintf(&ev1, OPAL_MCA_PREFIX"orte_ess_num_procs=%d", orte_process_info.num_procs);
putenv(ev1);
char * num_procs;
asprintf(&num_procs, "%d", orte_process_info.num_procs);
opal_setenv(OPAL_MCA_PREFIX"orte_ess_num_procs", num_procs, true, &environ);
free(num_procs);
added_num_procs = true;
}
if (NULL == getenv("OMPI_APP_CTX_NUM_PROCS")) {
asprintf(&ev2, "OMPI_APP_CTX_NUM_PROCS=%d", orte_process_info.num_procs);
putenv(ev2);
char * num_procs;
asprintf(&num_procs, "%d", orte_process_info.num_procs);
opal_setenv("OMPI_APP_CTX_NUM_PROCS", num_procs, true, &environ);
free(num_procs);
added_app_ctx = true;
}

Expand Down Expand Up @@ -546,6 +551,8 @@ static int fork_hnp(void)
exit(1);

} else {
int count;

free(cmd);
/* I am the parent - wait to hear something back and
* report results
Expand Down Expand Up @@ -612,14 +619,13 @@ static int fork_hnp(void)

/* split the pmix_uri into its parts */
argv = opal_argv_split(cptr, ',');
if (4 != opal_argv_count(argv)) {
opal_argv_free(argv);
return ORTE_ERR_BAD_PARAM;
}
count = opal_argv_count(argv);
/* push each piece into the environment */
for (i=0; i < 4; i++) {
pmixenvars[i] = strdup(argv[i]);
putenv(pmixenvars[i]);
for (i=0; i < count; i++) {
char *c = strchr(argv[i], '=');
assert(NULL != c);
*c++ = '\0';
opal_setenv(argv[i], c, true, &environ);
}
opal_argv_free(argv);
added_pmix_envs = true;
Expand Down
5 changes: 3 additions & 2 deletions orte/mca/odls/base/odls_base_default_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Copyright (c) 2011-2015 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017 Mellanox Technologies Ltd. All rights reserved.
Expand Down Expand Up @@ -167,7 +167,8 @@ int orte_odls_base_default_get_add_procs_data(opal_buffer_t *data,
* copy of all active jobs so the grpcomm collectives can
* properly work should a proc from one of the other jobs
* interact with this one */
if (orte_get_attribute(&jdata->attributes, ORTE_JOB_LAUNCHED_DAEMONS, NULL, OPAL_BOOL)) {
if (orte_get_attribute(&jdata->attributes, ORTE_JOB_LAUNCHED_DAEMONS, NULL, OPAL_BOOL) ||
ORTE_JOBID_INVALID != jdata->originator.jobid) {
OBJ_CONSTRUCT(&jobdata, opal_buffer_t);
numjobs = 0;
for (i=0; i < orte_job_data->size; i++) {
Expand Down
4 changes: 2 additions & 2 deletions orte/mca/plm/base/plm_base_launch_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Copyright (c) 2009 Institut National de Recherche en Informatique
* et Automatique. All rights reserved.
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 IBM Corporation. All rights reserved.
Expand Down Expand Up @@ -625,7 +625,7 @@ void orte_plm_base_post_launch(int fd, short args, void *cbdata)
* it won't register and we need to send the response now.
* Otherwise, it is an MPI job and we should wait for it
* to register */
if (!orte_get_attribute(&jdata->attributes, ORTE_JOB_NON_ORTE_JOB, NULL, OPAL_BOOL)) {
if (orte_get_attribute(&jdata->attributes, ORTE_JOB_NON_ORTE_JOB, NULL, OPAL_BOOL)) {
OPAL_OUTPUT_VERBOSE((5, orte_plm_base_framework.framework_output,
"%s plm:base:launch job %s is not MPI",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
Expand Down
5 changes: 3 additions & 2 deletions orte/orted/orted_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Copyright (c) 2009 Institut National de Recherche en Informatique
* et Automatique. All rights reserved.
* Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
Expand Down Expand Up @@ -537,6 +537,7 @@ int orte_daemon(int argc, char *argv[])
app->app = strdup("singleton");
app->num_procs = 1;
opal_pointer_array_add(jdata->apps, app);
jdata->num_apps = 1;

/* setup a proc object for the singleton - since we
* -must- be the HNP, and therefore we stored our
Expand Down Expand Up @@ -591,7 +592,7 @@ int orte_daemon(int argc, char *argv[])
/* create a string that contains our uri + sysinfo + PMIx server URI envars */
orte_util_convert_sysinfo_to_string(&sysinfo, orte_local_cpu_type, orte_local_cpu_model);
asprintf(&tmp, "%s[%s]%s", orte_process_info.my_daemon_uri, sysinfo, nptr);
free(sysinfo);
free(sysinfo);
free(nptr);

/* pass that info to the singleton */
Expand Down