@@ -64,6 +64,9 @@ struct mca_btl_uct_module_t {
6464 /** base BTL interface */
6565 mca_btl_base_module_t super ;
6666
67+ /** module index in the component module array */
68+ int module_index ;
69+
6770 /** whether the module has been fully initialized or not */
6871 bool initialized ;
6972
@@ -76,31 +79,15 @@ struct mca_btl_uct_module_t {
7679 /** mutex to protect the module */
7780 opal_recursive_mutex_t lock ;
7881
79- /** async context */
80- ucs_async_context_t * ucs_async ;
81-
8282 /** transport for active messaging */
8383 mca_btl_uct_tl_t * am_tl ;
8484
8585 /** transport for RDMA/AMOs */
8686 mca_btl_uct_tl_t * rdma_tl ;
8787
88- /** transport for forming connections (if needed) */
89- mca_btl_uct_tl_t * conn_tl ;
90-
91- /** array containing the am_tl and rdma_tl */
92- mca_btl_uct_tl_t * comm_tls [2 ];
93-
94- #if UCT_API >= UCT_VERSION (1 , 7 )
95- uct_component_h uct_component ;
96- #endif
97-
9888 /** registration cache */
9989 mca_rcache_base_module_t * rcache ;
10090
101- /** name of the memory domain backing this module */
102- char * md_name ;
103-
10491 /** am and rdma share endpoints */
10592 bool shared_endpoints ;
10693
@@ -119,8 +106,9 @@ struct mca_btl_uct_module_t {
119106 /** frags that were waiting on connections that are now ready to send */
120107 opal_list_t pending_frags ;
121108
122- /** pending connection requests */
123- opal_fifo_t pending_connection_reqs ;
109+ /** allowed transports */
110+ char * allowed_transports ;
111+ mca_btl_uct_include_list_t allowed_transport_list ;
124112};
125113typedef struct mca_btl_uct_module_t mca_btl_uct_module_t ;
126114
@@ -133,6 +121,9 @@ struct mca_btl_uct_component_t {
133121 /** base BTL component */
134122 mca_btl_base_component_3_0_0_t super ;
135123
124+ /** whether the component is initialized. controls cleanup. */
125+ bool initialized ;
126+
136127 /** number of TL modules */
137128 int module_count ;
138129
@@ -141,10 +132,15 @@ struct mca_btl_uct_component_t {
141132
142133 /** allowed UCT memory domains */
143134 char * memory_domains ;
135+ mca_btl_uct_include_list_t memory_domain_list ;
144136
145137 /** allowed transports */
146138 char * allowed_transports ;
147139
140+ /** transports to consider for forming connections */
141+ char * connection_domains ;
142+ mca_btl_uct_include_list_t connection_domain_list ;
143+
148144 /** number of worker contexts to create */
149145 int num_contexts_per_module ;
150146
@@ -158,6 +154,17 @@ struct mca_btl_uct_component_t {
158154
159155 /** connection retry timeout */
160156 unsigned int connection_retry_timeout ;
157+
158+ #if UCT_API >= UCT_VERSION (1 , 7 )
159+ uct_component_h * uct_components ;
160+ unsigned num_uct_components ;
161+ #endif
162+
163+ /** list of memory domains (btl_uct_md_t) */
164+ opal_list_t md_list ;
165+
166+ /** connection transport (if needed). reference is owned by conn_md */
167+ mca_btl_uct_tl_t * conn_tl ;
161168};
162169typedef struct mca_btl_uct_component_t mca_btl_uct_component_t ;
163170
@@ -293,19 +300,24 @@ ucs_status_t mca_btl_uct_am_handler(void *arg, void *data, size_t length, unsign
293300struct mca_btl_base_endpoint_t * mca_btl_uct_get_ep (struct mca_btl_base_module_t * module ,
294301 opal_proc_t * proc );
295302
296- int mca_btl_uct_query_tls (mca_btl_uct_module_t * module , mca_btl_uct_md_t * md ,
297- uct_tl_resource_desc_t * tl_descs , unsigned tl_count );
303+ int mca_btl_uct_populate_tls (mca_btl_uct_md_t * md , uct_tl_resource_desc_t * tl_descs , unsigned tl_count );
298304int mca_btl_uct_process_connection_request (mca_btl_uct_module_t * module ,
299305 mca_btl_uct_conn_req_t * req );
300306
307+ mca_btl_uct_module_t * mca_btl_uct_alloc_module (mca_btl_uct_md_t * md ,
308+ size_t registration_size );
309+
310+ int mca_btl_uct_evaluate_tl (mca_btl_uct_module_t * module , mca_btl_uct_tl_t * tl );
311+ int mca_btl_uct_enable_tl_conn (mca_btl_uct_tl_t * tl );
312+
301313/**
302314 * @brief Checks if a tl is suitable for using for RDMA
303315 *
304316 * @param[in] tl btl/uct tl pointer
305317 */
306318static inline bool mca_btl_uct_tl_supports_rdma (mca_btl_uct_tl_t * tl )
307319{
308- return (MCA_BTL_UCT_TL_ATTR ( tl , 0 ) .cap .flags
320+ return (tl -> uct_iface_attr .cap .flags
309321 & (UCT_IFACE_FLAG_PUT_ZCOPY | UCT_IFACE_FLAG_GET_ZCOPY ))
310322 == (UCT_IFACE_FLAG_PUT_ZCOPY | UCT_IFACE_FLAG_GET_ZCOPY );
311323}
@@ -315,7 +327,7 @@ static inline bool mca_btl_uct_tl_supports_rdma(mca_btl_uct_tl_t *tl)
315327 */
316328static inline bool mca_btl_uct_tl_support_am (mca_btl_uct_tl_t * tl )
317329{
318- return (MCA_BTL_UCT_TL_ATTR ( tl , 0 ) .cap .flags
330+ return (tl -> uct_iface_attr .cap .flags
319331 & (UCT_IFACE_FLAG_AM_SHORT | UCT_IFACE_FLAG_AM_BCOPY | UCT_IFACE_FLAG_AM_ZCOPY ));
320332}
321333
@@ -326,7 +338,7 @@ static inline bool mca_btl_uct_tl_support_am(mca_btl_uct_tl_t *tl)
326338 */
327339static inline bool mca_btl_uct_tl_supports_conn (mca_btl_uct_tl_t * tl )
328340{
329- return (MCA_BTL_UCT_TL_ATTR ( tl , 0 ) .cap .flags
341+ return (tl -> uct_iface_attr .cap .flags
330342 & (UCT_IFACE_FLAG_AM_SHORT | UCT_IFACE_FLAG_CONNECT_TO_IFACE ))
331343 == (UCT_IFACE_FLAG_AM_SHORT | UCT_IFACE_FLAG_CONNECT_TO_IFACE );
332344}
@@ -338,7 +350,11 @@ static inline bool mca_btl_uct_tl_supports_conn(mca_btl_uct_tl_t *tl)
338350 */
339351static inline bool mca_btl_uct_tl_requires_connection_tl (mca_btl_uct_tl_t * tl )
340352{
341- return !(MCA_BTL_UCT_TL_ATTR (tl , 0 ).cap .flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE );
353+ if (NULL == tl ) {
354+ return false;
355+ }
356+
357+ return !(tl -> uct_iface_attr .cap .flags & UCT_IFACE_FLAG_CONNECT_TO_IFACE );
342358}
343359
344360END_C_DECLS
0 commit comments