Skip to content

Commit c331e67

Browse files
authored
Allow all tuned MCA parameters to be modified programatically. (#2829)
Fix a comment in the MCA header. Signed-off-by: George Bosilca <[email protected]>
1 parent 6cb484a commit c331e67

12 files changed

+101
-103
lines changed

ompi/mca/coll/tuned/coll_tuned_allgather_decision.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2004-2015 The University of Tennessee and The University
2+
* Copyright (c) 2004-2017 The University of Tennessee and The University
33
* of Tennessee Research Foundation. All rights
44
* reserved.
55
* Copyright (c) 2015 Research Organization for Information Science
@@ -69,7 +69,7 @@ ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca
6969
MCA_BASE_VAR_FLAG_DEFAULT_ONLY,
7070
OPAL_INFO_LVL_5,
7171
MCA_BASE_VAR_SCOPE_CONSTANT,
72-
&cnt);
72+
&ompi_coll_tuned_forced_max_algorithms[ALLGATHER]);
7373

7474
/* MPI_T: This variable should eventually be bound to a communicator */
7575
coll_tuned_allgather_forced_algorithm = 0;
@@ -78,9 +78,9 @@ ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca
7878
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
7979
"allgather_algorithm",
8080
"Which allallgather algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 bruck, 3 recursive doubling, 4 ring, 5 neighbor exchange, 6: two proc only.",
81-
MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0,
81+
MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE,
8282
OPAL_INFO_LVL_5,
83-
MCA_BASE_VAR_SCOPE_READONLY,
83+
MCA_BASE_VAR_SCOPE_ALL,
8484
&coll_tuned_allgather_forced_algorithm);
8585
OBJ_RELEASE(new_enum);
8686
if (mca_param_indices->algorithm_param_index < 0) {
@@ -92,29 +92,29 @@ ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca
9292
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
9393
"allgather_algorithm_segmentsize",
9494
"Segment size in bytes used by default for allgather algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation. Currently, available algorithms do not support segmentation.",
95-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
95+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
9696
OPAL_INFO_LVL_5,
97-
MCA_BASE_VAR_SCOPE_READONLY,
97+
MCA_BASE_VAR_SCOPE_ALL,
9898
&coll_tuned_allgather_segment_size);
9999

100100
coll_tuned_allgather_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */
101101
mca_param_indices->tree_fanout_param_index =
102102
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
103103
"allgather_algorithm_tree_fanout",
104104
"Fanout for n-tree used for allgather algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation. Currently, available algorithms do not support n-tree topologies.",
105-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
105+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
106106
OPAL_INFO_LVL_5,
107-
MCA_BASE_VAR_SCOPE_READONLY,
107+
MCA_BASE_VAR_SCOPE_ALL,
108108
&coll_tuned_allgather_tree_fanout);
109109

110110
coll_tuned_allgather_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */
111111
mca_param_indices->chain_fanout_param_index =
112112
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
113113
"allgather_algorithm_chain_fanout",
114114
"Fanout for chains used for allgather algorithms. Only has meaning if algorithm is forced and supports chain topo based operation. Currently, available algorithms do not support chain topologies.",
115-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
115+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
116116
OPAL_INFO_LVL_5,
117-
MCA_BASE_VAR_SCOPE_READONLY,
117+
MCA_BASE_VAR_SCOPE_ALL,
118118
&coll_tuned_allgather_chain_fanout);
119119

120120
return (MPI_SUCCESS);

ompi/mca/coll/tuned/coll_tuned_allgatherv_decision.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2004-2015 The University of Tennessee and The University
3+
* Copyright (c) 2004-2017 The University of Tennessee and The University
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2015 Research Organization for Information Science
@@ -68,7 +68,7 @@ ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mc
6868
MCA_BASE_VAR_FLAG_DEFAULT_ONLY,
6969
OPAL_INFO_LVL_5,
7070
MCA_BASE_VAR_SCOPE_CONSTANT,
71-
&cnt);
71+
&ompi_coll_tuned_forced_max_algorithms[ALLGATHERV]);
7272

7373
/* MPI_T: This variable should eventually be bound to a communicator */
7474
coll_tuned_allgatherv_forced_algorithm = 0;
@@ -77,9 +77,9 @@ ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mc
7777
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
7878
"allgatherv_algorithm",
7979
"Which allallgatherv algorithm is used. Can be locked down to choice of: 0 ignore, 1 default (allgathervv + bcast), 2 bruck, 3 ring, 4 neighbor exchange, 5: two proc only.",
80-
MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0,
80+
MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE,
8181
OPAL_INFO_LVL_5,
82-
MCA_BASE_VAR_SCOPE_READONLY,
82+
MCA_BASE_VAR_SCOPE_CONSTANT,
8383
&coll_tuned_allgatherv_forced_algorithm);
8484
OBJ_RELEASE(new_enum);
8585
if (mca_param_indices->algorithm_param_index < 0) {
@@ -91,29 +91,29 @@ ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mc
9191
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
9292
"allgatherv_algorithm_segmentsize",
9393
"Segment size in bytes used by default for allgatherv algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation. Currently, available algorithms do not support segmentation.",
94-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
94+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
9595
OPAL_INFO_LVL_5,
96-
MCA_BASE_VAR_SCOPE_READONLY,
96+
MCA_BASE_VAR_SCOPE_CONSTANT,
9797
&coll_tuned_allgatherv_segment_size);
9898

9999
coll_tuned_allgatherv_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */
100100
mca_param_indices->tree_fanout_param_index =
101101
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
102102
"allgatherv_algorithm_tree_fanout",
103103
"Fanout for n-tree used for allgatherv algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation. Currently, available algorithms do not support n-tree topologies.",
104-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
104+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
105105
OPAL_INFO_LVL_5,
106-
MCA_BASE_VAR_SCOPE_READONLY,
106+
MCA_BASE_VAR_SCOPE_CONSTANT,
107107
&coll_tuned_allgatherv_tree_fanout);
108108

109109
coll_tuned_allgatherv_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */
110110
mca_param_indices->chain_fanout_param_index =
111111
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
112112
"allgatherv_algorithm_chain_fanout",
113113
"Fanout for chains used for allgatherv algorithms. Only has meaning if algorithm is forced and supports chain topo based operation. Currently, available algorithms do not support chain topologies.",
114-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
114+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
115115
OPAL_INFO_LVL_5,
116-
MCA_BASE_VAR_SCOPE_READONLY,
116+
MCA_BASE_VAR_SCOPE_CONSTANT,
117117
&coll_tuned_allgatherv_chain_fanout);
118118

119119
return (MPI_SUCCESS);

ompi/mca/coll/tuned/coll_tuned_allreduce_decision.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
22
/*
3-
* Copyright (c) 2004-2015 The University of Tennessee and The University
3+
* Copyright (c) 2004-2017 The University of Tennessee and The University
44
* of Tennessee Research Foundation. All rights
55
* reserved.
66
* Copyright (c) 2015 Research Organization for Information Science
@@ -68,7 +68,7 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
6868
MCA_BASE_VAR_FLAG_DEFAULT_ONLY,
6969
OPAL_INFO_LVL_5,
7070
MCA_BASE_VAR_SCOPE_CONSTANT,
71-
&cnt);
71+
&ompi_coll_tuned_forced_max_algorithms[ALLREDUCE]);
7272

7373
/* MPI_T: This variable should eventually be bound to a communicator */
7474
coll_tuned_allreduce_forced_algorithm = 0;
@@ -77,9 +77,9 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
7777
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
7878
"allreduce_algorithm",
7979
"Which allreduce algorithm is used. Can be locked down to any of: 0 ignore, 1 basic linear, 2 nonoverlapping (tuned reduce + tuned bcast), 3 recursive doubling, 4 ring, 5 segmented ring",
80-
MCA_BASE_VAR_TYPE_INT, new_enum, 0, 0,
80+
MCA_BASE_VAR_TYPE_INT, new_enum, 0, MCA_BASE_VAR_FLAG_SETTABLE,
8181
OPAL_INFO_LVL_5,
82-
MCA_BASE_VAR_SCOPE_READONLY,
82+
MCA_BASE_VAR_SCOPE_ALL,
8383
&coll_tuned_allreduce_forced_algorithm);
8484
OBJ_RELEASE(new_enum);
8585
if (mca_param_indices->algorithm_param_index < 0) {
@@ -91,29 +91,29 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
9191
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
9292
"allreduce_algorithm_segmentsize",
9393
"Segment size in bytes used by default for allreduce algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.",
94-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
94+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
9595
OPAL_INFO_LVL_5,
96-
MCA_BASE_VAR_SCOPE_READONLY,
96+
MCA_BASE_VAR_SCOPE_ALL,
9797
&coll_tuned_allreduce_segment_size);
9898

9999
coll_tuned_allreduce_tree_fanout = ompi_coll_tuned_init_tree_fanout; /* get system wide default */
100100
mca_param_indices->tree_fanout_param_index =
101101
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
102102
"allreduce_algorithm_tree_fanout",
103103
"Fanout for n-tree used for allreduce algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.",
104-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
104+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
105105
OPAL_INFO_LVL_5,
106-
MCA_BASE_VAR_SCOPE_READONLY,
106+
MCA_BASE_VAR_SCOPE_ALL,
107107
&coll_tuned_allreduce_tree_fanout);
108108

109109
coll_tuned_allreduce_chain_fanout = ompi_coll_tuned_init_chain_fanout; /* get system wide default */
110110
mca_param_indices->chain_fanout_param_index =
111111
mca_base_component_var_register(&mca_coll_tuned_component.super.collm_version,
112112
"allreduce_algorithm_chain_fanout",
113113
"Fanout for chains used for allreduce algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.",
114-
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
114+
MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
115115
OPAL_INFO_LVL_5,
116-
MCA_BASE_VAR_SCOPE_READONLY,
116+
MCA_BASE_VAR_SCOPE_ALL,
117117
&coll_tuned_allreduce_chain_fanout);
118118

119119
return (MPI_SUCCESS);

0 commit comments

Comments
 (0)