Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5106 Discussions

Profiling Fortran code with VTune on Linux

Dny
Beginner
670 Views
Hello ,

I'm profiling a code in fortran 90 using VTune Performance Analyzer 9.1 for Linux* build 226 .

I have a file which has a subroutine (E.g. INNER_SUBROUTINE) defined inside another subroutine(E.g. OUTER_SUBROUTINE) and outer subroutine call to inner subroutine.
But when I goes down to function level in VTune it shows me different function name .

When I go down to see the source code vtune giving an error "Cannot open Source view data".

See the sample code below.

SUBROUTINE OUTER_SUBROUTINE(NM)
--------
--------
CALL INNER_SUBROUTINE (NM)
--------
--------

CONTAINS

SUBROUTINE INNER_SUBROUTINE (NM)
--------
--------
END SUBROUTINE INNER_SUBROUTINE

END SUBROUTINE OUTER_SUBROUTINE


Can you please tell me how I can drill down to source of hotspot function for fortran subroutine?

In VTune I see the function name which is formed by module name , outer subsroutine name and inner subroutine name (I observe that it has format __ ). It means we cant find same function name in any of my source files , so VTune giving me error of not able to view data .

Can you please guide me how should I compile (any specific flags to be used ) my application so that I can see the source code of hot spot function in VTune.
Thanking You,

Regards,
Dny
0 Kudos
4 Replies
Huseyin_A_Intel1
Employee
670 Views
Hi Dny,
VTune Performance Analyzer 9.1 supports analyzing and viewing the source code of Fortran applications/code.

Could you please let me know which compiler and compiler options you are currently using? Are you using -g in order to produce debug information?

Also if you are using high-level optimizations (e.g: -O2, -O3), does this problem still happen under VTune Analyzer when all optimizations are turned off (e.g: -O0 - inlining could be a problem)?

Few things to try out maybe

- How does nm show the symbol information?

- Does gdb (or idb) work on this binary as expected? Can you set breakpoints on the inner and outer subroutines and step appropriately?

Thanks
Levent

0 Kudos
Huseyin_A_Intel1
Employee
670 Views
Hi again,
I will also recommend you to check out the "About Symbol and Line Number Information" section in the VTune Analyzer help file for more information.

Thanks
Levent

0 Kudos
Dny
Beginner
670 Views
Quoting - Levent (Intel)
Hi Dny,
VTune Performance Analyzer 9.1 supports analyzing and viewing the source code of Fortran applications/code.

Could you please let me know which compiler and compiler options you are currently using? Are you using -g in order to produce debug information?

Also if you are using high-level optimizations (e.g: -O2, -O3), does this problem still happen under VTune Analyzer when all optimizations are turned off (e.g: -O0 - inlining could be a problem)?

Few things to try out maybe

- How does nm show the symbol information?

- Does gdb (or idb) work on this binary as expected? Can you set breakpoints on the inner and outer subroutines and step appropriately?

Thanks
Levent


Hello Sir,
Thanks for your reply.
I'm using icc 11.0.074 for Linux following compiler flags for building my application.
-g -O2 -xSSSE3 -ip -no-prec-div -opt-prefetch -parallel -static

I also observe that nm shows the same symbol information (function name) as VTune shows.

Thanking you,

Regards,
Digambar

0 Kudos
TimP
Honored Contributor III
670 Views
Quoting - Dny
I'm using icc 11.0.074 for Linux following compiler flags for building my application.
-g -O2 -xSSSE3 -ip -no-prec-div -opt-prefetch -parallel -static

As the previous reply said, it might be interesting to know whether you can step through the internal subroutine (if that is still the problem you are discussing) in a debugger, as another check on whether the debug symbol connections are satisfactory. Also, replacing -ip with -fno-inline-functions, and removing -parallel, might be interesting tests.
It still looks like you may have to submit a problem report with a reproducer, as chatting without specifics has its limitations.
0 Kudos
Reply