Vtune: Difference between revisions

From Alliance Doc
Jump to navigation Jump to search
(rough notes about using vtune)
 
No edit summary
Line 1: Line 1:
{{Draft}}
<languages />
Vtune is Intel's performance analyszer or profiler. It is capable of analyzing both OpenMP and MPI based codes.
[[Category:Software]]
__FORCETOC__
<translate>


<!--T:1-->
= Introduction =
<!--T:10-->
[https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html VTune] is Intel's Performance Analysis tool for applications and systems. It is capable of [https://software.intel.com/content/www/us/en/develop/documentation/itac-vtune-mpi-openmp-tutorial-lin/top.html Analyzing both OpenMP and MPI] based applications.
<!--T:2-->
= Software Module =
<!--T:21-->
To load the module on any Compute Canada cluster run:
{{Command|module load vtune}}
{{Command|module load vtune}}


<!--T:3-->
= Tool Re-Naming =
<!--T:31-->
The content of this wiki is mostly discussed in terms of the legacy named Intel® VTune™ Amplifier.  Please note the tool has been renamed throughout Intels documentation in latest versions (newer than the latest vtune module versions presently available on Compute Canada systems) from Intel® VTune™ Amplifier too Intel® VTune™ Profiler.  Likewise the application commands amplxe-cl and amplxe-gui have been renamed too vtune and vtune-gui for both the command line and gui tools respectively.  Once a version with the newer naming convention is available as a loadable module in the forthcoming default StdEnv/2020 environment this wiki page will be updated accordingly.  Further information can be found [https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/launch.html here].
<!--T:4-->
= Collect Analysis =
<!--T:41-->
To collect analysis information run:
To collect analysis information run:
{{Command|amplxe-cl -collect <analysis-type> <target_exe> <exe_arguements>}}
{{Command|amplxe-cl -collect <analysis-type> <target_exe> <exe_arguments>}}
Where <analysis-type> should be replaced by one of the availble analysis, e.g. hotspots, and <target_exe> is the path to the executable you would like to analyze. It is recommended to compile your executable with the "-g" option and to use the same optimization level as normal so as to obtain accurate results.
where <analysis-type> should be replaced by one of the available analysis, e.g. hotspots, and <target_exe> is the path to the executable you would like to analyze. It is recommended to compile your executable with the "-g" option and to use the same optimization level as normal so as to obtain accurate results. A listing of version specific argument options and several usage examples maybe displayed on the command line by running <code>amplxe-cl -help</code>, after loading the vtune module.  Complete downloadable documentation for Parallel Studio XE (including VTune) for all recent versions can be found [https://software.intel.com/content/www/us/en/develop/articles/download-documentation-intel-parallel-studio-xe-current-previous.html here].  The latest version of the Intel VTune Profiler User Guide may be found [https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top.html here].
* [https://software.intel.com/en-us/vtune-amplifier-help-amplxe-cl-command-syntax https://software.intel.com/en-us/vtune-amplifier-help-amplxe-cl-command-syntax]
* [https://software.intel.com/en-us/vtune-amplifier-help-running-command-line-analysis https://software.intel.com/en-us/vtune-amplifier-help-running-command-line-analysis]


<!--T:5-->
= Create Report =


To create a report run:
<!--T:51-->
To create a report run this command:
{{Command|amplxe-cl -report <report-type> }}
{{Command|amplxe-cl -report <report-type> }}
where <report-type> is the type of the report to generate, e.g. hotspots.
where <report-type> is the type of the report to generate, e.g. hotspots. See also:
* [https://software.intel.com/en-us/vtune-amplifier-help-generating-command-line-reports https://software.intel.com/en-us/vtune-amplifier-help-generating-command-line-reports]
* [https://software.intel.com/en-us/vtune-amplifier-help-generating-command-line-reports https://software.intel.com/en-us/vtune-amplifier-help-generating-command-line-reports]
<!--T:6-->
= Matrix Example =
<!--T:61-->
Analyze and generate a summary report for the Intel Matrix Sample Project run from the command line with 4 cores:
salloc --time=1:00:00 --cpus-per-task=4 --ntasks=1 --mem=16G --account=def-yours
module load StdEnv/2016.4 *OR* StdEnv/2018.3
module load intel/2019.3 (optional)
module load vtune/2019.3
cp -a $EBROOTVTUNE/vtune_amplifier/samples/en/C++/matrix .
cd matrix/linux
make icc
amplxe-cl -collect hotspots ../matrix
amplxe-cl -report summary
<!--T:62-->
The latest version of matrix_multiply (uses cmake to build) can be found [https://github.com/oneapi-src/oneAPI-samples/tree/master/Tools/VTuneProfiler here].
<!--T:7-->
= Graphical Use =
<!--T:71-->
The Intel Matrix Sample Project an also be run using Vtune in GUI mode as explored here [https://software.intel.com/content/www/us/en/develop/documentation/vtune-hotspots-tutorial-linux-c/top/run-hotspots-analysis.html].  To run VTune over VNC follow the below directions depending on which system you wish to use.  Running VTune graphically can be useful to generate command line configurations as discussed in [https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/analyze-performance/control-data-collection/generating-command-line-configuration-from-gui.html].
<!--T:72-->
== Cluster Nodes ==
<!--T:721-->
# Connect to a cluster compute or login node with [https://docs.computecanada.ca/wiki/VNC#Connect TigerVNC]
# <code>module load StdEnv/2016.4 *OR* StdEnv/2018.3</code> 
# <code>module load intel/2019.3</code> (optional)
# <code>module load vtune/2019.3</code>
# <code>amplxe-gui</code><br>
<!--T:73-->
== VDI Nodes ==
<!--T:731-->
# Connect to gra-vdi.computecanada.ca with [https://docs.computecanada.ca/wiki/VNC#VDI_Nodes TigerVNC]
# <code>module load CcEnv StdEnv/2016.4 *OR* StdEnv/2018.3</code>
# <code>module load intel/2019.3</code> (optional)
# <code>module load vtune/2019.3</code>
# <code>amplxe-gui</code><br>
</translate>

Revision as of 08:39, 8 December 2020

Other languages:


Introduction

VTune is Intel's Performance Analysis tool for applications and systems. It is capable of Analyzing both OpenMP and MPI based applications.

Software Module

To load the module on any Compute Canada cluster run:

Question.png
[name@server ~]$ module load vtune

Tool Re-Naming

The content of this wiki is mostly discussed in terms of the legacy named Intel® VTune™ Amplifier. Please note the tool has been renamed throughout Intels documentation in latest versions (newer than the latest vtune module versions presently available on Compute Canada systems) from Intel® VTune™ Amplifier too Intel® VTune™ Profiler. Likewise the application commands amplxe-cl and amplxe-gui have been renamed too vtune and vtune-gui for both the command line and gui tools respectively. Once a version with the newer naming convention is available as a loadable module in the forthcoming default StdEnv/2020 environment this wiki page will be updated accordingly. Further information can be found here.

Collect Analysis

To collect analysis information run:

Question.png
[name@server ~]$ amplxe-cl -collect <analysis-type> <target_exe> <exe_arguments>

where <analysis-type> should be replaced by one of the available analysis, e.g. hotspots, and <target_exe> is the path to the executable you would like to analyze. It is recommended to compile your executable with the "-g" option and to use the same optimization level as normal so as to obtain accurate results. A listing of version specific argument options and several usage examples maybe displayed on the command line by running amplxe-cl -help, after loading the vtune module. Complete downloadable documentation for Parallel Studio XE (including VTune) for all recent versions can be found here. The latest version of the Intel VTune Profiler User Guide may be found here.

Create Report

To create a report run this command:

Question.png
[name@server ~]$ amplxe-cl -report <report-type>

where <report-type> is the type of the report to generate, e.g. hotspots. See also:

Matrix Example

Analyze and generate a summary report for the Intel Matrix Sample Project run from the command line with 4 cores:

salloc --time=1:00:00 --cpus-per-task=4 --ntasks=1 --mem=16G --account=def-yours
module load StdEnv/2016.4 *OR* StdEnv/2018.3
module load intel/2019.3 (optional)
module load vtune/2019.3
cp -a $EBROOTVTUNE/vtune_amplifier/samples/en/C++/matrix .
cd matrix/linux
make icc
amplxe-cl -collect hotspots ../matrix
amplxe-cl -report summary 

The latest version of matrix_multiply (uses cmake to build) can be found here.

Graphical Use

The Intel Matrix Sample Project an also be run using Vtune in GUI mode as explored here [1]. To run VTune over VNC follow the below directions depending on which system you wish to use. Running VTune graphically can be useful to generate command line configurations as discussed in [2].

Cluster Nodes

  1. Connect to a cluster compute or login node with TigerVNC
  2. module load StdEnv/2016.4 *OR* StdEnv/2018.3
  3. module load intel/2019.3 (optional)
  4. module load vtune/2019.3
  5. amplxe-gui

VDI Nodes

  1. Connect to gra-vdi.computecanada.ca with TigerVNC
  2. module load CcEnv StdEnv/2016.4 *OR* StdEnv/2018.3
  3. module load intel/2019.3 (optional)
  4. module load vtune/2019.3
  5. amplxe-gui