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

Vtune with Fortran for Windows

YertleTheTurtle
Beginner
589 Views
I am about to buy the Intel Fortran compiler for Windows, and downloaded a trial version of Vtune.

But I can't make Vtune work the way it says it will. How do you set things so that Vtune can find the Fortran source code? All I want is to simply see which subroutines and which lines of source code are using the most time. There are no threading issues. All I've managed to get Vtune to tell me is how much time my executable is spending relative to all the system stuff.

I've set various compiler switches, read all the Help and am no wiser and no further ahead. Does anyone know how to do this (before my evaluation time limit runs out)? Thanks.
0 Kudos
3 Replies
Peter_W_Intel
Employee
589 Views

Hi there!

I don't understand whatyou didmean of "But I can't make Vtune work the way it says it will"? Did you use sampling data collector, or call graph data collector, or both? Did you have any trouble to get results?

If you wantthat VTune Analyzercan find the Fortran source codeof hot functions, you have to build Fortran source with compiler switch, "/debug:full"; linker switches, "/DEBUG", "/FIXED:NO" (that is for call graph data collector required).

I have no problem to use both sampling collector and call graph collectorwith Intel Fortran compiler 11.0.72's example code, C:\Program Files\Intel\Compiler\11.0\072\fortran\Samples\Fortran\NQueens\NQueens-BtTree - argument is"12", I can see sampling results and call graph results, and no problem to narrow down tohotfunction named NQUEENS_ip_SOLVE, and its source lines.

Is it the problemdue toyour example code specific? I think that you can tryIntel Fortran compiler's example code first.

Regards, Peter

0 Kudos
YertleTheTurtle
Beginner
589 Views
Thank you - that was a good idea. For some reason, after I got Vtune working with nqueens, it started to work with my program too. By "work", I mean that when I view "Sampling results" and click on "SOurce", I can see each line of code and the clock count attached to it. Which is all I wanted. Previously all I got was a mesage sayingthat here were no symbols.

Since you belong to Intel, here is a comment:

My program creates a graphics window. Vtune seems to run each program for about 10 seconds, terminate it, and then restart. I guess that is to get estimates for a longer run. Anyway, my program creates a graphics window, and Vtune creates a dialogue box asking for permission to terminate the first run. This box is hidden behind my window so it can't be seen. All I see is nothing happening. Maybe you should put your dialog box with "Always on Top" priority.

Now for a question:
When my program does eventually run for the second time, it runs about 10x more slowly than usual.
Question: is everything scaled the same when this happens, so that the Vtune results for the second run will be (relatively) accurate between my lines of code?
0 Kudos
Peter_W_Intel
Employee
589 Views
Thanks for your detail description!

[I can see each line of code and the clock count attached to it. Which is all I wanted. Previously all I got was a mesage sayingthat here were no symbols.]
Since you already saw source line with annotated performance data, I guess it should be a symbol repository problem (you ever failed previous, it affects on second view) - Use Configure\Options\Directories\Symbol Repository\View Symbol Repository Files\Deleteassociated (or all) item(s); You also can go Explorer -VTune\global_data\ISM to delete old contents manually. You'd better create a new vtune project, collect data then find a module which has symbol info, in report.

[Vtune seems to run each program for about 10 seconds, terminate it, and then restart.]
The user can modify sampling duration, please right-click on your activity->select "Modify Activity..." to change duration (e.g. Youcan set a big number such as "3600", whem you terminate your app, sampling will stop)
Click on "Configure..." button to check if used "Don't Calibrate Sample After Value". Thus, sampling doesn't do calibration, run your application only one time.

[When my program does eventually run for the second time, it runs about 10x more slowly than usual.]
If Sample After Value (SAV) is a very small number, it will increase overhead because too many samples will be captured (interrupt interval is short). Please use reasonableSAV value, e.g SAVof CPU_CLK_UNHALTED.CORE = CPU Frequency / 1000.

Regards, Peter
0 Kudos
Reply