You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhat confusingly, setting AMReX_FPE=ON in the CMake options turns on compiler-specific flags that are not always equivalent to setting the amrex.fpe_trap_* ParmParse parameters.
I think it would be more consistent to have AMReX_FPE change the defaults for the runtime parameters, so that the behavior is exactly consistent. Otherwise, the documentation (https://amrex-codes.github.io/amrex/docs_html/Debugging.html) should be changed to make it very clear that these two options are not equivalent.
The text was updated successfully, but these errors were encountered:
Somewhat confusingly, setting
AMReX_FPE=ON
in the CMake options turns on compiler-specific flags that are not always equivalent to setting theamrex.fpe_trap_*
ParmParse parameters.For instance, when using gcc,
AMReX_FPE=ON
adds-ftrapv
to the compile flags, which appears to only detect signed integer overflow (and also is broken in several gcc releases: https://blog.robertelder.org/gcc-signed-overflow-trapping-ftrapv-doesnt-work/)amrex/Tools/CMake/AMReXFlagsTargets.cmake
Line 137 in 39f46ae
Whereas the runtime options change the FPU state explicitly for specified FPU exceptions:
amrex/Src/Base/AMReX.cpp
Line 563 in 39f46ae
I think it would be more consistent to have AMReX_FPE change the defaults for the runtime parameters, so that the behavior is exactly consistent. Otherwise, the documentation (https://amrex-codes.github.io/amrex/docs_html/Debugging.html) should be changed to make it very clear that these two options are not equivalent.
The text was updated successfully, but these errors were encountered: