This source file includes following definitions.
- init_query
- comm_query
- mca_topo_treematch_component_register
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #include "ompi_config.h"
16 #include "ompi/mca/topo/treematch/topo_treematch.h"
17
18
19
20
21 const char *mca_topo_treematch_component_version_string =
22 "Open MPI treematch topology MCA component version" OMPI_VERSION;
23
24
25
26
27 static int init_query(bool enable_progress_threads, bool enable_mpi_threads);
28 static struct mca_topo_base_module_t *
29 comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type);
30 static int mca_topo_treematch_component_register(void);
31
32
33
34
35 mca_topo_treematch_component_2_2_0_t mca_topo_treematch_component =
36 {
37 {
38 {
39 MCA_TOPO_BASE_VERSION_2_2_0,
40
41 "treematch",
42 OMPI_MAJOR_VERSION,
43 OMPI_MINOR_VERSION,
44 OMPI_RELEASE_VERSION,
45 NULL,
46 NULL,
47 NULL,
48 mca_topo_treematch_component_register,
49 },
50
51 {
52
53 MCA_BASE_METADATA_PARAM_CHECKPOINT
54 },
55
56 init_query,
57 comm_query
58 },
59 0
60 };
61
62
63 static int init_query(bool enable_progress_threads, bool enable_mpi_threads)
64 {
65
66
67
68
69
70 return OMPI_SUCCESS;
71 }
72
73
74 static struct mca_topo_base_module_t *
75 comm_query(const ompi_communicator_t *comm, int *priority, uint32_t type)
76 {
77 mca_topo_treematch_module_t *treematch;
78
79 if( OMPI_COMM_DIST_GRAPH != type ) {
80 return NULL;
81 }
82 treematch = OBJ_NEW(mca_topo_treematch_module_t);
83 if (NULL == treematch) {
84 return NULL;
85 }
86 treematch->super.topo.dist_graph.dist_graph_create = mca_topo_treematch_dist_graph_create;
87
88
89
90 *priority = 42;
91 treematch->super.type = OMPI_COMM_DIST_GRAPH;
92 return &(treematch->super);
93 }
94
95 static int mca_topo_treematch_component_register(void)
96 {
97 (void)mca_base_component_var_register(&mca_topo_treematch_component.super.topoc_version,
98 "reorder_mode", "If set the reordering will be done in a partially distributed way (default=0). If partially-distributed only local knowledge will be used, possibly leading to less accurate reordering.", MCA_BASE_VAR_TYPE_INT,
99 NULL, 0, 0, OPAL_INFO_LVL_2,
100 MCA_BASE_VAR_SCOPE_READONLY, &mca_topo_treematch_component.reorder_mode);
101 return OMPI_SUCCESS;
102 }
103