problem k-omega sst

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
eliberge

Re: problem k-omega sst

Post by eliberge »

Hello,

I thought that the problem was solved with the 2.2.1 version but it wasn't.

It works with the LES turbulence model but not with the k-omega SST model.

I have tried to compile with the option --enable-debug. In this case the computation doesn't fail but it is very slow. Without the debug option, the following error is obtained :

** WALL DISTANCE
-------------

Min distance = 0.64600E-04 Max distance = 0.66626E+00

(Distance calculation done in 2600 iterations)

Signal SIGFPE (exception en virgule flottante) intercepté !

Pile d'appels :
1: 0x2ad9819df9e0 <+0x329e0> (libc.so.6)
2: 0x2ad9802cb327 <+0x146327> (libsvml.so)
3: 0x5d3d0f <> (cs_solver)
4: 0x4a5491 <> (cs_solver)
5: 0x42778c <> (cs_solver)
6: 0x422eb1 <> (cs_solver)
7: 0x2ad9819cbbc6 <__libc_start_main+0xe6> (libc.so.6)
8: 0x4224b9 <> (cs_solver)
Fin de la pile

The 2.2.1 and 2.3.1 versions have been tested with the same result. This error appears only with the installation on the PBS cluster.

Regards,

Erwan
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: problem k-omega sst

Post by Yvan Fournier »

Hello,

Are you using the same compiler on the cluster ? It is possible that in optimized code, several code paths may be executed simultaneously, including code which "should not be executed" and may lead to division by zero for example (this has been seen mainly on Itanium, but may occur with other agressive optimizing compilers).

In the beginning of src/apps/cs_solver.c (near lines 30-40), you could try to replace:

Code: Select all

#if defined(__linux__) || defined(__linux) || defined(linux)
#if    (!defined(__ia64__) && !defined(__blrts__) && !defined(__bg__)) \
    || defined(DEBUG)
#define _GNU_SOURCE
#endif
#endif
with

Code: Select all

#if defined(DEBUG)
#if defined(__linux__) || defined(__linux) || defined(linux)
#define _GNU_SOURCE
#endif
#endif
Then rebuild/reinstall the code (you can also add cs_solver.c to your user subroutines, but you will need to remove the

Code: Select all

  bindtextdomain(PACKAGE, LOCALDIR);
  textdomain(PACKAGE);
lines near the end of that file to compile correctly (you will loose the French translations in the C part of the code doing so, but this is probably not too important).

Regards,

Yvan
Post Reply