-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
continuous-integrationContinuous integration (CI)Continuous integration (CI)enhancementNew feature or requestNew feature or request
Description
A --strict
build flag that passes compile options that enforce floating point consistency. This would be used for generating goldenfiles and on the runners.
These need to be documented for the relevant compilers. GCC, CCE, Intel, and NVHPC.
In practice, the compilers that seem to need many flags may actually not need so many, since one flag could automatically trigger the others.
- NVHPC: the relevant flags come from https://docs.nvidia.com/hpc-sdk/archive/20.9/pdf/hpc209ref.pdf (page 47)
The default is -Knoieee and the compiler does not provide special compilation semantics.
-K<flag>
ieee
Perform floating-point operations in strict conformance with the IEEE 754 standard.
Some optimizations are disabled, and on some systems a more accurate math library is
linked if -Kieee is used during the link step.
and
[no]fprelaxed[=option]
Perform certain floating point intrinsic functions using
relaxed precision.
- Intel: They come from this document, https://www.intel.com/content/dam/develop/external/us/en/documents/pdf/fp-consistency-121918.pdf
-fp-strict
- GNU: Here, it seems somewhat more confusing since they support so many architectures. But, since we would presumably only use this on x86-64 runners or builds, it should be OK. From
https://stackoverflow.com/questions/7295861/enabling-strict-floating-point-mode-in-gcc I gather
-ffloat-store
and from here https://docs.oracle.com/cd/E19059-01/stud.10/819-0492/3_options.html#75972 we have (update: this one doesn't work)
-fsimple=0
and from here https://gcc.gnu.org/wiki/FloatingPointMath
-frounding-math -fsignaling-nans
would have to add all these to be sure they all work on an x86 CPU for typical GNU compilers.
- CCE: Here we presumably are only testing on GPUs, so I'm not sure if these flags work or not on them (@abbotts would know what to pass). Documenting what I'm finding in their user guides (https://support.hpe.com/hpesc/public/docDisplay?docId=a00115296en_us&page=Fortran_Command-line_Options.html&docLocale=en_US)
-h flex_mp=intolerant
and
-hp0 -hfp0
and
-h vector0
and
-fp0
Metadata
Metadata
Assignees
Labels
continuous-integrationContinuous integration (CI)Continuous integration (CI)enhancementNew feature or requestNew feature or request