mei_evaluate.c:392: Fatal error.

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Claws
Posts: 10
Joined: Mon Mar 26, 2012 5:22 pm

mei_evaluate.c:392: Fatal error.

Post by Claws »

Im trying to run a natural convection simulation using CS 3.0.0 in CAELinux Live (so I can't install a new vers.)

If I use the following user law for density:

rho = 1.293 * (273.15 / TempC + 273.15);

Code_Saturne crashes with the following error:

Code: Select all

INSTANT    0.100000000E-02   TIME STEP NUMBER               1
 ============================================================= 




mei_evaluate.c:392: Fatal error.

Error: floating point exception



Call stack:
   1: 0x7fb17f27b9b2 <+0x5269b2>                      (libsaturne.so.0)
   2: 0x7fb17f27b8b0 <+0x5268b0>                      (libsaturne.so.0)
   3: 0x7fb17f27b64a <+0x52664a>                      (libsaturne.so.0)
   4: 0x7fb17f27b689 <+0x526689>                      (libsaturne.so.0)
   5: 0x7fb17f1d8ac5 <uiphyv_+0x18f5>                 (libsaturne.so.0)
   6: 0x7fb17eebcf9c <phyvar_+0x2fc>                  (libsaturne.so.0)
   7: 0x7fb17eeee95a <tridim_+0xd8a>                  (libsaturne.so.0)
   8: 0x7fb17edce834 <caltri_+0x30e0>                 (libsaturne.so.0)
   9: 0x7fb17eda5125 <cs_run+0xa35>                   (libsaturne.so.0)
  10: 0x7fb17eda460a <main+0x14a>                     (libsaturne.so.0)
  11: 0x7fb17e79976d <__libc_start_main+0xed>         (libc.so.6)
  12: 0x4006c9     <>                               (cs_solver)
End of stack
Without the user law, the simulation runs fine.

What is the problem here? The user law works fine on my workstation at home with vers. 3.2

Thanks

/C
Yvan Fournier
Posts: 4085
Joined: Mon Feb 20, 2012 3:25 pm

Re: mei_evaluate.c:392: Fatal error.

Post by Yvan Fournier »

Hello,

The fact that the crash is due to a floating point exception suggests that it might be due to incorrect (extreme) values of TempC rather than a bug in the MEI expression evaluation itself (either that, or the wrong type of error is reported).

Checking the NEWS file in the 3.0 branch, I didn't fint any specific fix between 3.0 and 3.0.4 (next release), but the fact that it occurs at the first time step indicates it might be related to initialization.

With a version you compiled yourself, I could suggest various debugging strategies (starting with upgrading to 3.0.3), but with a fixed, preinstalled (and, I assume production-rather-than-debug build), options are more limited. In case the bug is initialization-related, either using a user subroutine for initialization, or running a few time steps without the MEI expression than doing a restart with it.

Best regards,

Yvan
Claws
Posts: 10
Joined: Mon Mar 26, 2012 5:22 pm

Re: mei_evaluate.c:392: Fatal error.

Post by Claws »

Missing parentheses can lead to problems... :oops:

rho = 1.293 * (273 / (TempC+273))


I really wish CS was better at reporting errors :)

/C
Post Reply