1
1

Merge pull request #7193 from edgargabriel/pr/simple-aggr-mode-fix-v4.0.x

common/ompio: fix calculation in simple-grouping option
Этот коммит содержится в:
Howard Pritchard 2019-11-26 09:26:26 -07:00 коммит произвёл GitHub
родитель 7cc5841b9a 39acc3a251
Коммит 41717c8b73
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

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

@ -126,17 +126,17 @@ int mca_common_ompio_simple_grouping(ompio_file_t *fh,
}
P_a = 1;
time_prev = cost_calc ( fh->f_size, P_a, fh->f_view_size, (size_t) fh->f_bytes_per_agg, mode );
time_prev = cost_calc ( fh->f_size, P_a, fh->f_cc_size, (size_t) fh->f_bytes_per_agg, mode );
P_a_prev = P_a;
for ( P_a = incr; P_a <= fh->f_size; P_a += incr ) {
time = cost_calc ( fh->f_size, P_a, fh->f_view_size, (size_t) fh->f_bytes_per_agg, mode );
time = cost_calc ( fh->f_size, P_a, fh->f_cc_size, (size_t) fh->f_bytes_per_agg, mode );
dtime_abs = (time_prev - time);
dtime = dtime_abs / time_prev;
dtime_diff = ( P_a == incr ) ? dtime : (dtime_prev - dtime);
#ifdef OMPIO_DEBUG
if ( 0 == fh->f_rank ){
printf(" d_p = %ld P_a = %d time = %lf dtime = %lf dtime_abs =%lf dtime_diff=%lf\n",
fh->f_view_size, P_a, time, dtime, dtime_abs, dtime_diff );
fh->f_cc_size, P_a, time, dtime, dtime_abs, dtime_diff );
}
#endif
if ( dtime_diff < dtime_threshold ) {
@ -171,7 +171,7 @@ int mca_common_ompio_simple_grouping(ompio_file_t *fh,
num_groups = P_a_prev;
#ifdef OMPIO_DEBUG
printf(" For P=%d d_p=%ld b_c=%d threshold=%f chosen P_a = %d \n",
fh->f_size, fh->f_view_size, fh->f_bytes_per_agg, dtime_threshold, P_a_prev);
fh->f_size, fh->f_cc_size, fh->f_bytes_per_agg, dtime_threshold, P_a_prev);
#endif
/* Cap the maximum number of aggregators.*/
@ -183,6 +183,7 @@ int mca_common_ompio_simple_grouping(ompio_file_t *fh,
}
*num_groups_out = num_groups;
return mca_common_ompio_forced_grouping ( fh, num_groups, contg_groups);
}