@@ -139,7 +139,13 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
139139 opal_argv_append_nosize (& members , nstring );
140140 free (nstring );
141141 /* have to add the number of procs in the job so the remote side
142- * can correctly add the procs by computing their names */
142+ * can correctly add the procs by computing their names, and our nspace
143+ * so they can update their records */
144+ if (NULL == (nstring = (char * )opal_pmix .get_nspace (OMPI_PROC_MY_NAME -> jobid ))) {
145+ opal_argv_free (members );
146+ return OMPI_ERR_NOT_SUPPORTED ;
147+ }
148+ opal_argv_append_nosize (& members , nstring );
143149 (void )asprintf (& nstring , "%d" , size );
144150 opal_argv_append_nosize (& members , nstring );
145151 free (nstring );
@@ -171,6 +177,11 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
171177 }
172178 opal_argv_append_nosize (& members , nstring );
173179 free (nstring );
180+ if (NULL == (nstring = (char * )opal_pmix .get_nspace (proc_list [i ]-> super .proc_name .jobid ))) {
181+ opal_argv_free (members );
182+ return OMPI_ERR_NOT_SUPPORTED ;
183+ }
184+ opal_argv_append_nosize (& members , nstring );
174185 }
175186 if (!dense ) {
176187 free (proc_list );
@@ -246,6 +257,17 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
246257 OPAL_LIST_DESTRUCT (& mlist );
247258 goto exit ;
248259 }
260+ /* step over the nspace */
261+ ++ i ;
262+ if (NULL == members [i ]) {
263+ /* this shouldn't happen and is an error */
264+ OMPI_ERROR_LOG (OMPI_ERR_BAD_PARAM );
265+ OPAL_LIST_DESTRUCT (& mlist );
266+ opal_argv_free (members );
267+ free (rport );
268+ rc = OMPI_ERR_BAD_PARAM ;
269+ goto exit ;
270+ }
249271 /* if the rank is wildcard, then we need to add all procs
250272 * in that job to the list */
251273 if (OPAL_VPID_WILDCARD == nm -> name .vpid ) {
@@ -295,6 +317,16 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
295317 OPAL_LIST_DESTRUCT (& rlist );
296318 goto exit ;
297319 }
320+ /* next entry is the nspace - register it */
321+ ++ i ;
322+ if (NULL == members [i ]) {
323+ OMPI_ERROR_LOG (OMPI_ERR_NOT_SUPPORTED );
324+ opal_argv_free (members );
325+ OPAL_LIST_DESTRUCT (& ilist );
326+ OPAL_LIST_DESTRUCT (& rlist );
327+ goto exit ;
328+ }
329+ opal_pmix .register_jobid (nm -> name .jobid , members [i ]);
298330 if (OPAL_VPID_WILDCARD == nm -> name .vpid ) {
299331 jobid = nm -> name .jobid ;
300332 OBJ_RELEASE (nm );
0 commit comments