Gaudi CPU profiler based on Intel Amplifier
C++ Shell Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmt
doc
scripts
src/component
.gitignore
README.md

README.md

Gaudi Intel Profiler

Auditor for profilng Gaudi jobs. Based on Intel® VTune™ Amplifier XE .

Unless IntelProfiler doesn't pushed to Gaudi source repository (svn) and you cann't use getpack command, you need to compile package by yourself at lxplus (on whenever cern afs is accesible and we can link it with intel amplifier static library):

A video guide to installing profiler package.

Installation

  • Setup your project environment. For example,

    $> SetupProject Gaudi v22r5 --build-env
  • Clone the project from my github repository:

    $> cd ~/cmtuser/Gaudi_v22r5
    $> git clone git://github.com/mazurov/IntelProfiler.git
  • Compile and set environment (to setup path(s) into InstallArea):

     $> make -j
     $> SetupProject Gaudi v22r5

Run

(For full project example see IntelProfilerExample project).

Change Options File

Simple example of using IntelProfilerAuditor configurables:

#!/usr/bin/env gaudirun.py
from Configurables import IntelProfilerAuditor
#...
profiler = IntelProfilerAuditor()
profiler.OutputLevel = DEBUG
# We can skip some events
profiler.StartFromEventN = 100
profiler.StopAtEventN = 500
# Sequence which we need to profile. If empty, we profile all algorithms
profiler.IncludeAlgorithms = ["TopSequence"]
AuditorSvc().Auditors +=  [profiler]
ApplicationMgr().AuditAlgorithms = True

For convinience your options file should be executable and include #!/usr/bin/env gaudirun.py at the begining of file.

Setup Intel Environment

$> . /afs/cern.ch/sw/IntelSoftware/linux/all-setup.sh

The script change environment variables:

  • update PATH.
  • set INTEL_LICENSE_FILE.

Collect Profiling Information

$> intelprofiler -o ~/profiler myoptions.py

, where ~/profiler is a directorory where a profiling database will be stored. After the each run of a profiling job you will get directories like ~/profiler/r000hs, ~/profiler/r0001hs, ~/profiler/r_RunNumber_hs.

If script could not find intel amplxe-cl command, it will try to setup intel environment (see previous section).

  • P.S. At lxplus during the profiling you can see the following messages:

    sh: lsmod: command not found
    ERROR: ld.so: object '/$LIB/snoopy.so' from /etc/ld.so.preload cannot be preloaded: ignored.
    ERROR: ld.so: object '/$LIB/snoopy.so' from /etc/ld.so.preload cannot be preloaded: ignored.
    

    You can ignore it.

Analyze

With GUI

(setup intel environment)

$> amplxe-gui ~/profiler/r000hs

An argument is a path to profiling database.

From Command Line

 $> amplxe-cl -report hotspots -r ~/profiler/r000hs
 $> amplxe-cl -report hotspots -r ~/profiler/r000hs -group-by=task
 $> amplxe-cl -report hotspots -r ~/profiler/r000hs -group-by=task-function