Floating point error: erroneous arithmetic operation (3.0)

Bug/problem reports for any of the GYRE executables (gyre_ad, gyre_nad, etc)
Post Reply
User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Floating point error: erroneous arithmetic operation (3.0)

Post by warrick » Mon Mar 03, 2014 5:38 am

Rich,

I just tried running GYRE 3.0 on a model produced by MESA release 5995 and got the following error:

Code: Select all

gyre_ad [3.0]
=============

Compiler         : GCC version 4.9.0 20131223 (experimental)
Compiler options : -I /usr/users/wball/mesa/sdk/include -march=sandybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=20480 -mtune=sandybridge -mno-avx -mno-bmi2 -O2 -std=f2008 -ffpe-summary=none -finit-real=snan -ffpe-trap=invalid,overflow,zero -fbacktrace -fopenmp
OpenMP Threads   : 4
MPI Processors   : 1

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

Reading from FGONG file best.fgong
  Initial points : 2446
  File version   : 300

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

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

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

Backtrace for this error:

Backtrace for this error:

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

Backtrace for this error:

Backtrace for this error:
#0  0x2AAAAB20856F
#1  0x2AAAAB208B6E
#2  0x360403299F
#3  0x43AE92 in __core_spline_MOD_init_eval_derivs_
#0  0x2AAAAB20856F
#4  0x49A5EC in __gyre_model_evol_MOD_set_sp_
#1  0x2AAAAB208B6E
#5  0x49B980 in __gyre_model_evol_MOD_model_evol_t_mech_._omp_fn.3 at gyre_model_evol.f90:0
#0  #0  0x0x2AAAAB20856F2AAAAB20856F

#2  0x360403299F
#1  0x2AAAAB208B6E
#1  0x2AAAAB208B6E
#3  0x43AE92 in __core_spline_MOD_init_eval_derivs_
#6  0x2AAAAB520EA5
#2  0x360403299F
#2  0x360403299F
#4  0x49A5EC in __gyre_model_evol_MOD_set_sp_
#7  0x36044079D0
#3  #3  0x0x43AE9243AE92 in  in __core_spline_MOD_init_eval_derivs___core_spline_MOD_init_eval_derivs_

#5  0x49B980 in __gyre_model_evol_MOD_model_evol_t_mech_._omp_fn.3 at gyre_model_evol.f90:0
#6  0x2AAAAB520EA5
#8  0x36040E8B6C
#7  0x36044079D0
#4  #9  0x0x49A5ECFFFFFFFFFFFFFFFF in 
__gyre_model_evol_MOD_set_sp_#4  
0x#8  49A5EC0x in 36040E8B6C__gyre_model_evol_MOD_set_sp_

#9  0xFFFFFFFFFFFFFFFF
#5  0x49B980 in __gyre_model_evol_MOD_model_evol_t_mech_._omp_fn.3 at gyre_model_evol.f90:0
#5  0x49B980 in __gyre_model_evol_MOD_model_evol_t_mech_._omp_fn.3 at gyre_model_evol.f90:0
#6  0x2AAAAB520EA5
#6  0x2AAAAB51DD7E
#7  0x36044079D0
#8  0x36040E8B6C
#7  0x49DC86 in __gyre_model_evol_MOD_model_evol_t_mech_
#9  0xFFFFFFFFFFFFFFFF
#8  0x4289FE in __gyre_fgong_file_MOD_read_fgong_file
#9  0x421002 in __gyre_input_MOD_read_model
#10  0x4057B4 in MAIN__ at gyre_ad.f90:0
FYI, the code doesn't always exit at this point. If it does, there's an extra line:

Code: Select all

Floating point exception
It looks like the error might be somewhere in reading the FGONG file, but it looked okay to me. Inlist and model are attached. I compiled using the latest stable SDK (December 2013).

W
Attachments
best.fgong
Model
(1.51 MiB) Downloaded 673 times
gyre_ad.in
Inlist
(2.98 KiB) Downloaded 487 times

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

Re: Floating point error: erroneous arithmetic operation (3.

Post by rhtownsend » Mon Mar 03, 2014 10:03 am

Hi Warrick --

It looks like the radius data are not strictly monotonic-increasing; the last two radius values are identical.

A quick fix is to prune the outer point by hand-editing the model file. But longer term, we need either to stop MESA producing such models, or we need to come up with a standard approach to dealing with duplicate radius points. Any thoughts?

cheers,

Rich

User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Re: Floating point error: erroneous arithmetic operation (3.

Post by warrick » Tue Mar 04, 2014 1:24 am

Aha. I'll do the manual prune for now. Thanks for spotting that!

As for the longer term question, is there a known reason why MESA produces models like this? If so, it might be enough to know to avoid whatever the offending setting is. Either way, I don't think it should be GYRE's problem to clean up the stellar model. I can imagine duplicate points causing problems in other circumstances too, so I personally think it should be the work of the evolution code.

W

Post Reply