- Make sure, that the *param_index are > 0 (here, we don't pass
errors up...). Coverity CID 1080 - 1090 - Really make sure, the user does not specify stupid negative values. This commit was SVN r19233.
Этот коммит содержится в:
родитель
9cc83d7414
Коммит
ee1fe9015a
@ -765,9 +765,10 @@ ompi_coll_tuned_allgather_intra_check_forced_init(coll_tuned_force_algorithm_mca
|
|||||||
"allgather_algorithm",
|
"allgather_algorithm",
|
||||||
"Which allgather algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 bruck, 3 recursive doubling, 4 ring, 5 neighbor exchange, 6: two proc only.",
|
"Which allgather algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 bruck, 3 recursive doubling, 4 ring, 5 neighbor exchange, 6: two proc only.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
||||||
&(requested_alg));
|
&(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Allgather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Allgather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -701,9 +701,10 @@ ompi_coll_tuned_allgatherv_intra_check_forced_init(coll_tuned_force_algorithm_mc
|
|||||||
"allgatherv_algorithm",
|
"allgatherv_algorithm",
|
||||||
"Which allgather algorithm is used. Can be locked down to choice of: 0 ignore, 1 default (gatherv + bcast), 2 bruck, 3 ring, 4 neighbor exchange, 5: two proc only.",
|
"Which allgather algorithm is used. Can be locked down to choice of: 0 ignore, 1 default (gatherv + bcast), 2 bruck, 3 ring, 4 neighbor exchange, 5: two proc only.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
||||||
&(requested_alg));
|
&(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Allgather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Allgather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -940,8 +940,9 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
|
|||||||
"allreduce_algorithm",
|
"allreduce_algorithm",
|
||||||
"Which allreduce algorithm is used. Can be locked down to any of: 0 ignore, 1 basic linear, 2 nonoverlapping (tuned reduce + tuned bcast), 3 recursive doubling, 4 ring, 5 segmented ring",
|
"Which allreduce algorithm is used. Can be locked down to any of: 0 ignore, 1 basic linear, 2 nonoverlapping (tuned reduce + tuned bcast), 3 recursive doubling, 4 ring, 5 segmented ring",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int( mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int( mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Allreduce algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Allreduce algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -620,8 +620,9 @@ int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm
|
|||||||
"alltoall_algorithm",
|
"alltoall_algorithm",
|
||||||
"Which alltoall algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 pairwise, 3: modified bruck, 4: linear with sync, 5:two proc only.",
|
"Which alltoall algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 pairwise, 3: modified bruck, 4: linear with sync, 5:two proc only.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Alltoall algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Alltoall algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
@ -658,6 +659,7 @@ int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm
|
|||||||
false, false,
|
false, false,
|
||||||
ompi_coll_tuned_init_max_requests, /* get system wide default */
|
ompi_coll_tuned_init_max_requests, /* get system wide default */
|
||||||
NULL);
|
NULL);
|
||||||
|
assert (mca_param_indices->max_requests_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->max_requests_param_index, &(max_requests));
|
mca_base_param_lookup_int(mca_param_indices->max_requests_param_index, &(max_requests));
|
||||||
if( max_requests <= 1 ) {
|
if( max_requests <= 1 ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
|
@ -234,8 +234,9 @@ int ompi_coll_tuned_alltoallv_intra_check_forced_init(coll_tuned_force_algorithm
|
|||||||
"Can be locked down to choice of: 0 ignore, "
|
"Can be locked down to choice of: 0 ignore, "
|
||||||
"1 basic linear, 2 pairwise.",
|
"1 basic linear, 2 pairwise.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if (requested_alg > max_alg) {
|
if (0 > requested_alg || requested_alg > max_alg) {
|
||||||
if (0 == ompi_comm_rank( MPI_COMM_WORLD)) {
|
if (0 == ompi_comm_rank( MPI_COMM_WORLD)) {
|
||||||
opal_output(0, "Alltoallv algorithm #%d is not available (range [0..%d]). "
|
opal_output(0, "Alltoallv algorithm #%d is not available (range [0..%d]). "
|
||||||
"Switching back to ignore(0)\n",
|
"Switching back to ignore(0)\n",
|
||||||
|
@ -428,9 +428,10 @@ int ompi_coll_tuned_barrier_intra_check_forced_init (coll_tuned_force_algorithm_
|
|||||||
"barrier_algorithm",
|
"barrier_algorithm",
|
||||||
"Which barrier algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 double ring, 3: recursive doubling 4: bruck, 5: two proc only, 6: tree",
|
"Which barrier algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 double ring, 3: recursive doubling 4: bruck, 5: two proc only, 6: tree",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
||||||
&(requested_alg));
|
&(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Barrier algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Barrier algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -736,8 +736,9 @@ int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mc
|
|||||||
"bcast_algorithm",
|
"bcast_algorithm",
|
||||||
"Which bcast algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 chain, 3: pipeline, 4: split binary tree, 5: binary tree, 6: binomial tree.",
|
"Which bcast algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 chain, 3: pipeline, 4: split binary tree, 5: binary tree, 6: binomial tree.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Broadcast algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Broadcast algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -450,9 +450,10 @@ ompi_coll_tuned_gather_intra_check_forced_init(coll_tuned_force_algorithm_mca_pa
|
|||||||
"gather_algorithm",
|
"gather_algorithm",
|
||||||
"Which gather algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 binomial, 3 linear with synchronization.",
|
"Which gather algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 binomial, 3 linear with synchronization.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
||||||
&(requested_alg));
|
&(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Gather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Gather algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -729,8 +729,9 @@ int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_m
|
|||||||
"reduce_algorithm",
|
"reduce_algorithm",
|
||||||
"Which reduce algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 chain, 3 pipeline, 4 binary, 5 binomial, 6 in-order binary",
|
"Which reduce algorithm is used. Can be locked down to choice of: 0 ignore, 1 linear, 2 chain, 3 pipeline, 4 binary, 5 binomial, 6 in-order binary",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Reduce algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Reduce algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
@ -767,6 +768,7 @@ int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_m
|
|||||||
false, false, 0, /* no limit for reduce by default */
|
false, false, 0, /* no limit for reduce by default */
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
assert (mca_param_indices->max_requests_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->max_requests_param_index, &(max_requests));
|
mca_base_param_lookup_int(mca_param_indices->max_requests_param_index, &(max_requests));
|
||||||
if( max_requests < 0 ) {
|
if( max_requests < 0 ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
|
@ -651,8 +651,9 @@ int ompi_coll_tuned_reduce_scatter_intra_check_forced_init (coll_tuned_force_alg
|
|||||||
"reduce_scatter_algorithm",
|
"reduce_scatter_algorithm",
|
||||||
"Which reduce reduce_scatter algorithm is used. Can be locked down to choice of: 0 ignore, 1 non-overlapping (Reduce + Scatterv), 2 recursive halving, 3 ring",
|
"Which reduce reduce_scatter algorithm is used. Can be locked down to choice of: 0 ignore, 1 non-overlapping (Reduce + Scatterv), 2 recursive halving, 3 ring",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Reduce_scatter algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Reduce_scatter algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
@ -290,9 +290,10 @@ ompi_coll_tuned_scatter_intra_check_forced_init(coll_tuned_force_algorithm_mca_p
|
|||||||
"scatter_algorithm",
|
"scatter_algorithm",
|
||||||
"Which scatter algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 binomial.",
|
"Which scatter algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 binomial.",
|
||||||
false, false, 0, NULL);
|
false, false, 0, NULL);
|
||||||
|
assert (mca_param_indices->algorithm_param_index >= 0);
|
||||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index,
|
||||||
&(requested_alg));
|
&(requested_alg));
|
||||||
if( requested_alg > max_alg ) {
|
if( 0 > requested_alg || requested_alg > max_alg ) {
|
||||||
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
|
||||||
opal_output( 0, "Scatter algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
opal_output( 0, "Scatter algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
|
||||||
requested_alg, max_alg );
|
requested_alg, max_alg );
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user