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

Can Intel VTune Amplifier XE and VTune Performance Analyzer work like this?

Zhanghong_T_
Novice
459 Views

Dear administrator,

The Intel VTune Amplifier XE and VTune Performance Analyzer are really powerful tools to analyze and improve code, the hotspot detector and memory leakage checker help me greatly. I know that they can check problems for my whole program, at most time, however, I wish to check only the hotspot or memory leakage of some subroutine, can Intel VTune Amplifier XE and VTune Performance Analyzer do so? For example,

program test

...

call funA(a1, a2)

!!!!!!!!!!!!!!!!!!!!!!!!!!

$ begin VTune check

call funB(b1, b2)

$ end VTune check

!!!!!!!!!!!!!!!!!!!!!!!!!!

...

end program

Thanks,

Zhanghong Tang

0 Kudos
12 Replies
Peter_W_Intel
Employee
459 Views

Please read this article

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear. Dr. Wang,

I got it. Thank you very much.

Thanks,

Zhanghong Tang

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Thank you very much for your instruction. However, after I set the API function to the given location and test, the collected results still contains  too many unrelated locations (codes). I set the APIs as follows:

program main

CALL FORTRAN_ITT_PAUSE()
! unrelated code is here

CALL FORTRAN_ITT_RESUME()
! checked code is here

CALL FORTRAN_ITT_PAUSE()

end program

Did I miss anything?

Thanks,

Zhanghong Tang

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Further check I found that hotspots detecting is OK when I put the functions between "CALL FORTRAN_ITT_PAUSE" and "CALL FORTRAN_ITT_RESUME". However, the "CALL FORTRAN_ITT_PAUSE" and "CALL FORTRAN_ITT_RESUME" still don't work for memory problem checking. VTune always checks all memory problems no matter whether I put these two functions or not. Is there any other related API functions work for memory problem checking?

Thanks,

Zhanghong Tang

0 Kudos
Peter_W_Intel
Employee
459 Views

tangzhanghong98@yahoo.com wrote:

Dear Dr. Wang,

Further check I found that hotspots detecting is OK when I put the functions between "CALL FORTRAN_ITT_PAUSE" and "CALL FORTRAN_ITT_RESUME". However, the "CALL FORTRAN_ITT_PAUSE" and "CALL FORTRAN_ITT_RESUME" still don't work for memory problem checking. VTune always checks all memory problems no matter whether I put these two functions or not. Is there any other related API functions work for memory problem checking?

Thanks,

Zhanghong Tang

Pause / Resume API works for VTune(TM) Amplifier XE - hotspots collection.

These APIs don't work for memory error check - which is done in another product, Inspector XE

If you want to narrow down memory issues in your interset of code area, please read this article.

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Now I got it. Thank you very much.

Thanks,

Zhanghong Tang

0 Kudos
Zhanghong_T_
Novice
459 Views

Thanks again:)

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Sorry to bother you again.

Now I can set pause/resume to let the analyzer to locate some subroutine, however, the total run time is tens of times without doing analyse, even it only work for a very small subroutine. Furthermore, the memory usage is also increased very much before running to the watched subroutine. That would lead to the program can't be checked by VTune or Inspector beacuse of out of memory. Is there any method to let the VTune or Inspector really only work the subroutine I located by pause/resume, i.e., the memory usage and CPU time only increased when running that subroutine?

Thanks,

Zhanghong Tang

0 Kudos
Peter_W_Intel
Employee
459 Views

I supoose that you talked about using Control APIs for Inspector XE. This is not Control APIs relevant issue, overhead caused by Inspector XE is high sometime. You may check:

1. Use mi1/mi2 instead of mi3, use ti1/ti2 instead of ti3

2. Don't use new Control APIs in loop

3. Monitoring your interest of module ONLY might be helpful.  

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Thank you very much for your kindly reply.

Except the first item, I just do as the latter two items you said. Furthermore, even use mi1, the results are the same: both memory usage and CPU time increased greatly.

So what should I do furthermore?

Thanks,

Zhanghong Tang

0 Kudos
Peter_W_Intel
Employee
459 Views

That is true you should pay for memory growth, caused by Inspector XE itself. You may try below, if there is no improved, I have no other idea:-( 

inspxe-cl -collect mi2 -knob stack-depth=1 -knob enable-memory-growth-detection=false -module-filter-mode=include -module-filter=your-app-module -- your-app

0 Kudos
Zhanghong_T_
Novice
459 Views

Dear Dr. Wang,

Thank you very much for your kindly reply. It seems that set the stack depth to 1 is a good idea.

Thanks,

Zhanghong Tang

0 Kudos
Reply