Floating point exception while loading model?

Bug/problem reports for any of the GYRE executables (gyre_ad, gyre_nad, etc)
Post Reply
mankovich
Posts: 5
Joined: Tue Jul 12, 2016 12:24 pm

Floating point exception while loading model?

Post by mankovich » Tue Jul 12, 2016 1:08 pm

Hi GYRE folks,

Has anyone run into a floating point exception trying to load a MESA model? I'm playing with some giant planet models using gyre_ad (4.4) and I've had success with pure H-He planets as well as H-He envelopes around inert cores. I'm attempting to take one such saved MESA model and stitch on a hydrostatic core of heavy elements using a separate equation of state, but gyre_ad fails during the initialization step.

These simple models have a density discontinuity at the boundary, so I might expect some interesting things when it comes to bracketing modes. The mesh plan I've chosen for the core is admittedly somewhat crude, so I might also need to take some care with the shooting grid, but in any case it's not yet clear to me why the model fails to get off the ground. I'd appreciate hearing anyone's thoughts.

Here's the terminal output (run with gdb for a little more information):

Code: Select all

gyre_ad [(4.4)]
===============

Compiler         : GCC version 4.9.3 20141212 (prerelease)
Compiler options : -isysroot / -I /Applications/mesasdk/include -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-tbm -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell -fPIC -mmacosx-version-min=10.11.5 -mno-avx -mno-bmi2 -O2 -ffpe-summary=none -finit-real=snan -ffpe-trap=invalid,overflow,zero -fbacktrace -fopenmp
OpenMP Threads   : 8
Input filename   : gyre_ad.in
GYRE_DIR         :                                                                                                                                                                                                                                                                 

Initialization
==============

Reading from MESA file water_core.GYRE
   Detected new-variant file
   Adding central point

Program received signal SIGFPE, Arithmetic exception.
0x00000001000dd2bc in __gyre_evol_model_MOD_evol_model_t_full_ ()
(gdb) s
Single stepping until exit from function __gyre_evol_model_MOD_evol_model_t_full_,
which has no line number information.

Program received signal SIGFPE: Floating-point exception - erroneous arithmetic operation.

Backtrace for this error:
#0  0x10067f502
#1  0x10067fcbe
#2  0x7fff9b7ba529
#3  0x1000dd2bc
#4  0x1000df847
#5  0x1000faa71
#6  0x10007c3b8
#7  0x1000014b6
#8  0x1001c7768

Program received signal SIGFPE, Arithmetic exception.
0x00000001000dd2bc in __gyre_evol_model_MOD_evol_model_t_full_ ()
(gdb) s
Single stepping until exit from function __gyre_evol_model_MOD_evol_model_t_full_,
which has no line number information.

Program terminated with signal SIGFPE, Arithmetic exception.
The program no longer exists.
cheers,
chris
Attachments
gyre_ad.in
(2.51 KiB) Downloaded 304 times
core.GYRE.tgz
(112.6 KiB) Downloaded 353 times
mesh_plan.png
mesh_plan.png (17.55 KiB) Viewed 3682 times

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Floating point exception while loading model?

Post by rhtownsend » Tue Jul 12, 2016 4:10 pm

Hi Chris --

The problem is that quite a few variables in your stellar model are set to zero throughout -- e.g., L_r, nabla, kappa. GYRE crashes when it attempts to evaluate the c_rad coefficient, because c_rad ~ 1/kappa.

You can either fix this by writing realistic values for the missing variables, or even dummy values if you're not planning on doing non-adiabatic calculations. Or, you might want to consider using the FGONG file format for your stellar models, which contain only basic structure data (no kappa, epsilon, etc.).

cheers,

Rich

mankovich
Posts: 5
Joined: Tue Jul 12, 2016 12:24 pm

Re: Floating point exception while loading model?

Post by mankovich » Wed Jul 13, 2016 9:02 am

Ah, it's always too obvious in retrospect. I didn't think I had to worry about kappa for the adiabatic calculation, but that makes perfect sense. Dummy values will get me by for now.

Can L_r==0 and gradT==0 generally be a problem?

Thanks!
chris

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Floating point exception while loading model?

Post by rhtownsend » Wed Jul 13, 2016 9:42 am

The kappa isn't used in the adiabatic calculation -- nor L_r or nabla. But MESA models fall into the class of 'models generally capable of being used in non-adiabatic calculations', and therefore GYRE expects kappa, L_r, etc to have meaningful values.

Post Reply