This source file includes following definitions.
- ompi_osc_base_find_available
- ompi_osc_base_finalize
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include "ompi_config.h"
20 #include "ompi/constants.h"
21
22 #include "ompi/mca/mca.h"
23 #include "opal/util/output.h"
24 #include "opal/mca/base/base.h"
25
26
27 #include "ompi/mca/osc/osc.h"
28 #include "ompi/mca/osc/base/base.h"
29
30
31
32
33
34
35
36
37 #include "ompi/mca/osc/base/static-components.h"
38
39 int
40 ompi_osc_base_find_available(bool enable_progress_threads,
41 bool enable_mpi_threads)
42 {
43 mca_base_component_list_item_t *cli, *next;
44
45 OPAL_LIST_FOREACH_SAFE(cli, next, &ompi_osc_base_framework.framework_components, mca_base_component_list_item_t) {
46 int ret;
47 ompi_osc_base_component_t *component = (ompi_osc_base_component_t*) cli->cli_component;
48
49
50 ret = component->osc_init(enable_progress_threads, enable_mpi_threads);
51 if (OMPI_SUCCESS != ret) {
52
53 opal_list_remove_item(&ompi_osc_base_framework.framework_components, &cli->super);
54 mca_base_component_close((mca_base_component_t *)component,
55 ompi_osc_base_framework.framework_output);
56 OBJ_RELEASE(cli);
57 }
58 }
59 return OMPI_SUCCESS;
60 }
61
62 int
63 ompi_osc_base_finalize(void)
64 {
65 opal_list_item_t* item;
66
67
68 while (NULL !=
69 (item = opal_list_remove_first(&ompi_osc_base_framework.framework_components))) {
70 ompi_osc_base_component_t *component = (ompi_osc_base_component_t*)
71 ((mca_base_component_list_item_t*) item)->cli_component;
72 component->osc_finalize();
73 OBJ_RELEASE(item);
74 }
75 return OMPI_SUCCESS;
76 }
77
78 MCA_BASE_FRAMEWORK_DECLARE(ompi, osc, "One-sided communication", NULL, NULL, NULL,
79 mca_osc_base_static_components, 0);