Page 1 of 1

Mapped inlet

Posted: Wed Oct 05, 2016 10:30 am
by andrea28
Hello,
Based on a previous post, I modified the subroutines to apply a b.c. according to a data file.
But I get the following error:
SIGSEGV signal (forbidden memory area access) intercepted!

Call stack:
1: 0x403dda <cs_cub_interpolate+0x1cda> (cs_solver)
2: 0x407cbb <cs_user_boundary_conditions_+0x1a4f> (cs_solver)
3: 0x7f20d700ed20 <tridim_+0x3640> (libsaturne.so.0)
4: 0x7f20d6eed1c6 <caltri_+0x3006> (libsaturne.so.0)
5: 0x7f20d6ec3e2e <cs_run+0x3fe> (libsaturne.so.0)
6: 0x7f20d6ec3922 <main+0x112> (libsaturne.so.0)
7: 0x7f20d4648b15 <__libc_start_main+0xf5> (libc.so.6)
8: 0x401b69 <> (cs_solver)
End of stack

As you can see from the listing file, the reading is done correctly, but when it tries to interpolate the data I get the error. Any hint?

Thanks for your time,

Andrea

Re: Mapped inlet

Posted: Wed Oct 05, 2016 10:31 am
by andrea28
Here is the listing file.

Re: Mapped inlet

Posted: Wed Oct 05, 2016 2:18 pm
by Yvan Fournier
Hello,

Could you post the whole case setup, preferably on a coarser mesh ?

Or better, if you are vaguely familiar with using a debugger, running the case (in serial mode, to keep things simpler) under gdb may help you get a bit more detail on which array access is causing problems (probably either a missing initialization or a wrong array, but easier to determine and fix using a debugger).

Regards,

Yvan

Re: Mapped inlet

Posted: Wed Oct 05, 2016 6:40 pm
by andrea28
For the debug, should I recompile the code in debug mode first?
In the meantime this is the case.

Re: Mapped inlet

Posted: Thu Oct 06, 2016 2:28 pm
by andrea28
Found it!
I forgot to declare the array for epsilon in the cs_user_modules.

Re: Mapped inlet

Posted: Thu Oct 06, 2016 9:04 pm
by Yvan Fournier
Hello,

Good. I had tried this case a few hours ago (offline), and saw under Valgrind that xglob was defined as size 260, while the first detected error was an access line 342 of splines.c of xglob(16900), where 16900 is 130*130. Si I'll let you check whether xglob should also be defined as 130*130.

Regards,

Yvan