Enable fp-exceptions
authorRoland Schulz <roland@utk.edu>
Mon, 28 Jul 2014 04:58:12 +0000 (00:58 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Mon, 5 Jan 2015 19:07:36 +0000 (20:07 +0100)
commitd197d2bc48e8b4abfa7fceb447be2be63ab34cf6
treeaecef1e5b140a3189bce3c3f228ecfc2bf69ea29
parent2f1658f22b75df5348b7eb7d0915f9d7e6225955
Enable fp-exceptions

This can help with finding errors quicker because mdrun crashes as soon
as a floating point value overflows or is invalid. fp-exceptions are
only enabled for builds with asserts (without NDEBUG), mainly because
it isn't always possible to avoid invalid fp operations for SIMD math
without a performance penalty.

Also, fix a few places where we had 1/0 or other invalid fp operations.

Fixes #1582

Change-Id: Ib1b3afc525706f4b171564fcaf08ebf3b2be3122
16 files changed:
CMakeLists.txt
cmake/gmxCFlags.cmake
src/config.h.cmakein
src/gromacs/commandline/cmdlinemodulemanager-impl.h
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/correlationfunctions/tests/expfit.cpp
src/gromacs/ewald/pme.c
src/gromacs/math/utilities.c
src/gromacs/math/utilities.h
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/nbnxn_search.c
src/gromacs/simd/simd_math.h
src/gromacs/simd/tests/simd_math.cpp
src/gromacs/timing/wallcycle.c
src/programs/mdrun/runner.cpp
src/testutils/testoptions.cpp