Disable FPE trapping when using unsafe maths.
Modern compilers (icx/gcc>11) optimize unsafe maths operations so that FPEs can be generated from SIMD instructions with padded vectors. This means that we cannot trap FPE signals when optimizing and get reliable alerts to issues.
This MR changes that so that we only offer FPE trapping when doing un-optimized builds. These are only enabled by default in the unit tests, so as long as we make sure to include one un-optimized build in the CI we are still checking for genuine FPEs. The SWIFT binaries use the -e flag, so that will abort most of the time with an error.
One wart is that the default optimization level of Intel compilers
is -O2
, not -O0
so we also need to make sure that debugging
is also enabled as that changes the default to -O0
.
Merge request reports
Activity
added Configuration Intel code health compilation discussion vectorization labels
assigned to @matthieu
Matthieu, been playing around with compiler options to try and get the Intel and GNU Jenkins tests to work and have come to the conclusion that we need to give way here and accept that optimized unsafe maths can no longer be relied on to not generate false FPEs. So we take the gain and move on with slightly less strong FPE checking I think.
mentioned in commit c1c3b962