Closed bartgol closed 11 months ago
To be fair, EKAT_FPE is only used to get the default fpes. Any host app can define its own default fpes, or even never rely on default fpes, and always invoke enable_fpes
with an app-defined mask. So maybe this is not, per se, a bug in EKAT.
Ok, never mind. After trying the two approaches with SCREAM (either have ekat define default fpes, or have the app specify the fpes to enable), I decided this is not too bad.
EKAT_FPE is indeed never defined, so we should modify ekat so that we can build it with default fpes enabled. However, host apps can still manage to enable fpes, so this is lower priority now.
This macro was eliminated in #235. Closing.
Describe the bug The macro
EKAT_FPE
is never set, since the scriptEkatBuildEkat.cmake
is not setting the EKAT_FPE option (and not setting EKAT_FPE in the config.h file).To Reproduce It's easy to see it from SCREAM:
double n,d; n=d=0.0; std::cout << "nan: " << n/d << "\n";
test-all-scream -t fpe ...
ctest-build/debug_nopack_fpe/Testing/Temporary/LastTest.log
, and notice how the nan indeed happened.Expected behavior The EkatBuildEkat.cmake script honors cmake vars like
${PREFIX}_blah
(with PREFIX configurable; PREFIX=SCREAM for scream). But this cmake var is not handled, leaving the EKAT_FPE macro never defined.