Backtrace_SIGSEGV signal

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
C0st4s
Posts: 48
Joined: Fri May 11, 2018 12:21 pm

Backtrace_SIGSEGV signal

Post by C0st4s »

Hi,

Hope you are well.
What is the easiest way to trace the array that is causing SIGSEGV signal (forbidden memory area access) intercepted! in cs? I am writing some module routines and I am trying to find the root of the error.

Best regards,
Costas
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Backtrace_SIGSEGV signal

Post by Yvan Fournier »

Hello,

First, use a version compiled in debug mode.

Second, check backtraces (not always exploitable to the last line, but usually helpful).

Finally, run "cs_solver" under a debugger, such as gdb. Checking the code under Valgrind is highly recommended (note the GUI advanced run settings page helps you run under a debugger, so check it).

If you have not already done so, this usually saves you orders of magnitude in time. This is recommended even when the code seems to work, because "hidden errors" may come back to bite you later, and the earlier they are detected, the less time wasted...

Best regards,

Yvan
C0st4s
Posts: 48
Joined: Fri May 11, 2018 12:21 pm

Re: Backtrace_SIGSEGV signal

Post by C0st4s »

Dear Yvan,

Thanks a lot for the quick reply. I had a division by zero


Best regards,
Costas
Post Reply