Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intel/PGI compiler notes. #45

Open
rountree opened this issue Jun 23, 2022 · 0 comments
Open

Intel/PGI compiler notes. #45

rountree opened this issue Jun 23, 2022 · 0 comments

Comments

@rountree
Copy link

rountree commented Jun 23, 2022

Per Intel Compilers for Linux: Compatibility with GNU Compilers (page 6), Intel compilers prior to OneAPI would attempt to guess the version of of gcc on the system based on what was found in the ${PATH} environment variable and silently degrade its feature set to be compatible what that version of gcc.

This is almost certainly not a problem unless you happen to work in a certain US Department of Energy nuclear lab where the default version of gcc is still 4.9.3. If that's the case and you have the latest version of icc in your path, __builtin_[add|sub|mul]_overflow will not be defined and anything using math-safe.h fail to compile.

The workaround is to use -gcc-name=${PATH_TO_MORE_RECENT_GCC} during compilation.

Based on a much more cursory search, PGI compilers not not appear to implement the necessary builtins.

Happy to write this up as a PR for the readme if there's interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant