@@ -378,7 +378,7 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
378
378
opal_list_append (& ilist , & cd -> super );
379
379
}
380
380
/* either way, add to the remote list */
381
- cd = OBJ_NEW (ompi_dpm_proct_caddy_t );
381
+ cd = OBJ_NEW (ompi_dpm_proct_caddy_t );
382
382
cd -> p = proc ;
383
383
opal_list_append (& rlist , & cd -> super );
384
384
}
@@ -403,24 +403,19 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
403
403
i = 0 ;
404
404
OPAL_LIST_FOREACH (cd , & ilist , ompi_dpm_proct_caddy_t ) {
405
405
opal_value_t * kv ;
406
- new_proc_list [i ] = cd -> p ;
407
- /* set the locality */
408
- new_proc_list [i ]-> super .proc_flags = OPAL_PROC_NON_LOCAL ;
409
- /* have to save it for later */
406
+ proc = cd -> p ;
407
+ new_proc_list [i ] = proc ;
408
+ /* ompi_proc_complete_init_single() initializes and optionally retrieves
409
+ * OPAL_PMIX_LOCALITY and OPAL_PMIX_HOSTNAME. since we can live without
410
+ * them, we are just fine */
411
+ ompi_proc_complete_init_single (proc );
412
+ /* save the locality for later */
410
413
kv = OBJ_NEW (opal_value_t );
411
414
kv -> key = strdup (OPAL_PMIX_LOCALITY );
412
415
kv -> type = OPAL_UINT16 ;
413
- kv -> data .uint16 = OPAL_PROC_NON_LOCAL ;
414
- opal_pmix .store_local (& cd -> p -> super .proc_name , kv );
416
+ kv -> data .uint16 = proc -> super . proc_flags ;
417
+ opal_pmix .store_local (& proc -> super .proc_name , kv );
415
418
OBJ_RELEASE (kv ); // maintain accounting
416
- /* we can retrieve the hostname at no cost because it
417
- * was provided at connect */
418
- OPAL_MODEX_RECV_VALUE (rc , OPAL_PMIX_HOSTNAME , & new_proc_list [i ]-> super .proc_name ,
419
- (char * * )& (new_proc_list [i ]-> super .proc_hostname ), OPAL_STRING );
420
- if (OPAL_SUCCESS != rc ) {
421
- /* we can live without it */
422
- new_proc_list [i ]-> super .proc_hostname = NULL ;
423
- }
424
419
++ i ;
425
420
}
426
421
/* call add_procs on the new ones */
0 commit comments