Project

General

Profile

Bug #2335

with Intel compiler, SIMD exp test fails in double+release

Added by Roland Schulz over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
core library
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

Both ICC 17.4 and 18.1 in double both for AVX2 and AVX512_KNL (AVX512 not tested)

[ RUN ] SimdMathTest.exp
../src/gromacs/simd/tests/simd_math.cpp:430: Failure
Failing SIMD math function ulp comparison between std::exp and exp
Requested ulp tolerance: 2048
Requested abs tolerance: 0
Denormals can be 0: false
Largest Ulp difference occurs for x=-708.39999999999998
Ref values: 2.2250738585072014e-308
SIMD values: 0
Ulp diff.: 4503599627370496

[ FAILED ] SimdMathTest.exp (4 ms)
[ RUN ] SimdMathTest.expUnsafe
../src/gromacs/simd/tests/simd_math.cpp:466: Failure
Failing SIMD math function ulp comparison between std::exp and exp<MathOptimization::Unsafe>
Requested ulp tolerance: 2048
Requested abs tolerance: 0
Denormals can be 0: false
Largest Ulp difference occurs for x=-708.39999999999998
Ref values: 2.2250738585072014e-308
SIMD values: 0
Ulp diff.: 4503599627370496

[ FAILED ] SimdMathTest.expUnsafe (1 ms)

Associated revisions

Revision 013509bf (diff)
Added by Roland Schulz over 1 year ago

Fix exp test for ICC in double

Fixes #2335

Change-Id: I5f688c64d59e8d2a23239fc945756bcc5130d15b

Revision 80dd3f5b (diff)
Added by Mark Abraham over 1 year ago

Update double-precision test configurations

These changes improve coverage of double precision, using more release
mode, particularly with latest gcc and icc, and using 128-bit SIMD,
which have been cases that were buggy recently. The other aspects of
the configurations that have been modified have been
non-critical. Where appropriate, brief rationales are recorded. This
resolves an old TODO item in the post-submit matrix.

Fixed a sign mismatch in initializing an OpenCL variable that didn't
need to be initialized.

Noted relevant new TODOs.

Refs #2300, #2325, #2326, #2334, #2335, #2336, #2337, #2338

Change-Id: I131fa1a6776d1e7809799c3f931a1fc8100fcdc9

Revision 5209a517 (diff)
Added by Erik Lindahl over 1 year ago

Avoid FTZ triggering simd test failures

For very small arguments on platforms without
FMA support, the Intel compiler's default
usage of flush-to-zero for denormal values can
lead to slight deviations. Since this is a
range we really don't care about, and non-FMA
platforms are anyway a thing of the past, just
avoid testing a very small range around that
threshold for non-FMA SIMD platforms.

Fixes #2335.

Change-Id: I7cfb14284e79534f114891ba4dcd1f1c7223faf3

Revision 1f2109b7 (diff)
Added by Szilárd Páll over 1 year ago

Tweak/enable icc 18 post-submit tests

SIMD was disabled due to #2335

Change-Id: Ia55742958cfbdfb75e96c8d2b0ba5620a57a6f56

History

#1 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2335.
Uploader: Roland Schulz ()
Change-Id: gromacs~release-2018~I5f688c64d59e8d2a23239fc945756bcc5130d15b
Gerrit URL: https://gerrit.gromacs.org/7301

#2 Updated by Roland Schulz over 1 year ago

  • Status changed from New to Fix uploaded

#3 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2335.
Uploader: Mark Abraham ()
Change-Id: gromacs~release-2018~I131fa1a6776d1e7809799c3f931a1fc8100fcdc9
Gerrit URL: https://gerrit.gromacs.org/7303

#4 Updated by Roland Schulz over 1 year ago

  • Status changed from Fix uploaded to Closed

#5 Updated by Mark Abraham over 1 year ago

  • Category set to core library
  • Status changed from Closed to Accepted
  • Target version set to 2018

On Jenkins, and my laptop, SimdMathTest.exp and SimdMathTest.expUnsafe both fail with icc-18+double+Release in identical ways at any of SSE2, SSE4.1, AVX_256 SIMD levels (others not tested):

$ (cd build-cmake-icc-double-sse2-release; ninja simd-test && bin/simd-test --gtest_filter=SimdMathTest.\*exp\*)
[1/6] Generating git version information
Note: Google Test filter = SimdMathTest.*exp*
[==========] Running 8 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 8 tests from SimdMathTest
[ RUN      ] SimdMathTest.exp2
[       OK ] SimdMathTest.exp2 (2 ms)
[ RUN      ] SimdMathTest.exp2Unsafe
[       OK ] SimdMathTest.exp2Unsafe (0 ms)
[ RUN      ] SimdMathTest.exp
../src/gromacs/simd/tests/simd_math.cpp:430: Failure
Failing SIMD math function ulp comparison between std::exp and exp
Requested ulp tolerance: 2048
Requested abs tolerance: 0
Denormals can be 0: false
Largest Ulp difference occurs for x=-708.0165199999999
Ref  values: 3.2533610857165567e-308
SIMD values: 4.4501477170144028e-308
Ulp diff.:   2422323109027496

../src/gromacs/simd/tests/simd_math.cpp:442: Failure
Failing SIMD math function ulp comparison between std::exp and exp
Requested ulp tolerance: 2048
Requested abs tolerance: 0
Denormals can be 0: true
Largest Ulp difference occurs for x=-708.30376999999999
Ref  values: 2.4410753078552403e-308
SIMD values: 0
Ulp diff.:   4940791428027376

[  FAILED  ] SimdMathTest.exp (2 ms)
[ RUN      ] SimdMathTest.expUnsafe
../src/gromacs/simd/tests/simd_math.cpp:466: Failure
Failing SIMD math function ulp comparison between std::exp and exp<MathOptimization::Unsafe>
Requested ulp tolerance: 2048
Requested abs tolerance: 0
Denormals can be 0: false
Largest Ulp difference occurs for x=-708.0165199999999
Ref  values: 3.2533610857165567e-308
SIMD values: 4.4501477170144028e-308
Ulp diff.:   2422323109027496

[  FAILED  ] SimdMathTest.expUnsafe (1 ms)
[ RUN      ] SimdMathTest.exp2SingleAccuracy
[       OK ] SimdMathTest.exp2SingleAccuracy (1 ms)
[ RUN      ] SimdMathTest.exp2SingleAccuracyUnsafe
[       OK ] SimdMathTest.exp2SingleAccuracyUnsafe (0 ms)
[ RUN      ] SimdMathTest.expSingleAccuracy
[       OK ] SimdMathTest.expSingleAccuracy (1 ms)
[ RUN      ] SimdMathTest.expSingleAccuracyUnsafe
[       OK ] SimdMathTest.expSingleAccuracyUnsafe (1 ms)
[----------] 8 tests from SimdMathTest (8 ms total)

[----------] Global test environment tear-down
[==========] 8 tests from 1 test case ran. (8 ms total)
[  PASSED  ] 6 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] SimdMathTest.exp
[  FAILED  ] SimdMathTest.expUnsafe

It's not clear to me where the point of weakness might occur, but ldexp is tested on a smaller range than these functions.

It's also unclear to me why Roland's earlier fix should have been effective, and what that means for this issue

#6 Updated by Mark Abraham over 1 year ago

  • Subject changed from Intel compiler exp test fails in double to with Intel compiler, SIMD exp test fails in double+release

#7 Updated by Roland Schulz over 1 year ago

The fix worked because the original problem was that values were clamped to 0. Now the problem is that value is wrong instead. So a slightly problem.

#8 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2335.
Uploader: Erik Lindahl ()
Change-Id: gromacs~release-2018~I7cfb14284e79534f114891ba4dcd1f1c7223faf3
Gerrit URL: https://gerrit.gromacs.org/7388

#9 Updated by Erik Lindahl over 1 year ago

  • Status changed from Accepted to Fix uploaded

#10 Updated by Erik Lindahl over 1 year ago

Two separate issues:

1) ICC enables flush-to-zero for denormals by default, which will cause errors for very small arguments without FMA support since some intermediate results might be denormal.

2) Roland patch altered the test ranges, but it should not have changed the denormal range to include part of the normal one - it's only in the denormal range that it is correct to flush to zero.

Fixed in change 7388.

#11 Updated by Erik Lindahl over 1 year ago

  • Status changed from Fix uploaded to Resolved

#12 Updated by Erik Lindahl over 1 year ago

  • Status changed from Resolved to Closed

#13 Updated by Gerrit Code Review Bot over 1 year ago

Gerrit received a related patchset '1' for Issue #2335.
Uploader: Szilárd Páll ()
Change-Id: gromacs~master~Ia55742958cfbdfb75e96c8d2b0ba5620a57a6f56
Gerrit URL: https://gerrit.gromacs.org/7721

Also available in: Atom PDF