[gmx-developers] FP Exceptions
Roland Schulz
roland at utk.edu
Mon Oct 18 20:46:47 CEST 2010
Hi,
currently (at least with GCC/Linux not sure about other platforms/compilers)
floating point exceptions are ignored. I don't think this is a good idea.
If some error occurs which causes infinity (log(0),1/0) or nan (sqrt(-1))
the simulation won't necessarily crash immediately and than might crash with
one of the error that indicate a not equilibrated system. Thus the user
think the system setup is to blame not a software error. Or worse, it might
not crash at all (e.g. because the effect of the number is limited to some
maximum as is the case for the berendsen thermostat) but wrong numbers are
produced.
Thus I suggest to not ignore FP exceptions. With GCC this can be done by
adding
feenableexcept(FE_DIVBYZERO|FE_INVALID|FE_OVERFLOW);
Is there a reason not to have this enabled by default?
Roland
--
ORNL/UT Center for Molecular Biophysics cmb.ornl.gov
865-241-1537, ORNL PO BOX 2008 MS6309
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20101018/9a81b5f5/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list