Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29249 Discussions

idbc fails to correctly read source code lines on large Fortran program

burnesrr
Beginner
701 Views
I have been trying to use idbc to step through a very large Fortran application. There are approximately 1 million lines of source code distributed across approximately 1000 source files. When I type "idbc " I see the message that indicates idbc has read the source files, but I cannot set any break points other than the very first line in the main source file.

As a sanity check I wrote a very small test program and was able to use idbc successfully on that. Both codes were compiled with the "-debug all" option.

Has anyone encountered this issue?

Sincerely,
Rick
0 Kudos
4 Replies
mecej4
Honored Contributor III
701 Views
A guess:

It is probable that the large application was built by compiling several groups of sources into .o files, followed by combining these .o files into libraries, with a final linking step, all under the control of make or other such build tool. If so, check if the linking step also specified "-debug all" .
0 Kudos
burnesrr
Beginner
701 Views
Hi mecej4,

You are right, the large application was in-fact compiled from several groups of sources into .o files. I had already checked to ensure all the source files were compiled using the "-debug all" option. This possible issue was one of the first things I checked for and it is not the case.

Sincerely,
Rick
0 Kudos
Ron_Green
Moderator
701 Views
No one else is reporting this issue.

What version of compiler or IDB are you using?

And are you able to view/list the source files? I wonder if it's an issue with the paths used to find all the source files (since I'm sure they are not all in the same directory).

Also, show the syntax you use to try to set a breakpoint in a particular function/subroutine from a source file outside of your main program.

ron
0 Kudos
burnesrr
Beginner
701 Views
Hi Ron,

I found one of the groups of source files were not using the "-debug all" flag, but rather were using optimization flags. Once I found that group I and changed the compile options I was then able to set breakpoints.

However, I am now seeing unusual behavior when stepping through the execution. For some reason lines of source are getting skipped and the lines of code that are getting skipped are not embedded within Fortran logic statements such as IF (...) THEN and ENDIF. The execution should proceed sequentially through the lines of source code. I even set breakpoints on those lines that are getting skipped and even then execution does not stop on those lines.

My suspicion is that memory is getting written over somewhere causing unexpected behavior of the executable but I am not positive that is the source of what is happening. I was wondering if anyone else has seen this happen and if so what was the cause?

I have recompiled the code with "-debug all -check all" to try and catch array bounds errors, etc. but that has not turned up anything during execution.

Sincerely,
Rick
0 Kudos
Reply