2 ===============================================================================
4 Auditor for profilng Gaudi jobs.
5 Based on [Intel® VTune™ Amplifier XE ][amplifier].
10 Unless IntelProfiler doesn't pushed to Gaudi source repository (svn) and you
11 cann't use getpack command, you need to compile package by yourself at lxplus
12 (on whenever cern afs is accesible and we can link it with intel amplifier
15 [A video guide to installing profiler package][video].
17 [amplifier]: http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/
18 [video]: http://youtu.be/h9tx00MGZTQ
23 --------------------------------------------------------------------------------
25 (For full project example see [IntelProfilerExample][example] project).
27 ### Change Options File
29 Simple example of using IntelProfilerAuditor configurables:
32 #!/usr/bin/env gaudirun.py
33 from Configurables import IntelProfilerAuditor
35 profiler = IntelProfilerAuditor()
36 profiler.OutputLevel = DEBUG
37 # We can skip some events
38 profiler.StartFromEventN = 100
39 profiler.StopAtEventN = 500
40 # Sequence which we need to profile. If empty, we profile all algorithms
41 profiler.IncludeAlgorithms = ["TopSequence"]
42 AuditorSvc().Auditors += [profiler]
43 ApplicationMgr().AuditAlgorithms = True
46 ### Setup Intel Environment
49 $> . /afs/cern.ch/sw/IntelSoftware/linux/all-setup.sh
52 The script change environment variables:
55 * set `INTEL_LICENSE_FILE`.
57 ### Collect Profiling Information
59 $> intelprofiler -o ~/profiler myoptions.py
62 , where ```~/profiler``` is a directorory where a profiling database will be
63 stored. After the each run of a profiling job you will get directories
64 like ~/profiler/r000hs, ~/profiler/r0001hs, ~/profiler/r_RunNumber_hs.
66 If script could not find intel `amplxe-cl` command,
67 it will try to setup intel environment (see previous section).
69 * P.S. At lxplus during the profiling you can see the following messages:
72 sh: lsmod: command not found
73 ERROR: ld.so: object '/$LIB/snoopy.so' from /etc/ld.so.preload cannot be preloaded: ignored.
74 ERROR: ld.so: object '/$LIB/snoopy.so' from /etc/ld.so.preload cannot be preloaded: ignored.
79 --------------------------------------------------------------------------------
82 (setup intel environment)
85 $> amplxe-gui ~/profiler/r000hs
88 An argument is a path to profiling database.
93 $> amplxe-cl -report hotspots -r ~/profiler/r000hs
94 $> amplxe-cl -report hotspots -r ~/profiler/r000hs -group-by=task
95 $> amplxe-cl -report hotspots -r ~/profiler/r000hs -group-by=task-function
98 * [Intel Amplifier documentation][amplxe].
99 * [Documentation about group-by opiton][groupby].
100 * [How to interpret results][interpret].
104 [groupby]: http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/lin/ug_docs/olh/cli_ref/group-by.html#group-by
105 [amplxe]: http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/lin/ug_docs/index.htm
106 [interpret]: http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/lin/ug_docs/index.htm
107 [example]: https://github.com/mazurov/IntelProfilerExample