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

Vtune problems + Ifort+vs2019

Andrew_
Beginner
1,859 Views

Dear Colleagues,

I asked the following question in a forum dedicated to Vtune.

Q:Can you please tell me how to make it so that instead of references like func@0x140051b90
to output function names from source Fortran program? 

However, I was redirected to the compiler developers. 

Re: Vtune func@ problems +IFORT + Visual studio 2019 - Intel Communities

 

Please see the link above.

 

Thank you

0 Kudos
14 Replies
Steve_Lionel
Honored Contributor III
1,843 Views

Odd that they redirected you. Typically, you would need to do a build with debug information generated (requires both compile and link options to include debug info.) You can build with optimization, and clearly for Vtune you would probably want to, but note that inline expansion can muddle routine name information.

0 Kudos
Andrew_
Beginner
1,836 Views

Dear Steve,

 I have attached my project to the question (Vtune forum ) .

They looked at it. And they said the following:

Thank you for providing the reproducer. The attached .exe file doesn't have information about its .pdb in the IMAGE_DEBUG_TYPE_CODEVIEW debug directory. As a result, VTune doesn't try to find the .pdb. Help is needed from the Compiler team to understand why there is no reference to .pdb.

My compilation and linking parameters were as follows

/nologo /debug:full /O3 /Qaxcoffeelake /Qxcoffeelake /reentrancy:none /arch:AVX /Qoffload:none /tune:coffeelake /Qopenmp-offload- /Qopenmp-stubs interfaces /Qopt-report:5 /fpe:0 /module: "x64\Release\\" /object: "x64\Release\\" /Fd "x64\Release\vc160. pdb" /traceback /libs:static /threads /Qmkl:sequential /c

link

/OUT: "x64\Release\neumann_1d_msu.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE: "x64\Release\neumann_1d_msu.exe.intermediate.manifest" /MANIFESTUAC: "level='asInvoker' uiAccess='false'" /DEBUG /PDB: "d:\Disk\Parallel\fortran\2d_Extra_Laguerre_ALL\2d_Extra_Laguerre8\x64\Release\neumann_1d_msu. pdb" /MAP /MAPINFO:EXPORTS /SUBSYSTEM:CONSOLE /STACK:2000000000,2000000000 /IMPLIB: "d:\Disk\Parallel\fortran\2d_Extra_Laguerre_ALL\2d_Extra_Laguerre8\x64\Release\neumann_1d_msu.lib"

Why Vtune doesn't see pdb files?

I don't know what to do.  For a Linux system everything works fine.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,815 Views

Can you (attempt to) debug the Release version to see if the VS debugger locates the .pdb?

 

Also, your compiler options include:

 

   ... /object: "x64\Release\\" ...

 

Note the space following the :. (same with /module:) There should be no space there.

 

And, the compiler output is to either "." or "/object: "x64\Release\\"

 

Whereas the linker is specifying:

/OUT: "x64\Release\neumann_1d_msu.exe"

for output (also with space), and

/PDB: "d:\Disk\Parallel\fortran\2d_Extra_Laguerre_ALL\2d_Extra_Laguerre8\x64\Release\neumann_1d_msu. pdb"

for where the .pdb is to be written

 

I suggest you try:

    /PDB: "x64\Release\neumann_1d_msu. pdb"

 

Jim Dempsey

 

 

0 Kudos
Andrew_
Beginner
1,800 Views

Dear Jim,

 

There are no spaces there. They appeared for some reason when I copied/pasted the compilation parameters into the intel forum.
I attached a screenshot from my project. I also attached the vs2019 project(+vtune results) to my reply.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,780 Views

Does the MS VS debugger find the .pdb file?

 

A long time ago I had experienced a situation where VTune would not locate the .pdb file, this was in a multi-language build where the .pdp file(s) were not located in the "expected" folder. VTune does (did) have a procedure to specify additional locations and .pdb files.

 

I am unable to run VTune at this time (Windows Update broke it), but if you poke around in the tool bar and/or menus you should be able to locate it.

 

Jim Dempsey

0 Kudos
Barbara_P_Intel
Moderator
1,767 Views

What version of ifort and Vtune are you using?



0 Kudos
Andrew_
Beginner
1,755 Views

Hi Barbara,

 

I use the Intel® Fortran Compiler Classic 2021.5.0 [Intel(R) 64] (oneAPI 2022)

Intel Vtune Profiler 2022.0.0

0 Kudos
James_T_Intel
Moderator
1,722 Views

I am investigating the behavior. I have been able to reproduce it internally, and I am attempting to narrow down the exact cause of this issue. I have currently narrowed it to something related to /O2.


0 Kudos
Andrew_
Beginner
1,716 Views

Hi James!

Thank you for your attention to this problem.

I look forward to solving this problem.

So Vtune doesn't work correctly when optimizing, but neither does Inspector or Advisor.

 

0 Kudos
James_T_Intel
Moderator
1,645 Views

I apologize for the delayed update. We are still attempting to identify the exact root cause of the problem. However, the issue appears to be caused in part by the Visual Studio Manifest Tool. If you compile and link via command line and do not use the Manifest Tool, or change your Visual Studio project options to not embed the manifest, you should be able to get correct symbol resolution. To disable in Visual Studio, go to Project->Properties->Manifest Tool->Input and Output->Embed Manifest and set to "No".


0 Kudos
Andrew_
Beginner
1,625 Views

Hi James!

Thank you for your reply. The problem has been solved to some extent.

I can now run the Vtune in the Release mode.


I made a new experiment!

1. I created a new empty VS2019 project and added Fortran programs to it. Everything works correctly regardless of "Embed Manifest" = "Yes" or "No"!!!  I.e. for both "Yes" and "No", the Vtune displays procedure names correctly.

2. Then I delete the fortan program files and added files from another project. Now Vtune only works when "Embed Manifest " is set to "No".

Conclusion. Depending on which fortran program I compile, Vtune behaves differently. But the Vtune always works with Embed Manifest and set to=No.

I found a source of the error in the program text!!!

How this affects Vtune's behaviour I cannot explain.

Experiment:

I have attached a new project. Try to see the function name in Vtune for Embed Manifest=Yes in two cases.

In the first case comment out the twentieth line in the DFT_demon.f90 file. 

 !------------------------------------ Source of the errors--------------------

line 20: if (DFT_plan(n,id) .eq. 0) call dfftw_plan_dft_1d(DFT_plan(n,id),n,HH2,An2,FFTW_Backward,FFTW_exhaustive);

!----------------------------------------------------------------------------

If this line (20) is commented out, the function name in Vtune will be displayed correctly and the value of the Embed Manifest parameter has no meaning.

This module is not even called from the main program, but the presence of this line (the second case)  requires that Embed Manifest must be = "No". Otherwise the function name will not be shown correctly in Vtune.

 

The Vtune r000hs test corresponds that line 20 is   commented in DFT_demon.f90.

The Vtune r001hs test corresponds to line 20 being uncommented out in DFT_demon.f90.

I have attached the project, the Vtune results are attached.

 

 

I would be glad if you could explain what this is all about.

BR,

Andrew

 

 

 

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,608 Views

I cannot explain it.

Is there a ; at the end of line 20 as shown above?

Don't know it that would cause a quirk or not.

 

Jim Dempsey

0 Kudos
Andrew_
Beginner
1,596 Views

"Is there a ; at the end of line 20 as shown above?Yes, but it's allowed by the standard.

 

I think the reason is that the function in line 20, dfftw_plan_dft_1d, is a function from the Intel MKL library.

Apparently adding the MKL calls to a project causes the Vtune to work incorrectly with function name tables.

 

Andrew

 

0 Kudos
James_T_Intel
Moderator
1,549 Views

One additional point related to this. Are you able to use ifx instead of ifort? Using your simpler reproducer, compiling legendre_points.f90 and main.f90 with ifx was sufficient to keep the expected debug symbols.


0 Kudos
Reply