Skip to content

Commit ba968e4

Browse files
committed
coll/base/reduce: Remove warning identified by Coverity Scan
Signed-off-by: Mikhail Kurnosov <[email protected]>
1 parent c22c485 commit ba968e4

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)