Correctly detect when the specified algorithm is out of range. In
this case we reset it to zero. This commit was SVN r12551.
Этот коммит содержится в:
родитель
bfbd0e61f6
Коммит
7102147b9f
@ -140,8 +140,7 @@ ompi_coll_tuned_allreduce_intra_basic_linear(void *sbuf, void *rbuf, int count,
|
||||
|
||||
int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
|
||||
{
|
||||
int rc;
|
||||
int max_alg = 2;
|
||||
int rc, max_alg = 2, requested_alg;
|
||||
|
||||
ompi_coll_tuned_forced_max_algorithms[ALLREDUCE] = max_alg;
|
||||
|
||||
@ -155,12 +154,13 @@ int ompi_coll_tuned_allreduce_intra_check_forced_init (coll_tuned_force_algorith
|
||||
"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)",
|
||||
false, false, 0, NULL);
|
||||
if( mca_param_indices->algorithm_param_index > max_alg ) {
|
||||
mca_base_param_lookup_int( mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||
if( requested_alg > max_alg ) {
|
||||
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",
|
||||
mca_param_indices->algorithm_param_index, max_alg );
|
||||
requested_alg, max_alg );
|
||||
}
|
||||
mca_param_indices->algorithm_param_index = 0;
|
||||
mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
|
||||
}
|
||||
|
||||
mca_param_indices->segsize_param_index
|
||||
|
@ -438,8 +438,7 @@ int ompi_coll_tuned_alltoall_intra_basic_linear(void *sbuf, int scount,
|
||||
|
||||
int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
|
||||
{
|
||||
int rc;
|
||||
int max_alg = 4;
|
||||
int rc, max_alg = 4, requested_alg;
|
||||
|
||||
ompi_coll_tuned_forced_max_algorithms[ALLTOALL] = max_alg;
|
||||
|
||||
@ -453,12 +452,13 @@ int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_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: two proc only.",
|
||||
false, false, 0, NULL);
|
||||
if( mca_param_indices->algorithm_param_index > max_alg ) {
|
||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||
if( requested_alg > max_alg ) {
|
||||
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",
|
||||
mca_param_indices->algorithm_param_index, max_alg );
|
||||
requested_alg, max_alg );
|
||||
}
|
||||
mca_param_indices->algorithm_param_index = 0;
|
||||
mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
|
||||
}
|
||||
|
||||
mca_param_indices->segsize_param_index
|
||||
|
@ -681,8 +681,7 @@ ompi_coll_tuned_bcast_intra_basic_linear (void *buff, int count,
|
||||
|
||||
int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
|
||||
{
|
||||
int rc;
|
||||
int max_alg = 6;
|
||||
int rc, max_alg = 6, requested_alg;
|
||||
|
||||
ompi_coll_tuned_forced_max_algorithms[BCAST] = max_alg;
|
||||
|
||||
@ -697,12 +696,13 @@ int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mc
|
||||
"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.",
|
||||
false, false, 0, NULL);
|
||||
if( mca_param_indices->algorithm_param_index > max_alg ) {
|
||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||
if( requested_alg > max_alg ) {
|
||||
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",
|
||||
mca_param_indices->algorithm_param_index, max_alg );
|
||||
requested_alg, max_alg );
|
||||
}
|
||||
mca_param_indices->algorithm_param_index = 0;
|
||||
mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
|
||||
}
|
||||
|
||||
mca_param_indices->segsize_param_index
|
||||
|
@ -442,8 +442,7 @@ ompi_coll_tuned_reduce_intra_basic_linear(void *sbuf, void *rbuf, int count,
|
||||
*/
|
||||
int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
|
||||
{
|
||||
int rc;
|
||||
int max_alg = 5;
|
||||
int rc, requested_alg, max_alg = 5;
|
||||
|
||||
ompi_coll_tuned_forced_max_algorithms[REDUCE] = max_alg;
|
||||
|
||||
@ -457,12 +456,13 @@ int ompi_coll_tuned_reduce_intra_check_forced_init (coll_tuned_force_algorithm_m
|
||||
"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",
|
||||
false, false, 0, NULL);
|
||||
if( mca_param_indices->algorithm_param_index > max_alg ) {
|
||||
mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
|
||||
if( requested_alg > max_alg ) {
|
||||
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",
|
||||
mca_param_indices->algorithm_param_index, max_alg );
|
||||
requested_alg, max_alg );
|
||||
}
|
||||
mca_param_indices->algorithm_param_index = 0;
|
||||
mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
|
||||
}
|
||||
|
||||
mca_param_indices->segsize_param_index
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user