Skip to content

VTune profiling tool on MeluXina

The MeluXina system environment provides the Intel-VTune profiling tool.

Intel-VTune module description

Intel VTune Amplifier XE is the premier performance profiler for C, C++, C#, Fortran, Assembly and Java.

You can use Intel-VTune to profile the performance of your C, C++, C#, Fortran and Java programs.

Intel-VTune usage


Reserve an X11 interactive session:

salloc -A COMPUTE_ACCOUNT -t 01:00:00 -q dev --res cpudev -p cpu -N 1 srun --forward-x --pty bash -l

The example above will allocate one CPU node in interactive mode (dev QoS with cpudev reservation and X11 interface). Load the Intel-VTune (will load default version if not specified) module as in below script.

module load VTune

VTune GUI interface should pops-up as in the picture below:



Intel-VTune can also be used in a batch and non-interactive job using Slurm. The script below load the VTune module and profile a simple program on one CPU node allocated for 5 minutes.

#!/bin/bash -l
#SBATCH --ntasks=10
#SBATCH --cpus-per-task=1
#SBATCH -p cpu
#SBATCH -q test
#SBATCH --time 00:05:00

#Load Intel module
module load VTune

#Check Intel version
vtune --version

#Profile a serial program with VTune
srun -n 1 vtune -collect hotspots -result-dir r000hs_serial ./simple_program

#Profile MPI program with VTune
srun -n 10 vtune -collect hotspots -result-dir r000hs_mpi ./simple_program

The batch script above runs a hotspots analysis on a serial and MPI code. The results collected are stored in forders r000hs_serial and r000hs_mpi. The GUI interface can then be used to visualize the traces.