Hmmm….this actually isn’t quite correct as we aren’t guaranteed to know our binding that early in the procedure (see orte/mca/ess/base/ess_base_fns.c, the orte_ess_base_proc_binding function). I think I see the right fix, so I’ll update this a bit later.
> On Dec 25, 2014, at 10:40 PM, git...@crest.iu.edu wrote: > > This is an automated email from the git hooks/post-receive script. It was > generated because a ref change was pushed to the repository containing > the project "open-mpi/ompi". > > The branch, master has been updated > via 9e9261e90aef7611a919d005312ce0e6a9c5856e (commit) > from 24df0ed039510cca3801f7d2b1315e48982b4a6b (commit) > > Those revisions listed above that are new to this repository have > not appeared on any other notification email; so we list those > revisions in full, below. > > - Log ----------------------------------------------------------------- > https://github.com/open-mpi/ompi/commit/9e9261e90aef7611a919d005312ce0e6a9c5856e > > commit 9e9261e90aef7611a919d005312ce0e6a9c5856e > Author: Gilles Gouaillardet <gilles.gouaillar...@iferc.org> > Date: Fri Dec 26 15:37:08 2014 +0900 > > pmix: correctly set locality flags in proc_flags > > do not use opal_process_info.cpuset which is not > set at that time. > > diff --git a/opal/mca/pmix/native/pmix_native.c > b/opal/mca/pmix/native/pmix_native.c > index 1ff007c..ea67fe1 100644 > --- a/opal/mca/pmix/native/pmix_native.c > +++ b/opal/mca/pmix/native/pmix_native.c > @@ -1306,6 +1306,19 @@ static bool native_get_attr(const char *attr, > opal_value_t **kv) > myrank = native_pname.vpid; > id.jobid = native_pname.jobid; > > +#if OPAL_HAVE_HWLOC > + /* fetch my cpuset */ > + OBJ_CONSTRUCT(&vals, opal_list_t); > + if (OPAL_SUCCESS == (rc = opal_dstore.fetch(opal_dstore_internal, > &native_pname, > + OPAL_DSTORE_CPUSET, &vals))) > { > + kp = (opal_value_t*)opal_list_get_first(&vals); > + cpuset = strdup(kp->data.string); > + } else { > + cpuset = NULL; > + } > + OPAL_LIST_DESTRUCT(&vals); > +#endif > + > /* we only need to set locality for each local rank as "not found" > * equates to "non local" */ > ranks = opal_argv_split(lclpeers->data.string, ','); > @@ -1337,7 +1350,7 @@ static bool native_get_attr(const char *attr, > opal_value_t **kv) > } else { > /* determine relative location on our node */ > locality = > opal_hwloc_base_get_relative_locality(opal_hwloc_topology, > - > opal_process_info.cpuset, > + cpuset, > > kp->data.string); > } > OPAL_LIST_DESTRUCT(&vals); > @@ -1359,6 +1372,11 @@ static bool native_get_attr(const char *attr, > opal_value_t **kv) > (void)opal_dstore.store(opal_dstore_internal, &id, &kvn); > OBJ_DESTRUCT(&kvn); > } > +#if OPAL_HAVE_HWLOC > + if (NULL != cpuset) { > + free(cpuset); > + } > +#endif > opal_argv_free(ranks); > > return found; > > > ----------------------------------------------------------------------- > > Summary of changes: > opal/mca/pmix/native/pmix_native.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > > hooks/post-receive > -- > open-mpi/ompi > _______________________________________________ > ompi-commits mailing list > ompi-comm...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/ompi-commits