Where has the "traceback" gone?

Where has the "traceback" gone?

Dear all,

I'm always using the "-traceback" option, so I can see immediately where to look for errors in my source file (because the number of the offending line in the source file is shown). Now I'm using IVF11.1.065 and, although the option is still on, line numbers are no longere present in the error message. Does anyone have a suggestion as to how to have these line numbers back in the error message? (I cannot look in the help files; seee my other post to this forum.)

25 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

According to the manual, when /traceback is included, then:
===============

On Windows systems, the linker places the traceback information in the executable image, in a section named ".trace". To see which sections are in an image, use the command:

link -dump -summary your_app_name.exe

To see more detailed information, use the command:

link -dump -headers your_app_name.exe

On Windows systems, when requesting traceback, you must set Enable Incremental Linking in the VS .NET* IDE Linker Options to No.
==================
When I try this with my apps, I am getting in the detailed list that the count of line numbers in the image is zero.

I think this means that /traceback is broken.

David

I am puzzled by "... /traceback is broken". Although the number of line numbers entry in the section header for the .trace section shows zero, I have no trouble generating good tracebacks.

With the test program

program tback
real :: x
integer :: i
do i=1,10
  x=i-5
  write(*,*)i,1.0/x
end do
end program tback

I compile with the command

ifort /traceback /fpe0 tback.f90

and run, getting the traceback

           1 -0.2500000
           2 -0.3333333
           3 -0.5000000
           4  -1.000000
forrtl: error (65): floating invalid
Image              PC        Routine            Line        Source
tback.exe          00401092  _MAIN__                     6  tback.f90
tback.exe          00401A73  Unknown               Unknown  Unknown
tback.exe          00401251  Unknown               Unknown  Unknown
kernel32.dll       7C817077  Unknown               Unknown  Unknown

This was done with the w_cprof_p_11.1.065 compiler.

If a program was built out of several objects and libraries, some of which were not compiled with /traceback, understandably on sees Unknown for the Routine, Line and Source entries in the traceback, as we can see even in my trivial example.

Can the original poster post a test case that demonstrates the lack of traceback (including command line). One thing to note is you must have the debugger option on (i.e. /Zi) to see the line number information with traceback.

------

Wendy

Attaching or including files in a post

Wendy,

This was certainly not the previous behaviour. I could distribute Release applications to my customers which would give a traceback on a runtime error, complete with routine name and line number. I thought there was an option to include the linenumber map in the executable, but not full debugging info.

David

David,

Just double checked and your right for Fortran it will do the PC to line number correspondence just with /traceback (not for C++).

There are some other options which disable traceback, here is the note from the documentation.

"On Windows systems, when requesting traceback, you must set Enable Incremental Linking in the VS .NET* IDE Linker Options to No. On systems using IA-32 architecture and Intel 64 architecture, you must also set Omit Frame Pointers (the /Oy option) in the Optimization Options to "No.""

------

Wendy

Attaching or including files in a post

Wendy,

Is there anything else that needs to be set? I tried forcing a zero divide in my application, and instead of getting a traceback, I only get a dialog asking if I want to open an instance of VS to debug - even when I run the application outside of VS. This is not the behaviour that I was aware of 1-2 years ago. Even adding
/debug:minimal does not change this behaviour.

All options from the compile are:

/nologo /Oy- /Qopenmp /warn:declarations /warn:unused
/module:"..\..\..\Modules\Release" /object:"..\..\..\Intermed\Release/"
/traceback /check:bounds /check:uninit /check:format /libs:static /threads /c

And for the link:

/OUT:"..\..\..\Executable\Release/Yieldmod.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTFILE:"C:\Dev\Executable\Release\Yieldmod.exe.intermediate.manifest"
/SUBSYSTEM:WINDOWS /OPT:NOWIN98 /FIXED:NO
/IMPLIB:"C:\Dev\Executable\Release\Yieldmod.lib" version.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\..\Libraries\realwin.lib ..\..\..\Libraries\htmlhelp.lib

Thanks,

David

Dear Wendy,

I tried to do this, but I cannot "reproduce" the lacking line numbers in a test program: the line numbers are just there. I added the "incremental:no" linker option; maybe that explains why all seems to be well now. (The missing line numbers "appeared" when an integer overflow occurred; with earlier IVF versions the line numbers were there.) So, for the time being, I leave this thread. Thank you for taking interest.

Wendy,

In a simple console program, I can now reproduce the line number traceback (added /fpe:0). However, I cannot get this to work for a full windows program. I simply get the Microsoft "*.exe has encountered a problem and needs to close. We are sorry for the inconvenience". On my development machine, instead, I get the dialog asking whether I want to start VS to debug the application. On neither machine can I get the Fortran dialog with the traceback info.

any ideas?

Thanks,

David

David,

I tried to reproduce this with the quick win sample that ships with the product and I get two windows (one that gives the traceback and one that gives the dialog asking if I want VS to debug). Can I get a zipped up solution that demonstrates the lack of traceback.

Also traceback only works if the divide by zero is in the Fortran part of the code.

------

Wendy

Attaching or including files in a post

Wendy,

Here is the standard WinApp, with added lines to force a failure. I only get the "do you want to debug" dialog.

This in under WinXP SP3 / VS2005 / IVF 11.1.065

thanks,

David

David,

Thanks I can reproduce from your test case and I am reporting it to engineering. I will update this thread if I have any additional information (I am asking for a workaround) and/or a compiler that fixes the problem.

------

Wendy

Attaching or including files in a post

Hello,
I am using Fortran Composer XE 2011 Update 6 and am also having problems with the traceback not producing a routine name or line number where a problem occurs. Has this been fixed or am I doing something wrong?

The compiler settings look like:
/Qdiag-disable:8290,8291,10155,10212,7334,7373,7025,7028,7372,6919,7416 /warn:noalignments
/real_size:64 /Qsave /align:rec1byte /fp:precise /iface:cvf /module:"Debug\Intermediate/"
/object:"Debug\Intermediate/" /Fd"Debug\Intermediate\vc100.pdb" /traceback /check:pointer
/check:bounds /check:uninit /check:format /check:output_conversion /libs:dll /threads /dbglibs /c

The linker settings look like:
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"Debug/t126gridv2.pdb" /MAP:"Debug\Intermediate/t126gridv2.map"
/SUBSYSTEM:WINDOWS /IMPLIB:"Debug/t126gridv2.lib" /DLL kernel32.lib Shared_Modules.lib

Thank you.

Bill

Bill, I know of an open issue when /libs:dll /threads is used. It is fixed for a future major release, but at present is not planned to be included in an update.

Retired 12/31/2016

The test case this was reported (DPD200112353)is fixed in our next major release of the compiler due out next year. It is related to use of the -check command with -traceback.

------

Wendy

Attaching or including files in a post

Thanks Wendy and Steve.

Bill

Indeed, the problem with the missing traceback information in Intel Visual Fortran Compiler XE 12.1.0.233 has been driving me crazy for a few past days. I have been trying different settings with little success. What I found was that traceback can onlybe generated for Null pointers, when other checks are off. But it is not what I need. What I would like to have is the same as in the previous versions during many years: in the Debug configuration maximum runtime checks should be on andan exception should produce a clear tracebackinformation. But here Iam not only missing the normaltraceback. On an exception I get an annoying window "Debug assertion failed" with a reference to ...winsig.c, line: 419 ("Invalid signal or error", 0), ... see Visual C++ documentation on asserts, Abort, Retry, Ignore. Thissort of behavioris the same on three different computers, which makes me think that something is really wrong with theFortran compiler. Just try a simple program:

Program Test

Real, Allocatable :: X(:)

Write(*,*) 'Test started'

Allocate(X(100))

X(200) = 0.0

Write(*,*) 'Test finished'

End Program Test

And use the standard Debug configuration under Visual Studio 2008. Just for reference
Fortran compilersettings:
/nologo /debug:full /Od /warn:interfaces /module:"Debug\" /object:"Debug\" /Fd"Debug\vc90.pdb" /check:all /libs:static /threads /dbglibs /c
Linker settiong:
/OUT:"Debug\Test.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"D:\VS2008\Test\Test\Debug\Test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\VS2008\Test\Test\Debug\Test.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"D:\VS2008\Test\Test\Debug\Test.lib"

But do I correctly understood that the problem is known but is not going to be fixed in the nearest future, not until the next year? If so, it is too bad.

Michael

I would like to make sure that I understand this issue correctly, because I am having some problems understanding and using /traceback too. I am using Composer XE 12.1.0.233 and I am creating a 64-bit application.

If I enable /traceback in Visual Studio (2008) I am told to disable incremental linking in Linker General options and to disable omitting frame pointers. However, I cannot find the latter parameter in Fortran Optimization options as both Visual Studio's project configuration dialog and help on /traceback suggest.

If I add /Oy- to compiler additional options, I get a message that /Oy- is not supported. Help on /traceback claims /traceback sets the /Oy- option (automatically?) and there is also information (just few lines below) that /Oy- should be set in Optimization Options.

What am I doing wrong that I don't see the Omit Frame Pointers option? Is there a way to make /traceback work provided that my compiler options are
/nologo /fpp /fixed /extend_source:132 /Qopenmp /fpscomp:general /warn:declarations /warn:unused /warn:truncated_source /warn:interfaces /assume:byterecl /module:"x64\Release\" /object:"x64\Release\" /Fd"x64\Release\vc90.pdb" /traceback /libs:static /threads /c /align:all /heap-arrays
and my linker options are

/OUT:"x64\Release\MyApp.exe" /INCREMENTAL:NO /NOLOGO /DELAYLOAD:"Delay.dll" /MANIFEST /MANIFESTFILE:"...\MyApp.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /STACK:100000000 /IMPLIB:"...\MyApp.lib" delayimp.lib .\DLL\x64\Delay.lib

Or do my options imply that I am running into any open issues to be resolved in a future release of Composer?

Traceback should "just work" without the need to set additional options. Are you using the project property to set traceback or adding it under Command Line?

I see "Omit Frame Pointers" as a property on the Optimization page, fourth line. "No" is the default in a Debug configuration.

Retired 12/31/2016

I am using project properties to set /traceback in Fortran Run-time category. After I enable traceback information, I get a message that "Traceback functionality does not work when the Omit Frame Pointers optimization is set to Yes in Fortran Optimization category or when Enable Incremental Linking is set to Default or Yes in the Linker general category".

When I switch to Fortran Optimization category, I see following items: Optimization, Inline Function Expansion, Favor Size or Speed, Loop Unroll Count, Parallelization, Threshold for Auto-Parallelization, Threshold for Vectorization, Prefetch Insertion, I/O Buffering, Heap Arrays, Interprocedural Optimization, Enable Matrix Multiply Library Call. These options are the same for Release and Debug configurations.

Ah, I see. The "Omit Frame Pointers" is a 32-bit only option.

Retired 12/31/2016

But maybe it will be possible to issue a sort of hotfix for the traceback problem? The tracebackfunction is very important for a developper.

This thread will be updated as soon as we have compiler that resolves the issue. Thanks for the feedback.

------

Wendy

Attaching or including files in a post

This is how this looks like for Intel Visual Fortran Compiler XE 12.1.1.258:

The fix for this issue was implemented in the version 13 compiler, That's a long time ago, sorry not to have posted at the time. I have  confirmed that /traceback works in conjunction with /check:all in the current version 15 and version 16 compilers. (/check:all causes optimization to be disabled if it's not already a debug build). /traceback itself, without /check, is designed to work also with optimization.

Leave a Comment

Please sign in to add a comment. Not a member? Join today