Skip to content

Intel/PGI compiler notes. #45

@rountree

Description

@rountree

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions