Skip to content

Commit 1816db1

Browse files
author
Burlen Loring
committed
fix MCA variable scope in coll adapt
Changes several variables scope from READONLY to ALL so that they can be set via MPI_T interface Signed-off-by: Burlen Loring <[email protected]>
1 parent a163248 commit 1816db1

File tree

3 files changed

+38
-36
lines changed

3 files changed

+38
-36
lines changed

ompi/mca/coll/adapt/coll_adapt_component.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,39 +114,39 @@ static int adapt_register(void)
114114
we should have a high priority */
115115
cs->adapt_priority = 0;
116116
(void) mca_base_component_var_register(c, "priority", "Priority of the adapt coll component",
117-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
117+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
118118
OPAL_INFO_LVL_9,
119-
MCA_BASE_VAR_SCOPE_READONLY, &cs->adapt_priority);
119+
MCA_BASE_VAR_SCOPE_ALL, &cs->adapt_priority);
120120

121121
cs->adapt_verbose = ompi_coll_base_framework.framework_verbose;
122122
(void) mca_base_component_var_register(c, "verbose",
123123
"Verbose level (default set to the collective framework verbosity)",
124-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
124+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
125125
OPAL_INFO_LVL_9,
126-
MCA_BASE_VAR_SCOPE_READONLY, &cs->adapt_verbose);
126+
MCA_BASE_VAR_SCOPE_ALL, &cs->adapt_verbose);
127127

128128
cs->adapt_context_free_list_min = 64;
129129
(void) mca_base_component_var_register(c, "context_free_list_min",
130130
"Minimum number of segments in context free list",
131-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
131+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
132132
OPAL_INFO_LVL_9,
133-
MCA_BASE_VAR_SCOPE_READONLY,
133+
MCA_BASE_VAR_SCOPE_ALL,
134134
&cs->adapt_context_free_list_min);
135135

136136
cs->adapt_context_free_list_max = 1024;
137137
(void) mca_base_component_var_register(c, "context_free_list_max",
138138
"Maximum number of segments in context free list",
139-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
139+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
140140
OPAL_INFO_LVL_9,
141-
MCA_BASE_VAR_SCOPE_READONLY,
141+
MCA_BASE_VAR_SCOPE_ALL,
142142
&cs->adapt_context_free_list_max);
143143

144144
cs->adapt_context_free_list_inc = 32;
145145
(void) mca_base_component_var_register(c, "context_free_list_inc",
146146
"Increasement number of segments in context free list",
147-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
147+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
148148
OPAL_INFO_LVL_9,
149-
MCA_BASE_VAR_SCOPE_READONLY,
149+
MCA_BASE_VAR_SCOPE_ALL,
150150
&cs->adapt_context_free_list_inc);
151151
ompi_coll_adapt_ibcast_register();
152152
ompi_coll_adapt_ireduce_register();

ompi/mca/coll/adapt/coll_adapt_ibcast.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ int ompi_coll_adapt_ibcast_register(void)
3434

3535
mca_coll_adapt_component.adapt_ibcast_algorithm = 1;
3636
mca_base_component_var_register(c, "bcast_algorithm",
37-
"Algorithm of broadcast, 0: tuned, 1: binomial, 2: in_order_binomial, 3: binary, 4: pipeline, 5: chain, 6: linear", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
38-
OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY,
37+
"Algorithm of broadcast, 0: tuned, 1: binomial, 2: in_order_binomial, 3: binary, 4: pipeline, 5: chain, 6: linear",
38+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
39+
OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL,
3940
&mca_coll_adapt_component.adapt_ibcast_algorithm);
4041
if( (mca_coll_adapt_component.adapt_ibcast_algorithm < 0) ||
4142
(mca_coll_adapt_component.adapt_ibcast_algorithm >= OMPI_COLL_ADAPT_ALGORITHM_COUNT) ) {
@@ -45,33 +46,33 @@ int ompi_coll_adapt_ibcast_register(void)
4546
mca_coll_adapt_component.adapt_ibcast_segment_size = 0;
4647
mca_base_component_var_register(c, "bcast_segment_size",
4748
"Segment size in bytes used by default for bcast algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.",
48-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
49+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
4950
OPAL_INFO_LVL_5,
50-
MCA_BASE_VAR_SCOPE_READONLY,
51+
MCA_BASE_VAR_SCOPE_ALL,
5152
&mca_coll_adapt_component.adapt_ibcast_segment_size);
5253

5354
mca_coll_adapt_component.adapt_ibcast_max_send_requests = 2;
5455
mca_base_component_var_register(c, "bcast_max_send_requests",
5556
"Maximum number of send requests",
56-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
57+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
5758
OPAL_INFO_LVL_5,
58-
MCA_BASE_VAR_SCOPE_READONLY,
59+
MCA_BASE_VAR_SCOPE_ALL,
5960
&mca_coll_adapt_component.adapt_ibcast_max_send_requests);
6061

6162
mca_coll_adapt_component.adapt_ibcast_max_recv_requests = 3;
6263
mca_base_component_var_register(c, "bcast_max_recv_requests",
6364
"Maximum number of receive requests",
64-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
65+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
6566
OPAL_INFO_LVL_5,
66-
MCA_BASE_VAR_SCOPE_READONLY,
67+
MCA_BASE_VAR_SCOPE_ALL,
6768
&mca_coll_adapt_component.adapt_ibcast_max_recv_requests);
6869

6970
mca_coll_adapt_component.adapt_ibcast_synchronous_send = true;
7071
(void) mca_base_component_var_register(c, "bcast_synchronous_send",
7172
"Whether to use synchronous send operations during setup of bcast operations",
72-
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
73+
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
7374
OPAL_INFO_LVL_9,
74-
MCA_BASE_VAR_SCOPE_READONLY,
75+
MCA_BASE_VAR_SCOPE_ALL,
7576
&mca_coll_adapt_component.adapt_ibcast_synchronous_send);
7677

7778
mca_coll_adapt_component.adapt_ibcast_context_free_list = NULL;

ompi/mca/coll/adapt/coll_adapt_ireduce.c

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ int ompi_coll_adapt_ireduce_register(void)
3838

3939
mca_coll_adapt_component.adapt_ireduce_algorithm = 1;
4040
mca_base_component_var_register(c, "reduce_algorithm",
41-
"Algorithm of reduce, 1: binomial, 2: in_order_binomial, 3: binary, 4: pipeline, 5: chain, 6: linear", MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
42-
OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_READONLY,
41+
"Algorithm of reduce, 1: binomial, 2: in_order_binomial, 3: binary, 4: pipeline, 5: chain, 6: linear",
42+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
43+
OPAL_INFO_LVL_5, MCA_BASE_VAR_SCOPE_ALL,
4344
&mca_coll_adapt_component.adapt_ireduce_algorithm);
4445
if( (mca_coll_adapt_component.adapt_ireduce_algorithm < 0) ||
4546
(mca_coll_adapt_component.adapt_ireduce_algorithm > OMPI_COLL_ADAPT_ALGORITHM_COUNT) ) {
@@ -49,58 +50,58 @@ int ompi_coll_adapt_ireduce_register(void)
4950
mca_coll_adapt_component.adapt_ireduce_segment_size = 163740;
5051
mca_base_component_var_register(c, "reduce_segment_size",
5152
"Segment size in bytes used by default for reduce algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.",
52-
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, 0,
53+
MCA_BASE_VAR_TYPE_SIZE_T, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
5354
OPAL_INFO_LVL_5,
54-
MCA_BASE_VAR_SCOPE_READONLY,
55+
MCA_BASE_VAR_SCOPE_ALL,
5556
&mca_coll_adapt_component.adapt_ireduce_segment_size);
5657

5758
mca_coll_adapt_component.adapt_ireduce_max_send_requests = 2;
5859
mca_base_component_var_register(c, "reduce_max_send_requests",
5960
"Maximum number of send requests",
60-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
61+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
6162
OPAL_INFO_LVL_5,
62-
MCA_BASE_VAR_SCOPE_READONLY,
63+
MCA_BASE_VAR_SCOPE_ALL,
6364
&mca_coll_adapt_component.adapt_ireduce_max_send_requests);
6465

6566
mca_coll_adapt_component.adapt_ireduce_max_recv_requests = 3;
6667
mca_base_component_var_register(c, "reduce_max_recv_requests",
6768
"Maximum number of receive requests per peer",
68-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
69+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
6970
OPAL_INFO_LVL_5,
70-
MCA_BASE_VAR_SCOPE_READONLY,
71+
MCA_BASE_VAR_SCOPE_ALL,
7172
&mca_coll_adapt_component.adapt_ireduce_max_recv_requests);
7273

7374
mca_coll_adapt_component.adapt_inbuf_free_list_min = 10;
7475
mca_base_component_var_register(c, "inbuf_free_list_min",
7576
"Minimum number of segment in inbuf free list",
76-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
77+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
7778
OPAL_INFO_LVL_5,
78-
MCA_BASE_VAR_SCOPE_READONLY,
79+
MCA_BASE_VAR_SCOPE_ALL,
7980
&mca_coll_adapt_component.adapt_inbuf_free_list_min);
8081

8182
mca_coll_adapt_component.adapt_inbuf_free_list_max = 10000;
8283
mca_base_component_var_register(c, "inbuf_free_list_max",
8384
"Maximum number of segment in inbuf free list",
84-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
85+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
8586
OPAL_INFO_LVL_5,
86-
MCA_BASE_VAR_SCOPE_READONLY,
87+
MCA_BASE_VAR_SCOPE_ALL,
8788
&mca_coll_adapt_component.adapt_inbuf_free_list_max);
8889

8990

9091
mca_coll_adapt_component.adapt_inbuf_free_list_inc = 10;
9192
mca_base_component_var_register(c, "inbuf_free_list_inc",
9293
"Number of segments to allocate when growing the inbuf free list",
93-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
94+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
9495
OPAL_INFO_LVL_5,
95-
MCA_BASE_VAR_SCOPE_READONLY,
96+
MCA_BASE_VAR_SCOPE_ALL,
9697
&mca_coll_adapt_component.adapt_inbuf_free_list_inc);
9798

9899
mca_coll_adapt_component.adapt_ireduce_synchronous_send = true;
99100
(void) mca_base_component_var_register(c, "reduce_synchronous_send",
100101
"Whether to use synchronous send operations during setup of reduce operations",
101-
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
102+
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
102103
OPAL_INFO_LVL_9,
103-
MCA_BASE_VAR_SCOPE_READONLY,
104+
MCA_BASE_VAR_SCOPE_ALL,
104105
&mca_coll_adapt_component.adapt_ireduce_synchronous_send);
105106

106107
mca_coll_adapt_component.adapt_ireduce_context_free_list = NULL;

0 commit comments

Comments
 (0)