Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable nonrepro FMAs in convex BBL solver
Three FMAs were introduced when the BBL convex L(:) computation were moved to a separate function. Parentheses have been added to disable these FMAs. Calculation of the cell width fractions `L` was consolidated and moved into a new function, `find_L_open_concave_analytic` (later renamed to `find_open_L_open_concave_trigonometric`). When compiled with Intel and using the following flags, -O2 -march=core-avx2 -fp-model source -qno-opt-dynamic-align additional FMAs are added to the function, specifically the following expressions: crv_3 = (Dp + Dm - 2.0*D_vel) L(K) = L0*(1.0 + ax2_3apb*L0) L(K) = apb_4a * (1.0 - 2.0 * cos( C1_3*acos(a2x48_apb3*vol_below(K) - 1.0) - C2pi_3) ) (Third expression FMA was added inside of `acos()` by the compiler) The crucial flag seems to be `-march=core-avx2` which controls the introduction of FMAs and explains why the problem went undetected. The legacy answers were restored by adding new parentheses to the above equations. Since this function is not generally considered reproducible and is provided for legacy support, the loss of performance is not considered to be an issue.
- Loading branch information