Welcome, Guest
Username: Password: Remember me

TOPIC: How to debug Telemac2D

How to debug Telemac2D 5 years 10 months ago #32652

  • nguyenblue
  • nguyenblue's Avatar
As I type:
break /home/.../v8p0r0/sources/telemac2d/lecdon_telemac2d.f:31
gdb echoes:
No source file named /home/.../v8p0r0/sources/telemac2d/lecdon_telemac2d.f.
Make breakpoint pending on future shared library load? (y or [n])

As run to breakpoint of lecdon_telemac2d_f, gdb supposes this file has no line, and gdb prints:
Single stepping until exit from function lecdon_telemac2d_,
which has no line number information.

About the error "which has no line number information", as far as I know, it is a bug of gdb.
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32653

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Could you post your updated systel.cfg ?
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32654

  • nguyenblue
  • nguyenblue's Avatar
Sure, here is my updated systel.edf.cfg

File Attachment:

File Name: systel.edf.cfg
File Size: 2 KB
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32655

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Ok i see the issue.
You need to copy the key fflags_gfo_debug: from the original systel.edf.cfg in yours otherwise it is empty.
So here you are not compiling with the debug options.
Because flags_gfo_debug is empty
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32656

  • nguyenblue
  • nguyenblue's Avatar
Sorry, did you mean fflags_debug_gfo instead of fflags_gfo_debug???
Because as I look at this file
svn.opentelemac.org/svn/opentelemac/tags...nfigs/systel.edf.cfg

I only see this configuration which has fflags, gfo and debug
#
# Gfortran info
#
fflags_gfo: -cpp -fconvert=big-endian -frecord-marker=4 -DHAVE_I16
fflags_debug_gfo: -g -Wall -fcheck=all -fbacktrace -fbounds-check -finit-integer=-1 -finit-real=nan -ffpe-trap=invalid,zero,overflow
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32662

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
This is the one.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32669

  • nguyenblue
  • nguyenblue's Avatar
Thank you yugi,
I put these lines into my file but it still doesn't work
After re-installing Telemac, I ran telemac2d.py t2d_gouttedo.cas, cancelled running program to take executable file and then ran gdb, I got this:


Screenshotfrom2019-01-2304-10-00.png

In the first picture, I already set breakpoint to lecdon_telemac2d_

Next I type "run" and gdb goes to the lecdon_telemac2d_. And you can see sentences "Single stepping until exit from function lecdon_telemac2d_, which has no line number information"

Screenshotfrom2019-01-2304-10-38.png


I also try to set breakpoint at source file but gdb can not find out it.

df.png


Is it normal for debugging in Ubuntu? I expect my gdb can debug like this user (he posted in here



2018-09-10_9-42-16.png
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32672

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
It is not normal something must still be wrong with your configuration.
Can you post your systel.cfg again ?
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32674

  • nguyenblue
  • nguyenblue's Avatar
Yes, this is my edited systel.cfg


File Attachment:

File Name: systel.cfg
File Size: 3 KB
The administrator has disabled public write access.

How to debug Telemac2D 5 years 10 months ago #32675

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Have a go with this one.
I update both created a hpc.debug and a gfortran.debug configuration.
That should do the trick.
By the way do you check which configuration you are running with ?
Do you set USETELCFG or add the option -c ?
Attachments:
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: Elodie09

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