This source file includes following definitions.
- sync_register
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 <string.h>
23
24 #include "opal/util/output.h"
25
26 #include "mpi.h"
27 #include "ompi/constants.h"
28 #include "coll_sync.h"
29
30
31
32
33 const char *mca_coll_sync_component_version_string =
34 "Open MPI sync collective MCA component version " OMPI_VERSION;
35
36
37
38
39 static int sync_register(void);
40
41
42
43
44
45
46 mca_coll_sync_component_t mca_coll_sync_component = {
47 {
48
49
50
51 .collm_version = {
52 MCA_COLL_BASE_VERSION_2_0_0,
53
54
55 .mca_component_name = "sync",
56 MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
57 OMPI_RELEASE_VERSION),
58
59
60 .mca_register_component_params = sync_register
61 },
62 .collm_data = {
63
64 MCA_BASE_METADATA_PARAM_CHECKPOINT
65 },
66
67
68
69 .collm_init_query = mca_coll_sync_init_query,
70 .collm_comm_query = mca_coll_sync_comm_query
71 },
72 };
73
74
75 static int sync_register(void)
76 {
77 mca_base_component_t *c = &mca_coll_sync_component.super.collm_version;
78
79 mca_coll_sync_component.priority = 50;
80 (void) mca_base_component_var_register(c, "priority",
81 "Priority of the sync coll component; only relevant if barrier_before or barrier_after is > 0",
82 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
83 OPAL_INFO_LVL_9,
84 MCA_BASE_VAR_SCOPE_READONLY,
85 &mca_coll_sync_component.priority);
86
87 mca_coll_sync_component.barrier_before_nops = 0;
88 (void) mca_base_component_var_register(c, "barrier_before",
89 "Do a synchronization before each Nth collective",
90 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
91 OPAL_INFO_LVL_9,
92 MCA_BASE_VAR_SCOPE_READONLY,
93 &mca_coll_sync_component.barrier_before_nops);
94
95 mca_coll_sync_component.barrier_after_nops = 0;
96 (void) mca_base_component_var_register(c, "barrier_after",
97 "Do a synchronization after each Nth collective",
98 MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
99 OPAL_INFO_LVL_9,
100 MCA_BASE_VAR_SCOPE_READONLY,
101 &mca_coll_sync_component.barrier_after_nops);
102
103 return OMPI_SUCCESS;
104 }