Open sbryngelson opened 2 months ago
@okBrian https://www.godbolt.org/ I've been playing with this and have not had much success... it suggests visibly different assembly for the two compilers (though perhaps consistent across compiler versions)... even when using special compiler flags.
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.
and
Intel: They come from this document, https://www.intel.com/content/dam/develop/external/us/en/documents/pdf/fp-consistency-121918.pdf
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
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)
and from here https://gcc.gnu.org/wiki/FloatingPointMath
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)
and
and
and