|
19 | 19 | * reserved. |
20 | 20 | * Copyright (c) 2014 Research Organization for Information Science |
21 | 21 | * and Technology (RIST). All rights reserved. |
| 22 | + * Copyright (c) 2016 IBM Corporation. All rights reserved. |
22 | 23 | * $COPYRIGHT$ |
23 | 24 | * |
24 | 25 | * Additional copyrights may follow |
@@ -52,6 +53,7 @@ struct avail_coll_t { |
52 | 53 |
|
53 | 54 | int ac_priority; |
54 | 55 | mca_coll_base_module_2_1_0_t *ac_module; |
| 56 | + const char * ac_component_name; |
55 | 57 | }; |
56 | 58 | typedef struct avail_coll_t avail_coll_t; |
57 | 59 |
|
@@ -110,7 +112,7 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm) |
110 | 112 | int ret; |
111 | 113 |
|
112 | 114 | /* Announce */ |
113 | | - opal_output_verbose(10, ompi_coll_base_framework.framework_output, |
| 115 | + opal_output_verbose(9, ompi_coll_base_framework.framework_output, |
114 | 116 | "coll:base:comm_select: new communicator: %s (cid %d)", |
115 | 117 | comm->c_name, comm->c_contextid); |
116 | 118 |
|
@@ -143,6 +145,12 @@ int mca_coll_base_comm_select(ompi_communicator_t * comm) |
143 | 145 |
|
144 | 146 | /* initialize the module */ |
145 | 147 | ret = avail->ac_module->coll_module_enable(avail->ac_module, comm); |
| 148 | + |
| 149 | + opal_output_verbose(9, ompi_coll_base_framework.framework_output, |
| 150 | + "coll:base:comm_select: selecting %10s, priority %3d, %s", |
| 151 | + avail->ac_component_name, avail->ac_priority, |
| 152 | + (OMPI_SUCCESS == ret ? "Enabled": "Disabled") ); |
| 153 | + |
146 | 154 | if (OMPI_SUCCESS == ret) { |
147 | 155 |
|
148 | 156 | /* copy over any of the pointers */ |
@@ -295,9 +303,23 @@ static opal_list_t *check_components(opal_list_t * components, |
295 | 303 | avail = OBJ_NEW(avail_coll_t); |
296 | 304 | avail->ac_priority = priority; |
297 | 305 | avail->ac_module = module; |
| 306 | + // Point to the string so we don't have to free later |
| 307 | + avail->ac_component_name = component->mca_component_name; |
298 | 308 |
|
299 | 309 | opal_list_append(selectable, &avail->super); |
300 | 310 | } |
| 311 | + else { |
| 312 | + opal_output_verbose(10, ompi_coll_base_framework.framework_output, |
| 313 | + "coll:base:comm_select: component disqualified: %s (priority %d < 0)", |
| 314 | + component->mca_component_name, priority ); |
| 315 | + |
| 316 | + // If the disqualified collective returned a module make sure we |
| 317 | + // release it here, since it will become a leak otherwise. |
| 318 | + if( NULL != module ) { |
| 319 | + OBJ_RELEASE(module); |
| 320 | + module = NULL; |
| 321 | + } |
| 322 | + } |
301 | 323 | } |
302 | 324 |
|
303 | 325 | /* If we didn't find any available components, return an error */ |
|
0 commit comments