Difference between revisions of "Intel VTune Tutorial/Introduction"

From HPC Wiki
Intel VTune Tutorial/Introduction
Jump to navigation Jump to search
(Created page with "Intel VTune Tutorials: Introduction<nowiki /> {{DISPLAYTITLE:Intel VTune Tutorial: Introduction}}<nowiki /> {{Syllabus Intel VTune Tutorial}} __TOC__ T...")
 
m (Fix missing whitespace in media reference of Slides)
 
(5 intermediate revisions by one other user not shown)
Line 12: Line 12:
 
<youtube width="600" height="340" right>4jwhjsN_Ock</youtube>
 
<youtube width="600" height="340" right>4jwhjsN_Ock</youtube>
  
([[Media:VTune_introduction.pdf|Slides as pdf]])
+
([[Media:VTune_introduction.pdf |Slides as pdf]])
  
 
=== Quiz === <!--T:5-->   
 
=== Quiz === <!--T:5-->   
Line 20: Line 20:
 
{
 
{
 
|type="()"}
 
|type="()"}
- Producing pretty screenshots of source code for presentations.
+
- Producing pretty screenshots of source code for presentations
|| Not correct. A profiler might be able to show source code but its primary purpose is not presentation, but analysis.
+
|| Not correct. A profiler might be able to show source code, but its primary purpose is not presentation, but analysis.
 
- Improving the performance of a program
 
- Improving the performance of a program
 
|| Not correct. A profiler can help with optimization, but it does not optimize an application on its own
 
|| Not correct. A profiler can help with optimization, but it does not optimize an application on its own
Line 33: Line 33:
 
{
 
{
 
|type="()"}
 
|type="()"}
+ Use first measurements to recommend which analysis types should be considered next.
+
+ Use first measurements to recommend which analysis types should be considered next
 
|| Correct, the Performance Snapshot is a good first step that highlights which analysis types are likely to help the most.
 
|| Correct, the Performance Snapshot is a good first step that highlights which analysis types are likely to help the most.
- Provide an in-depth performance analysis with detailed results.
+
- Provide an in-depth performance analysis with detailed results
 
|| Not correct. The result presentation is brief and intended to give an overview.
 
|| Not correct. The result presentation is brief and intended to give an overview.
- Automatically run a shorter version of an existing application.
+
- Automatically run a shorter version of an existing application
 
|| Not correct. The user has to decide about the test case workload and analysis types don't affect this.  
 
|| Not correct. The user has to decide about the test case workload and analysis types don't affect this.  
 
</quiz>
 
</quiz>
Line 46: Line 46:
 
{
 
{
 
|type="()"}
 
|type="()"}
- In-depth instrumentation of an application during compilation to send performance "events" to the analysis application.
+
- In-depth instrumentation of an application during compilation to send performance "events" to the analysis application
|| Not correct. Event based samplind does not require the application to be recompiled with instrumentations. The application does not necesarrily know that it is being analysed.
+
|| Not correct. Event based sampling does not require the application to be recompiled with instrumentation. The application does not necessarily know that it is being analysed.
- Performance analysis of an application by analysing the user input events.
+
- Performance analysis of an application by analysing the user input events
 
|| Not correct. I have no idea how that would even work. But Keyboards and mice do send "events" as well.
 
|| Not correct. I have no idea how that would even work. But Keyboards and mice do send "events" as well.
+ Regular sampling of performance counters during program execution.
+
+ Regular sampling of performance counters during program execution
 
|| Correct. Performance counters count events and regular samples are attributed the current location in the program execution.
 
|| Correct. Performance counters count events and regular samples are attributed the current location in the program execution.
 
</quiz>
 
</quiz>
Line 59: Line 59:
 
{
 
{
 
|type="()"}
 
|type="()"}
- Yes, there is no other way for VTune to access the hardware performance counters.
+
- Yes, there is no other way for VTune to access the hardware performance counters
|| Not correct. On an average Linux computer, it is possible to go through Linux Perf or use the less detailed "user sampling" mode.
+
|| Not correct. On an average Linux computer, it is possible to go through Linux perf or use the less detailed "user sampling" mode.
+ No, VTune can use "Linux Perf" or the less detailed "user sampling" mode.
+
+ No, VTune can use "Linux perf" or the less detailed "user sampling" mode
|| Correct! You can always run a less detailed analysis or go through "Linux Perf". VTune will tell you in the GUI if it is possible or not.
+
|| Correct! You can always run a less detailed analysis or go through "Linux perf". VTune will tell you in the GUI if it is possible or not.
- No, VTune can always access performance counters.
+
- No, VTune can always access performance counters
 
|| Not correct. A system administrator might restrict the access for security reasons, for example.
 
|| Not correct. A system administrator might restrict the access for security reasons, for example.
 
</quiz>
 
</quiz>
Line 72: Line 72:
 
{
 
{
 
|type="()"}
 
|type="()"}
- By typing `intelvtune` in the commandline.
+
- By typing <source enclose="none">intelvtune</source> in the commandline
 
|| Not correct. This is command does not exist by default.
 
|| Not correct. This is command does not exist by default.
- `vtune-gui` will always work
+
- <source enclose="none">vtune-gui</source> will always work
 
|| Not correct. This depends on how VTune was installed. It is often required to use a source script or load an environment module.
 
|| Not correct. This depends on how VTune was installed. It is often required to use a source script or load an environment module.
+ `vtune-gui`, after the environment was set up with a source script or through `module load`. (depends on installation)
+
+ <source enclose="none">vtune-gui</source>, after the environment was set up with a source script or through <source enclose="none">module load</source> (depends on installation)
 
|| Correct! It is likely that you have to set up your environment first. Either through a source script that is shipped with the installation or a module load.
 
|| Correct! It is likely that you have to set up your environment first. Either through a source script that is shipped with the installation or a module load.
 
</quiz>
 
</quiz>
 
{{hidden end}}
 
{{hidden end}}

Latest revision as of 09:36, 9 August 2023

Tutorial
Title: Intel VTune Tutorial
Provider: HPC.NRW

Contact: tutorials@hpc.nrw
Type: Multi-part video
Topic Area: Performance analysis
License: CC-BY-SA
Syllabus

1. Introduction
2. CPU Architecture
3. Analysis Types
4. Useful Tips

The first tutorial video is introducing the Intel VTune profiler. It covers questions of what it is and how it works. The video ends with an example of how to run a first analysis with the "performance snapshot" type.

Video

(Slides as pdf)

Quiz

1. What does a profiler do?

Producing pretty screenshots of source code for presentations
Improving the performance of a program
Provides insight into an application

2. What does the Performance Snapshot analysis type do?

Use first measurements to recommend which analysis types should be considered next
Provide an in-depth performance analysis with detailed results
Automatically run a shorter version of an existing application

3. What does event based sampling refer to??

In-depth instrumentation of an application during compilation to send performance "events" to the analysis application
Performance analysis of an application by analysing the user input events
Regular sampling of performance counters during program execution

4. Do you always need the kernel module to profile with Intel VTune?

Yes, there is no other way for VTune to access the hardware performance counters
No, VTune can use "Linux perf" or the less detailed "user sampling" mode
No, VTune can always access performance counters

5. How do you start Intel VTune? (Assuming a working installation)

By typing intelvtune in the commandline
vtune-gui will always work
vtune-gui, after the environment was set up with a source script or through module load (depends on installation)