You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
coll/tuned: simplify arguments to dynamic file create/destroy
Previously we passed n_collectives which we hard-coded to COLLCOUNT.
Now we just include coll_base_functions.h and use COLLCOUNT directly.
Signed-off-by: Luke Robison <[email protected]>
longNCOL=0, /* number of collectives for which rules are provided */
73
76
COLID=0, /* identifies the collective type to associate the rules with */
@@ -106,19 +109,14 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
106
109
return (-2);
107
110
}
108
111
109
-
if (n_collectives<1) {
110
-
OPAL_OUTPUT((ompi_coll_tuned_stream,"Gave %d as max number of collectives in the rule table configuration file for tuned collectives!... ignoring!\n", n_collectives));
OPAL_OUTPUT((ompi_coll_tuned_stream,"Cannot allocate rules for file [%s]\n", fname));
124
122
goto on_file_error;
@@ -134,8 +132,8 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
134
132
OPAL_OUTPUT((ompi_coll_tuned_stream,"Could not read number of collectives in configuration file around line %d\n", fileline));
135
133
goto on_file_error;
136
134
}
137
-
if (NCOL>n_collectives) {
138
-
OPAL_OUTPUT((ompi_coll_tuned_stream,"Number of collectives in configuration file %ld is greater than number of MPI collectives possible %d ??? error around line %d\n", NCOL, n_collectives, fileline));
135
+
if (NCOL>COLLCOUNT) {
136
+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Number of collectives in configuration file %ld is greater than number of MPI collectives possible %d ??? error around line %d\n", NCOL, COLLCOUNT, fileline));
139
137
goto on_file_error;
140
138
}
141
139
@@ -146,8 +144,8 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
146
144
OPAL_OUTPUT((ompi_coll_tuned_stream,"Could not read next Collective id in configuration file around line %d\n", fileline));
147
145
goto on_file_error;
148
146
}
149
-
if (COLID>=n_collectives) {
150
-
OPAL_OUTPUT((ompi_coll_tuned_stream,"Collective id in configuration file %ld is greater than MPI collectives possible %d. Error around line %d\n", COLID, n_collectives, fileline));
147
+
if (COLID>=COLLCOUNT) {
148
+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Collective id in configuration file %ld is greater than MPI collectives possible %d. Error around line %d\n", COLID, COLLCOUNT, fileline));
151
149
goto on_file_error;
152
150
}
153
151
@@ -296,7 +294,7 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
296
294
OPAL_OUTPUT((ompi_coll_tuned_stream,"Fix errors as listed above and try again.\n"));
297
295
298
296
/* deallocate memory if allocated */
299
-
if (alg_rules) ompi_coll_tuned_free_all_rules (alg_rules, n_collectives);
297
+
if (alg_rules) ompi_coll_tuned_free_all_rules (alg_rules);
0 commit comments