Skip to content

Commit 5315475

Browse files
authored
Merge pull request #7649 from wckzhang/master
Typo and segfault fixes for coll/tuned
2 parents 5929ee5 + 771f9c0 commit 5315475

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

ompi/mca/coll/tuned/coll_tuned_dynamic_file.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
9090

9191
fptr = fopen (fname, "r");
9292
if (!fptr) {
93-
OPAL_OUTPUT((ompi_coll_tuned_stream,"cannot read rules file [%s]\n", fname));
93+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Cannot read rules file [%s]\n", fname));
9494
goto on_file_error;
9595
}
9696

9797
/* make space and init the algorithm rules for each of the n_collectives MPI collectives */
9898
alg_rules = ompi_coll_tuned_mk_alg_rules (n_collectives);
9999
if (NULL == alg_rules) {
100-
OPAL_OUTPUT((ompi_coll_tuned_stream,"cannot cannot allocate rules for file [%s]\n", fname));
100+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Cannot allocate rules for file [%s]\n", fname));
101101
goto on_file_error;
102102
}
103103

@@ -142,6 +142,10 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
142142
OPAL_OUTPUT((ompi_coll_tuned_stream, "Read communicator count %d for dynamic rule for collective ID %d\n", NCS, CI));
143143
alg_p->n_com_sizes = NCS;
144144
alg_p->com_rules = ompi_coll_tuned_mk_com_rules (NCS, CI);
145+
if (NULL == alg_p->com_rules) {
146+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Cannot allocate com rules for file [%s]\n", fname));
147+
goto on_file_error;
148+
}
145149

146150
for (ncs=0;ncs<NCS;ncs++) { /* for each comm size */
147151

@@ -164,6 +168,10 @@ int ompi_coll_tuned_read_rules_config_file (char *fname, ompi_coll_alg_rule_t**
164168
NMS, CI, CS));
165169
com_p->n_msg_sizes = NMS;
166170
com_p->msg_rules = ompi_coll_tuned_mk_msg_rules (NMS, CI, ncs, CS);
171+
if (NULL == com_p->msg_rules) {
172+
OPAL_OUTPUT((ompi_coll_tuned_stream,"Cannot allocate msg rules for file [%s]\n", fname));
173+
goto on_file_error;
174+
}
167175

168176
msg_p = com_p->msg_rules;
169177

ompi/mca/coll/tuned/coll_tuned_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ ompi_coll_tuned_comm_query(struct ompi_communicator_t *comm, int *priority)
9191
tuned_module->super.coll_module_enable = tuned_module_enable;
9292
tuned_module->super.ft_event = mca_coll_tuned_ft_event;
9393

94-
/* By default stick with the fied version of the tuned collectives. Later on,
94+
/* By default stick with the fixed version of the tuned collectives. Later on,
9595
* when the module get enabled, set the correct version based on the availability
9696
* of the dynamic rules.
9797
*/

0 commit comments

Comments
 (0)