Skip to content

Commit ba2368b

Browse files
authored
Merge pull request #6774 from hppritcha/topic/pr_6759_for_v4.0.x
Suggestion to fix division by zero in file view.
2 parents 3da9236 + 16e1d74 commit ba2368b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

ompi/mca/common/ompio/common_ompio_aggregators.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,13 +1491,12 @@ static double cost_calc (int P, int P_a, size_t d_p, size_t b_c, int dim )
14911491
}
14921492
case DIM2:
14931493
{
1494-
int P_x, P_y, c;
1494+
int P_x, P_y;
14951495

14961496
P_x = P_y = (int) sqrt(P);
1497-
c = (float) P_a / (float)P_x;
1497+
n_as = (float) P_a / (float)P_x;
14981498

14991499
n_ar = (float) P_y;
1500-
n_as = (float) c;
15011500
if ( d_p > (P_a*b_c/P )) {
15021501
m_s = fmin(b_c / P_y, d_p);
15031502
}

0 commit comments

Comments
 (0)