File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1717 * and Technology (RIST). All rights reserved.
1818 * Copyright (c) 2018 Siberian State University of Telecommunications
1919 * and Information Science. All rights reserved.
20+ * Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
2021 * $COPYRIGHT$
2122 *
2223 * Additional copyrights may follow
@@ -982,7 +983,9 @@ int ompi_coll_base_allreduce_intra_redscat_allgather(
982983
983984 /* Find nearest power-of-two less than or equal to comm_size */
984985 int nsteps = opal_hibit (comm_size , comm -> c_cube_dim + 1 ); /* ilog2(comm_size) */
985- assert (nsteps >= 0 );
986+ if (-1 == nsteps ) {
987+ return MPI_ERR_ARG ;
988+ }
986989 int nprocs_pof2 = 1 << nsteps ; /* flp2(comm_size) */
987990
988991 if (count < nprocs_pof2 || !ompi_op_is_commute (op )) {
Original file line number Diff line number Diff line change 1717 * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
1818 * Copyright (c) 2018 Siberian State University of Telecommunications
1919 * and Information Science. All rights reserved.
20+ * Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
2021 * $COPYRIGHT$
2122 *
2223 * Additional copyrights may follow
@@ -812,7 +813,9 @@ int ompi_coll_base_reduce_intra_redscat_gather(
812813
813814 /* Find nearest power-of-two less than or equal to comm_size */
814815 int nsteps = opal_hibit (comm_size , comm -> c_cube_dim + 1 ); /* ilog2(comm_size) */
815- assert (nsteps >= 0 );
816+ if (-1 == nsteps ) {
817+ return MPI_ERR_ARG ;
818+ }
816819 int nprocs_pof2 = 1 << nsteps ; /* flp2(comm_size) */
817820
818821 if (nprocs_pof2 < 2 || count < nprocs_pof2 || !ompi_op_is_commute (op )) {
You can’t perform that action at this time.
0 commit comments