[aspect-devel] FPE doesn't work on some machines?

Shangxin Liu sxliu at vt.edu
Mon Feb 29 13:33:37 PST 2016


Hi;

This is to follow up Lev's previous message about FPE failure problem. My
initial thought is to run some tests in Debug mode with FPE to see whether
our new plugin has bugs. However, it always fails with floating point
errors. So I just ran the cookbook spherical shell prm file with the ASPECT
directly from git hub (I didn't modify anything). This even fails with the
FPE problem. I further use gdb to see where the code crashed, and got the
following backtrace same as Lev's:

Program received signal SIGFPE, Arithmetic exception.

0x00007fffda1f9cb0 in __mpn_lshift () from /lib64/libc.so.6

(gdb) bt

#0  0x00007fffda1f9cb0 in __mpn_lshift () from /lib64/libc.so.6

#1  0x00007fffda20253e in __printf_fp () from /lib64/libc.so.6

#2  0x00007fffda1fd8a0 in vfprintf () from /lib64/libc.so.6

#3  0x00007fffda227752 in vsnprintf () from /lib64/libc.so.6

#4  0x00007fffdaa0546e in std::__convert_from_v (__cloc=@0x7fffffff8398:
0x7fffda544ac0 <_nl_C_locobj>, __out=__out at entry=0x7fffffff8300 "",
__size=__size at entry=45,

    __fmt=__fmt at entry=0x7fffffff83a0 "%.*g") at
/opt/build/BUILD/gcc-4.7.2/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/c++locale.h:93

#5  0x00007fffdaa12cc8 in std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::_M_insert_float<double> (

    this=0x7fffdac83120 <(anonymous namespace)::num_put_c>, __s=...,
__io=..., __fill=32 ' ', __mod=__mod at entry=0 '\000',
__v=-1.7976931348623157e+308)

    at
/opt/build/BUILD/gcc-4.7.2/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:997

#6  0x00007fffdaa12f30 in std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::do_put (this=<optimized out>, __s=...,
__io=...,

    __fill=<optimized out>, __v=<optimized out>) at
/opt/build/BUILD/gcc-4.7.2/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/locale_facets.tcc:1144

#7  0x00007fffdaa17277 in std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::put (__v=-1.7976931348623157e+308,
__fill=<optimized out>,

    __io=..., __s=..., this=0x7fffdac83120 <(anonymous
namespace)::num_put_c>)

    at
/opt/build/BUILD/gcc-4.7.2/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/locale_facets.h:2398

#8  std::ostream::_M_insert<double> (this=0x7fffffff84f0,
__v=-1.7976931348623157e+308)

    at
/opt/build/BUILD/gcc-4.7.2/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:75

#9  0x00007ffff42e89b4 in dealii::Patterns::Double::description
(this=0x223ebc0) at
/home/shangxin/sources/dealii_new/dealii/source/base/parameter_handler.cc:291

#10 0x00007ffff42ef2ab in dealii::ParameterHandler::declare_entry
(this=0x7fffffff9d00, entry=..., default_value=..., pattern=...,
documentation=...)

    at
/home/shangxin/sources/dealii_new/dealii/source/base/parameter_handler.cc:1669

#11 0x000000000142d277 in aspect::Parameters<3>::declare_parameters
(prm=...) at
/home/shangxin/aspect_new_new_dealii/aspect/source/simulator/parameters.cc:89

#12 0x000000000143a55e in aspect::Simulator<3>::declare_parameters
(prm=...) at
/home/shangxin/aspect_new_new_dealii/aspect/source/simulator/parameters.cc:1302

#13 0x0000000001215a4b in main (argc=2, argv=0x7fffffffc398) at
/home/shangxin/aspect_new_new_dealii/aspect/source/main.cc:513


The 513 line of main.cc is

aspect::Simulator<3>::declare_parameters(prm);


Looks like the code crashes at starting reading the input parameters (Same
as Lev's).


I know that if I turn off the FPE when compiling ASPECT this problem can be
solved but this means I cannot use FPE on our machine to debug the code any
more.


So why FPE doesn't work in some machines? Is it related with the compiler
or something else?


Best,

Shangxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20160229/d5620920/attachment.html>


More information about the Aspect-devel mailing list