Repository navigation
Fix handling of std::isnan for IntelLLVM (icpx) with optimisations - #402
wdeconinck wants to merge 2 commits into
Conversation
d6dba26 to
96ca914
Compare
There was a problem hiding this comment.
Hi @wdeconinck I think this is great and a good safety net. It's tricky to test as things like std::isnan get optimised out and some logic can be rendered useless, so I wanted tests, in https://github.com/ecmwf/eckit/tree/fix/intel-isnan-tests. Have a look and port and/or cherry-pick?
I'm happily assuming we don't want to support the intel "classic" compilers (19?) (as opposed to the llvm newer ones)
…n being optimised away, IntelLLVM finite-math-only)
96ca914 to
bcfb944
Compare
|
@pmaciel I cherry-picked your extra test changes. |
We do want to test intel "classic" (ICC,ICPC,IFORT), at least version 2023.2 as well, as that is used in operations still. The new LLVM-based ones (ICX,ICPX,IFX) is what we will also need to support going forward. |
Description
IntelLLVM (
icpx) with optimisations automatically assumesstd::isnan(value) == falseThere are a number of files in eckit that check for
std::isnanand unit tests which can fail.This PR adds compilation flags for IntelLLVM:
-fno-finite-math-only: Standard override safe for 2021-2022 and 2025+-fhonor-nans: Plugs the optimization bypass gap specific to 2023.1 - 2024.2Contributor Declaration
By opening this pull request, I affirm the following:
🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-402