code-saturne / code_saturne

code_saturne public mirror
https://www.code-saturne.org
GNU General Public License v2.0
215 stars 80 forks source link

Cartesian mesh generation and restart from another mesh #98

Closed mathrack closed 1 year ago

mathrack commented 1 year ago

Hello,

I have the following error when using Cartesian mesh generation combined with a restart from another mesh :

SIGSEGV signal (forbidden memory area access) intercepted!

Call stack:
   1: 0x7f71081d0a6a <cs_mesh_cartesian_connectivity+0x2a> (libsaturne-7.0.so)
   2: 0x7f7107da1928 <cs_preprocessor_data_read_mesh+0x128> (libsaturne-7.0.so)
   3: 0x7f7107dc1148 <cs_restart_map_build+0xa8>      (libsaturne-7.0.so)
   4: 0x7f7107ccfcc5 <caltri_+0x15e6>                 (libsaturne-7.0.so)
   5: 0x7f7108db0b97 <main+0x717>                     (libcs_solver-7.0.so)
   6: 0x7f7108baf083 <__libc_start_main+0xf3>         (libc.so.6)
   7: 0x562e28c7d06e <_start+0x2e>                    (cs_solver)
End of stack

This problem does not appear if I use an existing mesh and a restart from another mesh.

This issue is present in the version 7.0 of the code.

mathrack commented 1 year ago

On the development version, the error file :


../../../src_trunk/src/mesh/cs_mesh_cartesian.c:122: Fatal error.

Error: Out of bound id.

Call stack:
   1: 0x7ffff7614add <bft_error+0xb5>                 (libsaturne-7.3.so)
   2: 0x7ffff6eb00b1 <+0x7c30b1>                      (libsaturne-7.3.so)
   3: 0x7ffff6eb1b19 <cs_mesh_cartesian_connectivity+0x2a> (libsaturne-7.3.so)
   4: 0x7ffff6982ced <cs_preprocessor_data_read_mesh+0x15d> (libsaturne-7.3.so)
   5: 0x7ffff69a6fd6 <cs_restart_map_build+0xcd>      (libsaturne-7.3.so)
   6: 0x7ffff67bbe7b <caltri_+0x260c>                 (libsaturne-7.3.so)
   7: 0x7ffff7fc316b <+0x516b>                        (libcs_solver-7.3.so)
   8: 0x7ffff7fc3475 <main+0x157>                     (libcs_solver-7.3.so)
   9: 0x7ffff5624083 <__libc_start_main+0xf3>         (libc.so.6)
  10: 0x40104e     <_start+0x2e>                    (cs_solver)
End of stack
YvanFournier commented 1 year ago

Hello,

Recent changes in the way Cartesian meshes are handled (following the possibility to combine multiple Cartesian meshes) should probably have fixed this issue in the master and v8.0 branches.

If you can test with those, I'll be happy for your feedback. Otherwise I'll test in the (hopefully near) future.

mathrack commented 1 year ago

I can reproduce the error with the version 7.0 but not with the version 8.0. I think the issue is fixed, at least with the versions 8.0 and above.