Error when applying SEM - version 6.3

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Gen
Posts: 17
Joined: Sat Sep 05, 2020 7:39 am

Error when applying SEM - version 6.3

Post by Gen »

Dear Code_Saturne team,
Bonjour!

I'm using version 6.3 and I'm trying to simulate turbulent channel flow with SEM.

1) I modified cs_user_les_inflow-base.c to generate eddies for boundary faces of zone "Inlet".
2) Periodic boundaries and a momentum source term are used to maintain the circulation from output to input.

I succeeded with version 6.2 and I tried to restart from a RANS result but I failed. Then I decided to try it in version 6.3, but I could not even run LES simulation alone. I got the following error message:
SIGSEGV signal (forbidden memory area access) intercepted!

Call stack:
1: 0x7f1cf9905040 <+0x3f040> (libc.so.6)
2: 0x5612af3d225e <cs_user_les_inflow_update+0x1c> (cs_solver)
3: 0x7f1cfa48dacc <synthe_+0xd5> (libsaturne-6.3.so)
4: 0x7f1cf9df9f09 <condli_+0x9af> (libsaturne-6.3.so)
5: 0x7f1cfa0852ba <tridim_+0x6171> (libsaturne-6.3.so)
6: 0x7f1cf9d81cab <caltri_+0x3d1e> (libsaturne-6.3.so)
7: 0x7f1cfb751838 <+0x4838> (libcs_solver-6.3.so)
8: 0x7f1cfb751b26 <main+0x13e> (libcs_solver-6.3.so)
9: 0x7f1cf98e7bf7 <__libc_start_main+0xe7> (libc.so.6)
10: 0x5612af3d1c1a <_start+0x2a> (cs_solver)
End of stack
Could you please help me figure out my problem? Thank you in advance.

Veuillez trouver les fichers dans la piece joint.
Je vous remercie beaucoup!

Best regards,
Gen
Attachments
run_solver.log
(22.54 KiB) Downloaded 115 times
cs_user_les_inflow-base.c
(6.66 KiB) Downloaded 113 times
setup.xml
(7.74 KiB) Downloaded 100 times
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when applying SEM - version 6.3

Post by Yvan Fournier »

Hello,

A bug which seems similar to what you described wa reported and fixed a few days ago. It will be in the next 6.3.1 release, but if you fetch v6.3 from the GitHub repository, you will have the fixed version. Otherwise, I could indicate which file to patch (but getting it from Git is simpler).

Best regards,

Yvan
Gen
Posts: 17
Joined: Sat Sep 05, 2020 7:39 am

Re: Error when applying SEM - version 6.3

Post by Gen »

Hi Yvan,
Thanks very much! I tried to fetch it from git but I failed during installation. The first error I met is that "configure" file doesn't exist, so I changed the path to "configure.ac", but I still could not make it. According to trace back in terminal,
TypeError:join() argument must be str or bytes, not 'NoneType'
appears when "install_saturne.py" launched.
Traceback (most recent call last):
File "/home/Documents/code_saturne-6.3.0/install_saturne.py", line 1346, in <module>
setup.check_setup_file()
File "/home/Documents/code_saturne-6.3.0/install_saturne.py", line 720, in check_setup_file
self.setup_defaults()
File "/home/Documents/code_saturne-6.3.0/install_saturne.py", line 696, in setup_defaults
self.prefix = os.path.join(home, 'Code_Saturne', p.version)
File "/usr/lib/python3.6/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.6/genericpath.py", line 149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
I'm not sure how to fix it, so I will be grateful if you could tell me which file to patch.
Thanks again!

Best regards,
Gen
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when applying SEM - version 6.3

Post by Yvan Fournier »

Hello,

Do not rename configure.ac: when you get the code from Git, run "./sbin/bootstrap" inside the cloned directory.
You wil then have a generated "configure" file, and can proceed as usual.

If this does not work (i.e. if some tools are not installed on your system), I'll check which fiels are needed for a patch.

Best regards,

Yvan
Gen
Posts: 17
Joined: Sat Sep 05, 2020 7:39 am

Re: Error when applying SEM - version 6.3

Post by Gen »

Hi Yvan,
Thanks to your help, the installation problem has been solved.
But I still cannot run SEM successfully with the new version. Error obtained as shown below:
SIGFPE signal (floating point exception) intercepted!

Call stack:
1: 0x7fbda78b1040 <+0x3f040> (libc.so.6)
2: 0x7fbda844e754 <cs_les_synthetic_eddy_method+0x15f2> (libsaturne-7.1.so)
3: 0x7fbda844b15d <synthe_+0x87d> (libsaturne-7.1.so)
4: 0x7fbda7d9e2a1 <condli_+0xa72> (libsaturne-7.1.so)
5: 0x7fbda803175f <tridim_+0x6171> (libsaturne-7.1.so)
6: 0x7fbda7d25760 <caltri_+0x3d1e> (libsaturne-7.1.so)
7: 0x7fbda96aa898 <+0x4898> (libcs_solver-7.1.so)
8: 0x7fbda96aab8b <main+0x13e> (libcs_solver-7.1.so)
9: 0x7fbda7893bf7 <__libc_start_main+0xe7> (libc.so.6)
10: 0x556f1301dbba <_start+0x2a> (cs_solver)
End of stack
I suppose there might be something wrong with the subroutine cs_les_synthetic_eddy_method in cs_les_inflow?
Thanks again for your concern!

Bonne après-midi!
Gen
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when applying SEM - version 6.3

Post by Yvan Fournier »

Hello,

Do you have a small test case on which I could reproduce this ?

If not, is you build compiled in debug mode ? Or do you have such a build ? As you seem to be running the "master" branch, I assume you could generate one. If this is possible, we could check with a debugger exactly where the error occurs (I can walk you through f you are not familiar with a debugger).

On a simple test case provided by a colleague, I have no such crash, so it may be data-depedent.

So either a small test case on local debug should allow findinf and fixing this.

Best regards,

Yvan
Gen
Posts: 17
Joined: Sat Sep 05, 2020 7:39 am

Re: Error when applying SEM - version 6.3

Post by Gen »

Hi Yvan,

I've attached the relevant documents of my test case, including the setup file, the mesh, and the src file(The mesh file was compressed inside the zip file so as not to exceed the filesize of attachment). Thank you so much if you might reproduce my case.

I haven't used a debug mode and I'm not familiar with debugging tools. I notice that we have debugging tool options in GUI when we run a computation but I have no idea how to use it. And should I install other packages?

I would appreciate if you can give me any advice about how to find an error with debugging tools. I think that will be really helpful for my continuation.

Best regards,
Gen
Attachments
SEM_test.zip
(1.46 MiB) Downloaded 109 times
Yvan Fournier
Posts: 4079
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error when applying SEM - version 6.3

Post by Yvan Fournier »

Hello,

Yes, there is a setting in the GUI to call a debugger when running code_saturne. This does not handle parallel debuggers suh as TotalView or DDT yet, but works fine for gdb and a few gdb front-ends (with one window per MPI process).
Basically, setting "gdb" in the box will call gdb on all MPI ranks, and then you cna just type "continue". There is a lot of documentation and tutorials for gdb itself on the web.

In any case, relative to your case, we need to improve our code so as to exit earlier in cases such as this one, but the error is due to the fact that your "Inlet" selection is empty (the "Inlet" faces appear as interior faces on your mesh).

Best regards,

Yvan
Gen
Posts: 17
Joined: Sat Sep 05, 2020 7:39 am

Re: Error when applying SEM - version 6.3

Post by Gen »

Hi Yvan,

Thanks very much for your help!
In fact, I tried to apply periodic inlet-outlet boundary conditions to circulate the flow in a kind of "infinitely long" channel, and I added a source term to maintain the flow. Maybe this periodic condition turned the inlet into interior face, as a result it cannot be identified. I will try to find a new way to make it :)

Merci beaucoup et bon weekend!

Best regards,
Gen
Post Reply