Skip to content

Commit b39bbfb

Browse files
authored
Merge pull request #5142 from mkurnosov/base-reduce-remove-warnings
coll/base/reduce: remove warning identified by Coverity Scan
2 parents 0e8b35b + ba968e4 commit b39bbfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/mca/coll/base/coll_base_reduce.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ int ompi_coll_base_reduce_intra_redscat_gather(
787787
assert(nsteps >= 0);
788788
int nprocs_pof2 = 1 << nsteps; /* flp2(comm_size) */
789789

790-
if (count < nprocs_pof2 || !ompi_op_is_commute(op)) {
790+
if (nprocs_pof2 < 2 || count < nprocs_pof2 || !ompi_op_is_commute(op)) {
791791
OPAL_OUTPUT((ompi_coll_base_framework.framework_output,
792792
"coll:base:reduce_intra_redscat_gather: rank %d/%d count %d "
793793
"switching to basic linear reduce", rank, comm_size, count));

0 commit comments

Comments
 (0)