@@ -393,22 +393,6 @@ static ucp_ep_h mca_pml_ucx_add_proc_common(ompi_proc_t *proc)
393
393
return ep ;
394
394
}
395
395
396
- static ucp_ep_h mca_pml_ucx_add_proc (ompi_communicator_t * comm , int dst )
397
- {
398
- ompi_proc_t * proc0 = ompi_comm_peer_lookup (comm , 0 );
399
- ompi_proc_t * proc_peer = ompi_comm_peer_lookup (comm , dst );
400
- int ret ;
401
-
402
- /* Note, mca_pml_base_pml_check_selected, doesn't use 3rd argument */
403
- if (OMPI_SUCCESS != (ret = mca_pml_base_pml_check_selected ("ucx" ,
404
- & proc0 ,
405
- dst ))) {
406
- return NULL ;
407
- }
408
-
409
- return mca_pml_ucx_add_proc_common (proc_peer );
410
- }
411
-
412
396
int mca_pml_ucx_add_procs (struct ompi_proc_t * * procs , size_t nprocs )
413
397
{
414
398
ompi_proc_t * proc ;
@@ -436,26 +420,22 @@ int mca_pml_ucx_add_procs(struct ompi_proc_t **procs, size_t nprocs)
436
420
437
421
static inline ucp_ep_h mca_pml_ucx_get_ep (ompi_communicator_t * comm , int rank )
438
422
{
423
+ ompi_proc_t * proc_peer = ompi_comm_peer_lookup (comm , rank );
439
424
ucp_ep_h ep ;
440
425
441
- ep = ompi_comm_peer_lookup ( comm , rank ) -> proc_endpoints [OMPI_PROC_ENDPOINT_TAG_PML ];
442
- if (OPAL_LIKELY (ep != NULL )) {
426
+ ep = proc_peer -> proc_endpoints [OMPI_PROC_ENDPOINT_TAG_PML ];
427
+ if (OPAL_LIKELY (NULL != ep )) {
443
428
return ep ;
444
429
}
445
430
446
- ep = mca_pml_ucx_add_proc (comm , rank );
447
- if (OPAL_LIKELY (ep != NULL )) {
448
- return ep ;
449
- }
450
-
451
- if (rank >= ompi_comm_size (comm )) {
452
- PML_UCX_ERROR ("Rank number (%d) is larger than communicator size (%d)" ,
453
- rank , ompi_comm_size (comm ));
454
- } else {
455
- PML_UCX_ERROR ("Failed to resolve UCX endpoint for rank %d" , rank );
431
+ /* Note, mca_pml_base_pml_check_selected, doesn't use 3rd argument */
432
+ if (OMPI_SUCCESS != mca_pml_base_pml_check_selected ("ucx" ,
433
+ & proc_peer ,
434
+ 1 )) {
435
+ return NULL ;
456
436
}
457
437
458
- return NULL ;
438
+ return mca_pml_ucx_add_proc_common ( proc_peer ) ;
459
439
}
460
440
461
441
int mca_pml_ucx_del_procs (struct ompi_proc_t * * procs , size_t nprocs )
0 commit comments