@@ -47,14 +47,15 @@ typedef struct opened_component_t {
4747int mca_pml_base_select (bool enable_progress_threads ,
4848 bool enable_mpi_threads )
4949{
50- int priority = 0 , best_priority = 0 ;
50+ int i , priority = 0 , best_priority = 0 ;
51+ bool skip_pml = false;
5152 opal_list_item_t * item = NULL ;
5253 mca_base_component_list_item_t * cli = NULL ;
5354 mca_pml_base_component_t * component = NULL , * best_component = NULL ;
5455 mca_pml_base_module_t * module = NULL , * best_module = NULL ;
5556 opal_list_t opened ;
5657 opened_component_t * om = NULL ;
57-
58+
5859 /* Traverse the list of available components; call their init
5960 functions. */
6061
@@ -67,16 +68,22 @@ int mca_pml_base_select(bool enable_progress_threads,
6768 item = opal_list_get_next (item ) ) {
6869 cli = (mca_base_component_list_item_t * ) item ;
6970 component = (mca_pml_base_component_t * ) cli -> cli_component ;
70-
71+ skip_pml = false;
7172 /* if there is an include list - item must be in the list to be included */
72- if ( (NULL != mca_pml_base_pml ) &&
73- (strcmp (component -> pmlm_version .mca_component_name , mca_pml_base_pml ) != 0 ) ) {
74- opal_output_verbose ( 10 , mca_pml_base_output ,
75- "select: component %s not in the include list" ,
76- component -> pmlm_version .mca_component_name );
73+ for ( i = 0 ; i < ompi_pointer_array_get_size (& mca_pml_base_pml ); i ++ ) {
74+ if ((strcmp (component -> pmlm_version .mca_component_name ,
75+ (char * ) ompi_pointer_array_get_item (& mca_pml_base_pml , i )) != 0 )) {
76+ opal_output_verbose ( 10 , mca_pml_base_output ,
77+ "select: component %s not in the include list" ,
78+ component -> pmlm_version .mca_component_name );
79+ skip_pml = true;
80+ } else {
81+ skip_pml = false;
82+ }
83+ }
84+ if (skip_pml ) {
7785 continue ;
7886 }
79-
8087 if (NULL == component -> pmlm_init ) {
8188 opal_output_verbose ( 10 , mca_pml_base_output ,
8289 "select: no init function; ignoring component %s" ,
@@ -87,6 +94,7 @@ int mca_pml_base_select(bool enable_progress_threads,
8794 "select: initializing %s component %s" ,
8895 component -> pmlm_version .mca_type_name ,
8996 component -> pmlm_version .mca_component_name );
97+ priority = best_priority ;
9098 module = component -> pmlm_init (& priority , enable_progress_threads ,
9199 enable_mpi_threads );
92100 if (NULL == module ) {
@@ -113,16 +121,21 @@ int mca_pml_base_select(bool enable_progress_threads,
113121 }
114122
115123 /* Finished querying all components. Check for the bozo case. */
116-
124+
117125 if ( NULL == best_component ) {
118126 opal_show_help ("help-mca-base.txt" , "find-available:none-found" , true, "pml" );
119- if ( NULL != mca_pml_base_pml ) {
120- orte_errmgr .error_detected (1 , "PML %s cannot be selected" , mca_pml_base_pml , NULL );
121- } else {
127+ for ( i = 0 ; i < ompi_pointer_array_get_size (& mca_pml_base_pml ); i ++ ) {
128+ orte_errmgr .error_detected (1 , "PML %s cannot be selected" , (char * ) ompi_pointer_array_get_item (& mca_pml_base_pml , i ), NULL );
129+ }
130+ if (0 == i ) {
122131 orte_errmgr .error_detected (2 , "No pml component available. This shouldn't happen." , NULL );
123132 }
124133 }
125-
134+
135+ opal_output_verbose ( 10 , mca_pml_base_output ,
136+ "selected %s best priority %d\n" ,
137+ best_component -> pmlm_version .mca_component_name , best_priority );
138+
126139 /* Finalize all non-selected components */
127140
128141 for (item = opal_list_remove_first (& opened );
0 commit comments