Running vtune

Introduction

Intel® VTune™ Profiler is an application profiling and tuning tool for serial and threded codes. In this tutorial we will show how to use vtune in tetralith system

Compiling code for vtune

We first create a run directory for our test and then load the module:

$ export VTUNETEST=/home/${USER}/intel_perf_tool/vtune/$(date +%d%m%y)
$ mkdir -p $VTUNETEST
$ module load buildenv-intel/2021.3.0-oneapi

One can choose some other suitable folder name instead of the above if one wants to. Next, we check compute accounting information

$ projinfo $USER

This will show compute project account name. We use that to set up the following:

$ export ACCOUNT_NAME=project_account_name    ## Add your project's account name here

Now we download the sample code to be used for this tutorial.

$ cd $VTUNETEST
$ wget -N https://www.nsc.liu.se/support/tutorials/Intel_Perf_Tools/nqueens_fortran_vtune_amp_xe.tgz
$ tar -zxvf nqueens_fortran_vtune_amp_xe.tgz
$ cd nqueens_fortran/linux

To compile the code run:

$ make clean
$ make
$ test -f nqueens_serial

Next download the run script for vtune profiling:

$ wget -N https://www.nsc.liu.se/support/tutorials/Intel_Perf_Tools/run.sh
$ cat run.sh
#!/bin/bash

## hotspots analysis ##
mkdir hotspots
cd hotspots
amplxe-cl -collect hotspots -result-dir r001hs ../nqueens_serial
test -d r001hs
amplxe-cl -report hotspots -r r001hs
cd ../

## hpc-performance analysis ##
mkdir hpc_perf
cd hpc_perf
amplxe-cl -collect hpc-performance -result-dir r001hs ../nqueens_serial
test -d r001hs
amplxe-cl -report hotspots -r r001hs
cd ../

## memory-access analysis ##
mkdir mem_access
cd mem_access
amplxe-cl -collect memory-access -result-dir r001hs ../nqueens_serial
test -d r001hs
amplxe-cl -report hotspots -r r001hs
cd ../

## memory-consumption analysis ##
mkdir mem_consump
cd mem_consump
amplxe-cl -collect memory-consumption -result-dir r001hs ../nqueens_serial
test -d r001hs
amplxe-cl -report hotspots -r r001hs
cd ../

## io analysis ##
mkdir io
cd io
amplxe-cl -collect io -result-dir r001hs ../nqueens_serial
test -d r001hs
amplxe-cl -report hotspots -r r001hs
cd ../

As can be seen different types of vtune analysis expamles are shown above. To run the example do the following:

$ sbatch -A $ACCOUNT_NAME -n1 run.sh

User Area

User support

Guides, documentation and FAQ.

Getting access

Applying for projects and login accounts.

System status

Everything OK!

No reported problems

Self-service

SUPR
NSC Express