Floating-point exception - erroneous arithmetic operation

Hello,
When I add reactions on Linux, it builds solver successfully and runs with the following errors. But I didn’t meet the problem when I do the same thing on Windows.

BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
BFD: Dwarf Error: found dwarf version ‘5’, this reader only handles version 2, 3 and 4 information.
==== backtrace (tid: 23007) ====
0 0x0000000000050b35 ucs_debug_print_backtrace() ???:0
1 0x00000000000948b8 usr_MOD_calc_k21_hikita() ???:0
2 0x000000000009ab30 usr_rates
() ???:0
3 0x000000000029ed89 rrates0
() ???:0
4 0x00000000000baa7c __calc_coeff_mod_MOD_calc_rrate() ???:0
5 0x00000000000bacba __calc_coeff_mod_MOD_calc_coeff_all() ???:0
6 0x0000000000320176 _step_MOD_time_step_init() ???:0
7 0x0000000000269426 run_mfix
() ???:0
8 0x00000000000832b5 __main_MOD_run_mfix0() ???:0
9 0x0000000000076fcd f2py_rout_mfixsolver_main_run_mfix0() mfixsolvermodule.c:0
10 0x000000000017f88c _PyObject_FastCallKeywords() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:199
11 0x00000000001802d1 call_function() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:4619
12 0x00000000001c7602 _PyEval_EvalFrameDefault() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:3093
13 0x0000000000138d17 PyEval_EvalFrameEx() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:547
14 0x0000000000138d17 _PyFunction_FastCallKeywords() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:408
15 0x00000000001800c5 call_function() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:4616
16 0x00000000001c3381 _PyEval_EvalFrameDefault() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:3110
17 0x0000000000138d17 PyEval_EvalFrameEx() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:547
18 0x0000000000138d17 _PyFunction_FastCallKeywords() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:408
19 0x00000000001800c5 call_function() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:4616
20 0x00000000001c3381 _PyEval_EvalFrameDefault() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:3110
21 0x000000000011a0a6 PyEval_EvalFrameEx() /tmp/build/80754af9/python_1627392990942/work/Python/ceval.c:547
22 0x000000000011a0a6 _PyFunction_FastCallDict() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:322
23 0x000000000011a0a6 _PyObject_FastCallDict() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:98
24 0x000000000012f041 _PyObject_Call_Prepend() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:906
25 0x000000000012f041 method_call() /tmp/build/80754af9/python_1627392990942/work/Objects/classobject.c:309
26 0x000000000011a7b6 PyObject_Call() /tmp/build/80754af9/python_1627392990942/work/Objects/call.c:245
27 0x0000000000221a23 t_bootstrap() /tmp/build/80754af9/python_1627392990942/work/Modules/_threadmodule.c:994
28 0x00000000001daa77 pythread_wrapper() /tmp/build/80754af9/python_1627392990942/work/Python/thread_pthread.h:174
29 0x0000000000007dd5 start_thread() pthread_create.c:0
30 0x00000000000fdead __clone() ???:0

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

Backtrace for this error:
** Something went wrong while running addr2line. **
** Falling back to a simpler backtrace scheme. **
#29 0x7fc5274972d2
#30 0x7fc527497a0e
#31 0x7fc57b5605cf
#32 0x7fc527ffc8b8
#33 0x7fc528002b2f
#34 0x7fc528206d88
#35 0x7fc528022a7b
#36 0x7fc528022cb9
#37 0x7fc528288175
#38 0x7fc5281d1425
#39 0x7fc527feb2b4
#40 0x7fc527fdefcc
#41 0x5620e9e5f88b
#42 0x5620e9e602d0
#43 0x5620e9ea7601
#44 0x5620e9e18d16
#45 0x5620e9e600c4
#46 0x5620e9ea3380
#47 0x5620e9e18d16
#48 0x5620e9e600c4
#49 0x5620e9ea3380
#50 0x5620e9dfa0a5
#51 0x5620e9e0f040
#52 0x5620e9dfa7b5
#53 0x5620e9f01a22
#54 0x5620e9ebaa76
#55 0x7fc57b558dd4
#56 0x7fc57b281eac
#57 0xffffffffffffffff
/ncsfs02/bychen/case/cokedrum/mfixsolver: line 3: 22997 Floating point exception(core dumped) env LD_PRELOAD=/opt/openmpi-4.1.2/lib/libmpi.so LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"/ncsfs02/bychen/anaconda3-5.3.0/envs/mfix-21.1.4/lib/libpython3.7m.so" PYTHONPATH="/ncsfs02/bychen/case/cokedrum":"":${PYTHONPATH:+:$PYTHONPATH} /ncsfs02/bychen/anaconda3-5.3.0/envs/mfix-21.1.4/bin/python3.7 -m mfixgui.pymfix “$@”

When I put a successful case from Windows into Linux, I get the following error:


Thanks for your help!
case 1.zip (4.1 MB)
case2.zip (5.4 MB)

Please try to build the solver in debug mode. This may point to the file and line number where the floating point exception occurs. Please explain the difference between case1 and case2 zip files so you can receive better support.

Hi jeff.
The number of reactions added to case1 and case2 are different. The reaction in case1 is the Reaction1 in case2, they both use the same method, but with different errors. The error in case1 is a floating point exception, and the error in case2 is the picture shown above. Both cases run on Windows without problems.
Thanks for your help!

For Case 1, you have a division by zero because the Cp is zero:

91  >>>>>#################################################################
  92 ERROR from read_database.f:154
  93 Error 1010: All Cp coefficients for high temperature range
  94 are zero for species: lRNH2
  95  <<<<<#################################################################

You should double check all species Cp and plot their temperature profile in the GUI. I would also recommend using the latest version of MFiX which has better data checks for zero Cps.

Case 2 failed for me with a division by zero because 'xTlis zero on line 525 ofusr_rates.f`

k21_rxn = calc_k21_hikita(xTl)

FPE occurs in calc_k21_hikita (usr_mod.f)

xTl is only set is cells where

IF (eps_liq > v_limiter) THEN

Please review the logic in usr_rates.f to make sure all quantities are defined when used.

1 Like