Fix for bug identified this morning: ptl base didn't correctly handle
if a component returned NULL back as a module. Reviewed by Tim. This commit was SVN r2061.
Этот коммит содержится в:
родитель
87adba0d79
Коммит
006fc7734f
src
mca
tools/ompi_info
@ -88,7 +88,7 @@ int mca_base_init_select_components(int requested,
|
||||
/* Tell the selected pml module about all the selected ptl
|
||||
modules */
|
||||
|
||||
mca_pml.pml_add_ptls(&mca_ptl_base_components_initialized);
|
||||
mca_pml.pml_add_ptls(&mca_ptl_base_modules_initialized);
|
||||
|
||||
/* All done */
|
||||
|
||||
|
@ -43,7 +43,7 @@ extern "C" {
|
||||
* Globals
|
||||
*/
|
||||
extern int mca_ptl_base_output;
|
||||
extern ompi_list_t mca_ptl_base_components_available;
|
||||
extern ompi_list_t mca_ptl_base_components_initialized;
|
||||
extern ompi_list_t mca_ptl_base_components_opened;
|
||||
extern ompi_list_t mca_ptl_base_modules_initialized;
|
||||
|
||||
#endif /* MCA_PTL_BASE_H */
|
||||
|
@ -20,9 +20,9 @@ int mca_ptl_base_close(void)
|
||||
|
||||
/* Finalize all the ptl components and free their list items */
|
||||
|
||||
for (item = ompi_list_remove_first(&mca_ptl_base_components_initialized);
|
||||
for (item = ompi_list_remove_first(&mca_ptl_base_modules_initialized);
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&mca_ptl_base_components_initialized)) {
|
||||
item = ompi_list_remove_first(&mca_ptl_base_modules_initialized)) {
|
||||
sm = (mca_ptl_base_selected_module_t *) item;
|
||||
|
||||
/* Blatently ignore the return code (what would we do to recover,
|
||||
@ -33,11 +33,13 @@ int mca_ptl_base_close(void)
|
||||
free(sm);
|
||||
}
|
||||
|
||||
/* Close all remaining available components (may be one if this is a
|
||||
/* Close all remaining opened components (may be one if this is a
|
||||
OMPI RTE program, or [possibly] multiple if this is ompi_info) */
|
||||
|
||||
mca_base_components_close(mca_ptl_base_output,
|
||||
&mca_ptl_base_components_available, NULL);
|
||||
if (0 != ompi_list_get_size(&mca_ptl_base_components_opened)) {
|
||||
mca_base_components_close(mca_ptl_base_output,
|
||||
&mca_ptl_base_components_opened, NULL);
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
||||
* Global variables
|
||||
*/
|
||||
int mca_ptl_base_output = -1;
|
||||
ompi_list_t mca_ptl_base_components_available;
|
||||
ompi_list_t mca_ptl_base_components_initialized;
|
||||
ompi_list_t mca_ptl_base_components_opened;
|
||||
ompi_list_t mca_ptl_base_modules_initialized;
|
||||
|
||||
|
||||
/**
|
||||
@ -39,7 +39,7 @@ int mca_ptl_base_open(void)
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_components_open("ptl", 0, mca_ptl_base_static_components,
|
||||
&mca_ptl_base_components_available)) {
|
||||
&mca_ptl_base_components_opened)) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ int mca_ptl_base_open(void)
|
||||
iterate over it (even if it's empty, as in the case of
|
||||
ompi_info) */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_ptl_base_components_initialized, ompi_list_t);
|
||||
OBJ_CONSTRUCT(&mca_ptl_base_modules_initialized, ompi_list_t);
|
||||
|
||||
/* All done */
|
||||
|
||||
|
@ -30,12 +30,12 @@ int mca_ptl_base_select(bool *allow_multi_user_threads,
|
||||
mca_ptl_base_module_t **modules;
|
||||
mca_ptl_base_selected_module_t *sm;
|
||||
|
||||
/* Traverse the list of available modules; call their init
|
||||
/* Traverse the list of opened modules; call their init
|
||||
functions. */
|
||||
|
||||
for (item = ompi_list_get_first(&mca_ptl_base_components_available);
|
||||
ompi_list_get_end(&mca_ptl_base_components_available) != item;
|
||||
item = ompi_list_get_next(item)) {
|
||||
for (item = ompi_list_remove_first(&mca_ptl_base_components_opened);
|
||||
NULL != item;
|
||||
item = ompi_list_remove_first(&mca_ptl_base_components_opened)) {
|
||||
cli = (mca_base_component_list_item_t *) item;
|
||||
component = (mca_ptl_base_component_t *) cli->cli_component;
|
||||
|
||||
@ -48,9 +48,10 @@ int mca_ptl_base_select(bool *allow_multi_user_threads,
|
||||
"select: no init function; ignoring component");
|
||||
} else {
|
||||
modules = component->ptlm_init(&num_ptls, &user_threads,
|
||||
&hidden_threads);
|
||||
&hidden_threads);
|
||||
|
||||
/* If the component didn't initialize, unload it */
|
||||
/* If the component didn't initialize, remove it from the opened
|
||||
list and remove it from the component repository */
|
||||
|
||||
if (NULL == modules) {
|
||||
ompi_output_verbose(10, mca_ptl_base_output,
|
||||
@ -79,7 +80,7 @@ int mca_ptl_base_select(bool *allow_multi_user_threads,
|
||||
OBJ_CONSTRUCT(sm, ompi_list_item_t);
|
||||
sm->pbsm_component = component;
|
||||
sm->pbsm_module = modules[i];
|
||||
ompi_list_append(&mca_ptl_base_components_initialized,
|
||||
ompi_list_append(&mca_ptl_base_modules_initialized,
|
||||
(ompi_list_item_t*) sm);
|
||||
}
|
||||
free(modules);
|
||||
@ -89,7 +90,7 @@ int mca_ptl_base_select(bool *allow_multi_user_threads,
|
||||
|
||||
/* Finished querying all components. Check for the bozo case. */
|
||||
|
||||
if (0 == ompi_list_get_size(&mca_ptl_base_components_initialized)) {
|
||||
if (0 == ompi_list_get_size(&mca_ptl_base_modules_initialized)) {
|
||||
/* JMS Replace with show_help */
|
||||
ompi_abort(1, "No ptl components available. This shouldn't happen.");
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void ompi_info::open_components()
|
||||
component_map["pml"] = &mca_pml_base_components_available;
|
||||
|
||||
mca_ptl_base_open();
|
||||
component_map["ptl"] = &mca_ptl_base_components_available;
|
||||
component_map["ptl"] = &mca_ptl_base_components_opened;
|
||||
|
||||
mca_topo_base_open();
|
||||
component_map["topo"] = &mca_topo_base_components_opened;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user