Welcome, Guest
Username: Password: Remember me

TOPIC: "Double free of corruption(out)" when using telapy to run TELEMAC-2D

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 11 months 4 days ago #43821

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
Hello, every one!

I hope this message finds you well. I've been using Telapy to interface with Telemac2d v8p4, which has been quite smooth. However, recently, I encountered an issue when switching to a new case study. The primary differences between the new and original cases are the increased number of point sources and the consideration of spatially distributed bottom friction coefficients and infiltration parameters. Unfortunately, I encountered the following error message before the computations began, making it challenging to identify the cause. I would appreciate any suggestions or insights that could help me address this issue.

WSY

MASTER PROCESSOR NUMBER            0  OF THE GROUP OF            1
 READ_CONFIG: FILE CONFIG NOT FOUND: CONFIG
 DEFAULTS VALUES OF LU AND LNG:            6  AND            2
 LISTING OF TELEMAC2D------------------------------------------------------------------------------

                TTTTT  EEEEE  L      EEEEE  M   M  AAAAA  CCCCC
                  T    E      L      E      MM MM  A   A  C    
                  T    EEE    L      EEE    M M M  AAAAA  C    
                  T    E      L      E      M   M  A   A  C    
                  T    EEEEE  LLLLL  EEEEE  M   M  A   A  CCCCC
                                                               
                        2D    VERSION V8P4   FORTRAN 2003       







                        ~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~     
                          ~                            ~       
                               \   '    o      '               
                               /\ o       \  o                 
                             >=)'>    '   /\ '                 
                               \/   \   >=)'>        ~         
                               /    /\    \/                   
                        ~         >=)'>   /     .              
                                    \/                   )     
                                    /                   (      
                                          ~          )   )     
                          }     ~              (    (   (      
                         {                      )    )   )     
                          }  }         .       (    (   (      
                         {  {               /^^^^^^^^^^^^      
                        ^^^^^^^^^\         /                   
                                  ^^^^^^^^^                    






 double free or corruption(out)
 
[job2:80580] *** Process received signal ***
[job2:80580] Signal: Aborted (6)
[job2:80580] Signal code:  (-6)
[job2:80580] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef10)[0x7f93e9c4af10]
[job2:80580] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f93e9c4ae87]
[job2:80580] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f93e9c4c7f1]
[job2:80580] [ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x89837)[0x7f93e9c95837]
[job2:80580] [ 4] /lib/x86_64-linux-gnu/libc.so.6(+0x908ba)[0x7f93e9c9c8ba]
[job2:80580] [ 5] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x53a)[0x7f93e9ca3e4a]
[job2:80580] [ 6] /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/builds/S10.gfortran.dyn/lib/libdamocles4api.so(damocle_+0x31d)[0x7f914e796bcd]
[job2:80580] [ 7] /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/builds/S10.gfortran.dyn/lib/libtelemac2d4api.so(lecdon_telemac2d_+0x4a2)[0x7f9150864ff2]
[job2:80580] [ 8] /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/builds/S10.gfortran.dyn/lib/libapi.so(__api_run_t2d_MOD_run_read_case_t2d_d+0x177)[0x7f914c9a1b07]
[job2:80580] [ 9] /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/builds/S10.gfortran.dyn/wrap_api/lib/_api.cpython-36m-x86_64-linux-gnu.so(+0x15e4b)[0x7f914cf18e4b]
[job2:80580] [10] python3(_PyObject_FastCallKeywords+0x19c)[0x5a9b9c]
[job2:80580] [11] python3[0x50a2c3]
[job2:80580] [12] python3(_PyEval_EvalFrameDefault+0x1226)[0x50ca96]
[job2:80580] [13] python3[0x507a64]
[job2:80580] [14] python3[0x509790]
[job2:80580] [15] python3[0x50a18d]
[job2:80580] [16] python3(_PyEval_EvalFrameDefault+0x444)[0x50bcb4]
[job2:80580] [17] python3[0x509459]
[job2:80580] [18] python3[0x50a18d]
[job2:80580] [19] python3(_PyEval_EvalFrameDefault+0x444)[0x50bcb4]
[job2:80580] [20] python3[0x507a64]
[job2:80580] [21] python3(PyEval_EvalCode+0x23)[0x50ab13]
[job2:80580] [22] python3[0x634ec2]
[job2:80580] [23] python3(PyRun_FileExFlags+0x97)[0x634f77]
[job2:80580] [24] python3(PyRun_SimpleFileExFlags+0x17f)[0x63872f]
[job2:80580] [25] python3(Py_Main+0x591)[0x6392d1]
[job2:80580] [26] python3(main+0xe0)[0x4b0db0]
[job2:80580] [27] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f93e9c2dc87]
[job2:80580] [28] python3(_start+0x2a)[0x5b23aa]
[job2:80580] *** End of error message ***
Attachments:
The administrator has disabled public write access.

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 10 months 4 weeks ago #43869

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
To further elaborate, in order to identify the issue, I ran the case using the Windows version of Telemac v8p4. I encountered the error 'Program received signal SIGSEGV: Segmentation fault - invalid memory reference.' Based on previous forum threads, it might be an issue with my subroutines. Therefore, I've attached the 'user_fortran' file, and I would greatly appreciate it if someone could assist in pinpointing the problem. (Given that 'user_nomvar_telemac2d.f' and 'bilan.f' were successfully used in previous cases, the problem is likely to reside within 'runoff_horton.f').
The administrator has disabled public write access.

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 10 months 2 weeks ago #43899

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
After conducting tests, it appears that the same issue persists even when disregarding the 'user fortran' options. It seems that the problem doesn't originate from the subroutines. However, I'm genuinely unable to pinpoint the problem and sincerely hope someone could offer some guidance.
The administrator has disabled public write access.

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 10 months 2 weeks ago #43913

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello,

As told a few tims, if a segmentation fault or a NaN (Not a Number) occurs, you should use a debug configuration with debug options to investigate.
See e.g. the S11.gfortran.debug configuration in the $HOMETEL/configs/systel.edf.cfg configuration file, in particular the flag fflags_debug_gfo for gfortran compiler.
fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow

It will show in which subroutine the issue/nan/segfault occurs, the first suspicious line and may help you to change something in your computation.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 10 months 2 weeks ago #43916

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
Thank you for your reply!

I previously tested it on the Windows auto-installed version. Now, I've checked my cfg file on the Linux version (attached). It seems to include debug settings. However, the additional error messages haven't provided me with insights into the root cause of the issue. I'm not sure if I might have misunderstood something.

Regards,
WSY
--------------------------------------------------------------------------
 MASTER PROCESSOR NUMBER            0  OF THE GROUP OF            1
 EXECUTABLE FILE: /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/examples/wenzhou/coupling_wenzhou_5s.cas_2024-01-08-02h53min36s/A.EXE
 LISTING OF TELEMAC2D------------------------------------------------------------------------------

                TTTTT  EEEEE  L      EEEEE  M   M  AAAAA  CCCCC
                  T    E      L      E      MM MM  A   A  C
                  T    EEE    L      EEE    M M M  AAAAA  C
                  T    E      L      E      M   M  A   A  C
                  T    EEEEE  LLLLL  EEEEE  M   M  A   A  CCCCC

                        2D    VERSION V8P4   FORTRAN 2003

                        ~^~^~^~^~^~^~^~^~^~^~^^~^~^~^~^~^~
                          ~                            ~
                               \   '    o      '
                               /\ o       \  o
                             >=)'>    '   /\ '
                               \/   \   >=)'>        ~
                               /    /\    \/
                        ~         >=)'>   /     .
                                    \/                   )
                                    /                   (
                                          ~          )   )
                          }     ~              (    (   (
                         {                      )    )   )
                          }  }         .       (    (   (
                         {  {               /^^^^^^^^^^^^
                        ^^^^^^^^^\         /
                                  ^^^^^^^^^


Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7f11630c82ed in ???
#1  0x7f11630c7503 in ???
#2  0x7f11625e8f0f in ???
#3  0x7f11636a345f in ???
#4  0x7f11636a6b7d in ???
#5  0x7f1166551d01 in ???
#6  0x7f1166479e86 in ???
#7  0x7f1166474b62 in ???
#8  0x7f11625cbc86 in ???
#9  0x559117e8c599 in ???
#10  0xffffffffffffffff in ???
===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   RANK 0 PID 22808 RUNNING AT job150min16g4cpu
=   KILLED BY SIGNAL: 11 (Segmentation fault)
===================================================================================
Traceback (most recent call last):
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/telemac2d.py", line 7, in <module>
    main('telemac2d')
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/runcode.py", line 288, in main
    run_study(cas_file, code_name, options)
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/execution/run_cas.py", line 169, in run_study
    run_local_cas(my_study, options)
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/execution/run_cas.py", line 65, in run_local_cas
    my_study.run(options)
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/execution/study.py", line 644, in run
    self.run_local()
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/execution/study.py", line 465, in run_local
    run_code(self.run_cmd, self.sortie_file)
  File "/opt/data/private/install/telemac/telemac-mascaret-v8p4r0/scripts/python3/execution/run.py", line 182, in run_code
    raise TelemacException('Fail to run\n'+exe)
utils.exceptions.TelemacException: Fail to run
mpirun -np 1 /opt/data/private/install/telemac/telemac-mascaret-v8p4r0/examples/wenzhou/coupling_wenzhou_5s.cas_2024-01-08-02h53min36s/out_user_fortran
Attachments:
The administrator has disabled public write access.

"Double free of corruption(out)" when using telapy to run TELEMAC-2D 10 months 1 week ago #43948

  • wsy9208
  • wsy9208's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Thank you received: 3
The issue has been resolved. Due to an excessive number of source points on my end, it was necessary to further increase the value of NMAX in declarations_special.F (the previous setting of 3000 led to errors). If anyone else encounters a similar issue, feel free to refer to this solution.
The administrator has disabled public write access.
The following user(s) said Thank You: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.