@@ -160,7 +160,6 @@ static void mca_btl_uct_tl_destructor(mca_btl_uct_tl_t *tl)
160
160
OBJ_RELEASE (tl -> uct_md );
161
161
}
162
162
163
- free (tl -> uct_dev_contexts );
164
163
free (tl -> uct_tl_name );
165
164
free (tl -> uct_dev_name );
166
165
@@ -246,7 +245,10 @@ static int mca_btl_uct_setup_connection_tl(mca_btl_uct_module_t *module)
246
245
return OPAL_ERR_NOT_SUPPORTED ;
247
246
}
248
247
249
- ucs_status = uct_iface_set_am_handler (module -> conn_tl -> uct_dev_contexts [0 ]-> uct_iface ,
248
+ mca_btl_uct_device_context_t * context = mca_btl_uct_module_get_tl_context_specific (module , module -> conn_tl ,
249
+ /*context_id=*/ 0 );
250
+
251
+ ucs_status = uct_iface_set_am_handler (context -> uct_iface ,
250
252
MCA_BTL_UCT_CONNECT_RDMA , mca_btl_uct_conn_req_cb , module ,
251
253
UCT_CB_FLAG_ASYNC );
252
254
if (UCS_OK != ucs_status ) {
@@ -377,7 +379,7 @@ mca_btl_uct_device_context_t *mca_btl_uct_context_create(mca_btl_uct_module_t *m
377
379
return NULL ;
378
380
}
379
381
380
- if (context_id > 0 && tl == module -> am_tl ) {
382
+ if (tl == module -> am_tl ) {
381
383
BTL_VERBOSE (("installing AM handler for tl %p context id %d" , (void * ) tl , context_id ));
382
384
uct_iface_set_am_handler (context -> uct_iface , MCA_BTL_UCT_FRAG , mca_btl_uct_am_handler ,
383
385
context , MCA_BTL_UCT_CB_FLAG_SYNC );
@@ -433,12 +435,6 @@ static mca_btl_uct_tl_t *mca_btl_uct_create_tl(mca_btl_uct_module_t *module, mca
433
435
tl -> uct_dev_name = strdup (tl_desc -> dev_name );
434
436
tl -> priority = priority ;
435
437
436
- tl -> uct_dev_contexts = calloc (MCA_BTL_UCT_MAX_WORKERS , sizeof (tl -> uct_dev_contexts [0 ]));
437
- if (NULL == tl -> uct_dev_contexts ) {
438
- OBJ_RELEASE (tl );
439
- return NULL ;
440
- }
441
-
442
438
(void ) uct_md_iface_config_read (md -> uct_md , tl_desc -> tl_name , NULL , NULL , & tl -> uct_tl_config );
443
439
444
440
int rc = mca_btl_uct_populate_tl_attr (module , tl );
@@ -491,16 +487,9 @@ static void mca_btl_uct_set_tl_rdma(mca_btl_uct_module_t *module, mca_btl_uct_tl
491
487
static void mca_btl_uct_set_tl_am (mca_btl_uct_module_t * module , mca_btl_uct_tl_t * tl )
492
488
{
493
489
BTL_VERBOSE (("tl %s is suitable for active-messaging" , tl -> uct_tl_name ));
494
-
495
- if (module -> rdma_tl == tl ) {
496
- module -> shared_endpoints = true;
497
- }
498
490
module -> am_tl = tl ;
499
491
OBJ_RETAIN (tl );
500
492
501
- uct_iface_set_am_handler (tl -> uct_dev_contexts [0 ]-> uct_iface , MCA_BTL_UCT_FRAG ,
502
- mca_btl_uct_am_handler , tl -> uct_dev_contexts [0 ], UCT_CB_FLAG_ASYNC );
503
-
504
493
tl -> tl_index = (module -> rdma_tl && tl != module -> rdma_tl ) ? 1 : 0 ;
505
494
module -> comm_tls [tl -> tl_index ] = tl ;
506
495
if (tl -> max_device_contexts <= 1 ) {
@@ -580,12 +569,6 @@ static int mca_btl_uct_evaluate_tl(mca_btl_uct_module_t *module, mca_btl_uct_tl_
580
569
module -> super .btl_latency = 1 ;
581
570
}
582
571
583
- if (tl == module -> rdma_tl || tl == module -> am_tl || tl == module -> conn_tl ) {
584
- /* make sure progress is enabled on the default context now that we know this TL will be
585
- * used */
586
- mca_btl_uct_context_enable_progress (tl -> uct_dev_contexts [0 ]);
587
- }
588
-
589
572
return OPAL_SUCCESS ;
590
573
}
591
574
@@ -629,7 +612,6 @@ int mca_btl_uct_query_tls(mca_btl_uct_module_t *module, mca_btl_uct_md_t *md,
629
612
OBJ_RELEASE (tl );
630
613
631
614
if (OPAL_SUCCESS == rc ) {
632
- mca_btl_uct_context_enable_progress (tl -> uct_dev_contexts [0 ]);
633
615
return OPAL_SUCCESS ;
634
616
}
635
617
0 commit comments