ARM post-submit SIMD sqrt/invsqrt test failure
This has been broken for a while, since at least 18th September, where the Jenkins history stops. I'm not sure whether I missed some discussion on this.
/home/jenkins/workspace/Matrix_PostSubmit_master/2ef28f92/gromacs/src/gromacs/simd/tests/simd_math.cpp:690 Failing SIMD math function ulp comparison between refSqrt and sqrtSingleAccuracy Requested ulp tolerance: 16 Requested abs tolerance: 0 Denormals can be 0: false Largest Ulp difference occurs for x=2.6848277890087878e+38 Ref values: 1.6385444545141146e+19 SIMD values: 3.6968949829456626e+19 Ulp diff.: 10280507
#2 Updated by Berk Hess over 3 years ago
- Status changed from New to Fix uploaded
- Target version set to 2016.5
- Affected version changed from git master to 2016
Without NDEBUG maskzRsqrt does reciprocal instead of invsqrt, and thus all invsqrt and sqrt SIMD functions are incorrect.
In full release mode it should be correct.
#7 Updated by Berk Hess over 3 years ago
- Status changed from In Progress to Fix uploaded
- Target version changed from 2016.5 to 2018
Mark said the result only deviates for values close to float_max. Since the error is a factor 1.5 for float_max and you need to put the sqaured approximation into the arm iterator function, what likely happens is that (approx_sqrt(float_max))^2 > float_max, which is inf, which in turn gives 0 at the result of the arm iterator function. This is then "corrected" in follow-up iterations.
The solution is to disable the hardware iterator function and use the GROMACS version.
(another solution could be limiting the argument range of invsqrt to slightly less than float_max).
Since this only affects arguments very close to float_max, it does not necessarily need to be fixed in the release branch.