Mapped inlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
andrea28
Posts: 41
Joined: Fri Apr 15, 2016 7:25 pm

Mapped inlet

Post 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
Attachments
Inlet.txt
(11.46 KiB) Downloaded 190 times
cs_user_modules.f90
(5.4 KiB) Downloaded 222 times
cs_user_boundary_conditions.f90
(12.45 KiB) Downloaded 205 times
andrea28
Posts: 41
Joined: Fri Apr 15, 2016 7:25 pm

Re: Mapped inlet

Post by andrea28 »

Here is the listing file.
Attachments
listing.txt
(33.64 KiB) Downloaded 197 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mapped inlet

Post 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
andrea28
Posts: 41
Joined: Fri Apr 15, 2016 7:25 pm

Re: Mapped inlet

Post by andrea28 »

For the debug, should I recompile the code in debug mode first?
In the meantime this is the case.
Attachments
mesh.rar
(9.5 MiB) Downloaded 203 times
CASE.rar
(355.66 KiB) Downloaded 196 times
andrea28
Posts: 41
Joined: Fri Apr 15, 2016 7:25 pm

Re: Mapped inlet

Post by andrea28 »

Found it!
I forgot to declare the array for epsilon in the cs_user_modules.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Mapped inlet

Post 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
Post Reply