Error message

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Error message

Post by frpageot »

Hello,

I am running on kubuntu 12.04, and using Code_Saturne 3.0.0. I made simulation without any problems with this combination, but recently I was obliged to reinstall the computer after a crash, and take the opportunity to migrate all calculations to a second drive, using the first drive only for the system. Then U run CS on the first drive with the results file on the second drive. I mention this as I do not know if this is important or not. I tried to run my first simulation using this combination and i have this error message :

Signal SIGSEGV (accès à une zone mémoire interdite) intercepté !

Pile d'appels :
1: 0x7f9a1af2c3fc <csgfbr_+0x1c> (libsaturne.so.0)
2: 0x7f9a1af2d839 <getfbr_+0x20> (libsaturne.so.0)
3: 0x400d6c <cs_user_boundary_conditions_+0x1f8> (cs_solver)
4: 0x7f9a1afd6da1 <tridim_+0x2d61> (libsaturne.so.0)
5: 0x7f9a1aeb4b74 <caltri_+0x30e0> (libsaturne.so.0)
6: 0x7f9a1ae8b465 <cs_run+0xa35> (libsaturne.so.0)
7: 0x7f9a1ae8a94a <main+0x14a> (libsaturne.so.0)
8: 0x7f9a1a78776d <__libc_start_main+0xed> (libc.so.6)
9: 0x400ab9 <> (cs_solver)
Fin de la pile


I made a copy of the whole folder to the first drive to have CS and the result file on the same drive (this combination was operating fine before the crash) and I have the exact same error message. It seems that it does not come from the drive location. I may miss some libraries during reinstallation, but I cannot understand which ones. Can somebody help me ?

Many thanks in advance.
Fred
Xubuntu 16.04 / CS5.0
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error message

Post by Yvan Fournier »

Hello,

I am not sure I understand what changed in your installation. The crash seems to occur in the face selection for boundary conditions.

Are you using an XML file, the cs_user_boundary_conditions.f90 user file, or both ? Did your mesh change, or may you be using another version after the crash ?

If your case is not confidential, could you post your xml file (and/or cs_user_boundary_conditions.f90), and if it is small, your mesh ?

Otherwise, to understand the issue, a good solution would be to install a debug version of the code (--enable-debug option for the configure script, with a different --prefix option to allow side-by-side installs), so as to obtain a backtrace which, combined with the addr2line tool, would tell us exactly at which code line (and not just function) the crash occurs).

Regards,

Yvan
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: Error message

Post by frpageot »

Hello Yvan, thanks for your answer.

I installed (via the installer) and ran a debug version of saturne, and I have another line added to the error message :

Signal SIGSEGV (accès à une zone mémoire interdite) intercepté !

Pile d'appels :
1: 0x7fafbc90f4a0 <+0x364a0> (libc.so.6)
2: 0x7fafbd15daf2 <csgfbr_+0x92> (libsaturne.so.0)
3: 0x7fafbd15eb9e <getfbr_+0x40> (libsaturne.so.0)
4: 0x401386 <cs_user_boundary_conditions_+0x7b2> (cs_solver)
5: 0x7fafbd3549ce <tridim_+0x7d6e> (libsaturne.so.0)
6: 0x7fafbd039f7d <caltri_+0x63a1> (libsaturne.so.0)
7: 0x7fafbcffee35 <cs_run+0xda9> (libsaturne.so.0)
8: 0x7fafbcfff084 <main+0x15d> (libsaturne.so.0)
9: 0x7fafbc8fa76d <__libc_start_main+0xed> (libc.so.6)
10: 0x400b19 <> (cs_solver)
Fin de la pile

I am really not familiar with addr2line, where can I find this tool ? Once this is done I do not know what else to do with this debug version.

I would like to add that the crash I added has nothing to do with CS. I just took the opportinity to migrate everything wich is not system files on another physical drive. This is when reinstalling that I faced this problem.
Fred
Xubuntu 16.04 / CS5.0
guingo
Posts: 31
Joined: Wed Apr 04, 2012 2:52 pm

Re: Error message

Post by guingo »

Hello,

maybe I am mistaken, but I would have thought that addr2line would come with your linux distrib (basically installed in /usr/bin/addr2line, for instance) ? Anyway it should be quite easy to get the binary from the internet.

As you see in the call stack the last Code_Saturne function called is csgfbr (called by getfbr, itself called by cs_user_boundary_conditions, etc.). The new line you get refers to an internal function of the libc. What I would try is:

- put cs_selector.c in your SRC directory (since it contains the csgfbr function) so that it is taken into account in the compilation stage
and
- run the command

Code: Select all

addr2line 0x7fafbd15daf2 -e cs_solver 
in your run directory.
(The number in hexa being the address of the line in the csgfbr function)

You should get a line number in the cs_selector.c file.



Best regards,
Mathieu
frpageot
Posts: 85
Joined: Wed Mar 21, 2012 1:10 pm

Re: Error message

Post by frpageot »

Hello,

Thanks Mathieu. Off course this is embbeded in my linux distrib, but I was not aware of this and I didn't know how to use it. Thanks for your information I will now be able to use this.

yesterday I tried a lot of things, and apparently the problem comes from the meshing which was not correct. I don't you how this took place but the med files seemed to be corrupted during migration to the second drive, because I tried to launch a calculation on another med file that did not lead to errors. I remesh the geometry and the calculation went OK.

I am sorry for bethering you with this kind of problem, but this is because yvan talked about errors related to meshing that I tried this.

Thank you for your help.
Fred
Xubuntu 16.04 / CS5.0
Post Reply