This source file includes following definitions.
- mca_base_framework_components_open
- open_components
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include "opal_config.h"
25
26 #include <stdio.h>
27 #include <string.h>
28 #include <stdlib.h>
29
30 #include "opal/class/opal_list.h"
31 #include "opal/util/argv.h"
32 #include "opal/util/output.h"
33 #include "opal/mca/mca.h"
34 #include "opal/mca/base/base.h"
35 #include "opal/constants.h"
36 #if OPAL_ENABLE_FT_CR == 1
37 #include "opal/runtime/opal_params.h"
38 #endif
39
40
41
42
43 static int open_components(mca_base_framework_t *framework);
44
45 struct mca_base_dummy_framework_list_item_t {
46 opal_list_item_t super;
47 mca_base_framework_t framework;
48 };
49
50
51
52
53
54 int mca_base_framework_components_open (mca_base_framework_t *framework,
55 mca_base_open_flag_t flags)
56 {
57
58 if (flags & MCA_BASE_OPEN_FIND_COMPONENTS) {
59 bool open_dso_components = !(flags & MCA_BASE_OPEN_STATIC_ONLY);
60
61 int ret = mca_base_component_find(NULL, framework, false, open_dso_components);
62 if (OPAL_SUCCESS != ret) {
63 return ret;
64 }
65 }
66
67
68 return open_components (framework);
69 }
70
71
72
73
74
75
76
77
78 static int open_components(mca_base_framework_t *framework)
79 {
80 opal_list_t *components = &framework->framework_components;
81 uint32_t open_only_flags = MCA_BASE_METADATA_PARAM_NONE;
82 int output_id = framework->framework_output;
83 mca_base_component_list_item_t *cli, *next;
84 int ret;
85
86
87
88
89
90
91
92
93
94
95
96
97
98 #if (OPAL_ENABLE_FT == 1) && (OPAL_ENABLE_FT_CR == 1)
99 if (opal_base_distill_checkpoint_ready) {
100 open_only_flags |= MCA_BASE_METADATA_PARAM_CHECKPOINT;
101 }
102 #endif
103
104
105
106 ret = mca_base_components_filter (framework, open_only_flags);
107 if (OPAL_SUCCESS != ret) {
108 return ret;
109 }
110
111
112 opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id, "mca: base: components_open: opening %s components",
113 framework->framework_name);
114
115
116 OPAL_LIST_FOREACH_SAFE(cli, next, components, mca_base_component_list_item_t) {
117 const mca_base_component_t *component = cli->cli_component;
118
119 opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
120 "mca: base: components_open: found loaded component %s",
121 component->mca_component_name);
122
123 if (NULL != component->mca_open_component) {
124
125 ret = component->mca_open_component();
126
127 if (OPAL_SUCCESS == ret) {
128 opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
129 "mca: base: components_open: "
130 "component %s open function successful",
131 component->mca_component_name);
132 } else {
133 if (OPAL_ERR_NOT_AVAILABLE != ret) {
134
135
136
137
138
139
140
141
142
143
144
145 if (mca_base_component_show_load_errors) {
146 opal_output_verbose (MCA_BASE_VERBOSE_ERROR, output_id,
147 "mca: base: components_open: component %s "
148 "/ %s open function failed",
149 component->mca_type_name,
150 component->mca_component_name);
151 }
152 opal_output_verbose (MCA_BASE_VERBOSE_COMPONENT, output_id,
153 "mca: base: components_open: "
154 "component %s open function failed",
155 component->mca_component_name);
156 }
157
158 mca_base_component_close (component, output_id);
159
160 opal_list_remove_item (components, &cli->super);
161 OBJ_RELEASE(cli);
162 }
163 }
164 }
165
166
167
168 return OPAL_SUCCESS;
169 }