This source file includes following definitions.
- mca_io_base_find_available
- init_query
- init_query_2_0_0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #include "ompi_config.h"
21
22 #include <stdio.h>
23 #include <stdlib.h>
24
25 #include "mpi.h"
26 #include "ompi/constants.h"
27 #include "opal/util/output.h"
28 #include "ompi/mca/mca.h"
29 #include "opal/mca/base/base.h"
30 #include "ompi/mca/io/io.h"
31 #include "ompi/mca/io/base/base.h"
32 #include "ompi/mca/io/base/io_base_request.h"
33
34
35
36
37
38
39 static int init_query(const mca_base_component_t *ls,
40 bool enable_progress_threads,
41 bool enable_mpi_threads);
42 static int init_query_2_0_0(const mca_base_component_t *ls,
43 bool enable_progress_threads,
44 bool enable_mpi_threads);
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 int mca_io_base_find_available(bool enable_progress_threads,
60 bool enable_mpi_threads)
61 {
62 mca_base_component_list_item_t *cli, *next;
63
64
65
66
67 OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_io_base_framework.framework_components, mca_base_component_list_item_t) {
68 const mca_base_component_t *component = cli->cli_component;
69
70
71
72
73 if (OMPI_SUCCESS != init_query(component,
74 enable_progress_threads,
75 enable_mpi_threads)) {
76
77
78
79
80 opal_list_remove_item(&ompi_io_base_framework.framework_components, &cli->super);
81 mca_base_component_close(component, ompi_io_base_framework.framework_output);
82 OBJ_RELEASE(cli);
83 }
84 }
85
86
87
88 return OMPI_SUCCESS;
89 }
90
91
92
93
94
95
96 static int init_query(const mca_base_component_t *m,
97 bool enable_progress_threads,
98 bool enable_mpi_threads)
99 {
100 int ret;
101
102 opal_output_verbose(10, ompi_io_base_framework.framework_output,
103 "io:find_available: querying io component %s",
104 m->mca_component_name);
105
106
107
108
109 if (2 == m->mca_type_major_version &&
110 0 == m->mca_type_minor_version &&
111 0 == m->mca_type_release_version) {
112 ret = init_query_2_0_0(m, enable_progress_threads,
113 enable_mpi_threads);
114 } else {
115
116
117 opal_output_verbose(10, ompi_io_base_framework.framework_output,
118 "io:find_available: unrecognized io API version (%d.%d.%d)",
119 m->mca_type_major_version,
120 m->mca_type_minor_version,
121 m->mca_type_release_version);
122
123 return OMPI_ERROR;
124 }
125
126
127
128 if (OMPI_SUCCESS != ret) {
129 opal_output_verbose(10, ompi_io_base_framework.framework_output,
130 "io:find_available: io component %s is not available",
131 m->mca_component_name);
132 } else {
133 opal_output_verbose(10, ompi_io_base_framework.framework_output,
134 "io:find_available: io component %s is available",
135 m->mca_component_name);
136 }
137
138
139
140 return ret;
141 }
142
143
144
145
146
147 static int init_query_2_0_0(const mca_base_component_t *component,
148 bool enable_progress_threads,
149 bool enable_mpi_threads)
150 {
151 mca_io_base_component_2_0_0_t *io =
152 (mca_io_base_component_2_0_0_t *) component;
153
154 return io->io_init_query(enable_progress_threads,
155 enable_mpi_threads);
156 }