1
1

CIDs 1080-1090: assert() checks were not sufficient to check for

NEGATIVE_RETURNS from _reg_int() because those are not always
checked.  So replace them with real if() checks.

This commit was SVN r20195.
Этот коммит содержится в:
Jeff Squyres 2009-01-03 15:56:25 +00:00
родитель 6d0d8848ac
Коммит 11b375f8b5
11 изменённых файлов: 39 добавлений и 13 удалений

Просмотреть файл

@ -765,7 +765,9 @@ 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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || requested_alg > max_alg ) { if( 0 > requested_alg || requested_alg > max_alg ) {

Просмотреть файл

@ -692,7 +692,9 @@ 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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || requested_alg > max_alg ) { if( 0 > requested_alg || requested_alg > max_alg ) {

Просмотреть файл

@ -940,7 +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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || 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 ) ) {

Просмотреть файл

@ -620,7 +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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || 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 ) ) {
@ -659,7 +661,9 @@ 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); if (mca_param_indices->max_requests_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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,7 +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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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 (0 > requested_alg || 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)) {

Просмотреть файл

@ -428,7 +428,9 @@ 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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || requested_alg > max_alg ) { if( 0 > requested_alg || requested_alg > max_alg ) {

Просмотреть файл

@ -736,7 +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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || 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 ) ) {

Просмотреть файл

@ -450,7 +450,9 @@ 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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || requested_alg > max_alg ) { if( 0 > requested_alg || requested_alg > max_alg ) {

Просмотреть файл

@ -729,7 +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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || 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 ) ) {
@ -768,7 +770,9 @@ 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); if (mca_param_indices->max_requests_param_index < 0) {
return mca_param_indices->max_requests_param_index;
}
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 ) ) {

Просмотреть файл

@ -654,7 +654,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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || 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 ) ) {

Просмотреть файл

@ -290,7 +290,9 @@ 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); if (mca_param_indices->algorithm_param_index < 0) {
return mca_param_indices->algorithm_param_index;
}
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( 0 > requested_alg || requested_alg > max_alg ) { if( 0 > requested_alg || requested_alg > max_alg ) {