Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)

Can not display source code profiling results in VTune 2018 Linux

QFang1
Novice
1,747 Views

this used to work (in vtune 2016), double clicking on a hotspot shows the corresponding source line (well, need to select the .cl kernel file first i the pop-up window). Now it only shows assembly. Both the "Source" and "Assembly" buttons on the window are grayed out. Double clicking on the assembly opens a PDF. Also tried both gcc and icc with -g, same problem.

the program is an OpenCL code (https://github.com/fangq/mcxcl). I've set the binary search path and source search path (same as I used before).

Collection log show the following message, but I don't see the complains about locating source file

Data collection is completed with warnings
    Sun 15 Oct 2017 06:10:43 PM EDT  The result file '/home/fangq/intel/amplxe/projects/mcxcl/r018ah/r018ah.amplxe' is created and added to the project mcxcl. Please see warning messages for details. 
    To profile kernel modules during the session, make sure they are available in the /lib/modules/kernel_version/ location.

Finalization completed with warnings 
    Sun 15 Oct 2017 06:10:50 PM EDT  Result finalization has completed with warnings that may affect the representation of the analysis data. Please see details below. 
    Cannot locate debugging symbols for file `/pub/intel/opencl-1.2-6.4.0.25/lib64/libcpu_device.so'.
    Cannot locate debugging symbols for file `/pub/intel/vtune_amplifier_2018.0.2.525261/lib64/runtime/libittnotify_collector.so'.
    Cannot locate file `nvidia_uvm.ko'.
    Cannot locate debugging symbols for file `/pub/intel/opencl-1.2-6.4.0.25/lib64/libOclCpuBackEnd.so'.
    Cannot locate file `nvidia.ko'.
    Cannot locate debugging symbols for file `/lib/modules/4.4.0-89-generic/kernel/drivers/nvme/host/nvme.ko'.
    Cannot locate debugging symbols for file `/pub/intel/opencl-1.2-6.4.0.25/lib64/libintelocl.so'.
    Cannot locate debugging symbols for file `/pub/intel/opencl-1.2-6.4.0.25/lib64/__ocl_svml_l9.so'.
    Cannot locate debugging symbols for file `/pub/intel/opencl-1.2-6.4.0.25/lib64/libcommon_clang.so'.
    Cannot locate file `/usr/lib/debug/lib/modules/4.4.0-89-generic/vmlinux'.
    Cannot locate debugging symbols for file `/lib/modules/4.4.0-89-generic/kernel/ubuntu/i915/i915_bpo.ko'.
    Cannot locate debugging symbols for file `/lib/modules/4.4.0-89-generic/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko'.
    Cannot locate debugging symbols for file `/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19'.

 

anyone know how to display source code line-by-line profiling results in the latest vtune? thanks

0 Kudos
9 Replies
Svetlana_K_Intel
Employee
1,747 Views

Hi,

Could you please specify what source and assembly are you interested in? OpenCL kernels? OpenCL kernels running on CPU or on GPU? if on GPU - is it Nidia or Intel gen?

VTune is not supposed to show anything for OpenCL kernels running on Nvidia. Kernels will not show up in VTune at all.

For OpenCL running on Intel GPU VTune would not ask for .cl location, it would get source, binary and debug info w\o user help.

For OpenCL running on CPU the kernel would appear among the other CPU-side functions - is that your case?

0 Kudos
QFang1
Novice
1,747 Views

SVETLANA K. (Intel) wrote:

Hi,

Could you please specify what source and assembly are you interested in? OpenCL kernels? OpenCL kernels running on CPU or on GPU? if on GPU - is it Nidia or Intel gen?

VTune is not supposed to show anything for OpenCL kernels running on Nvidia. Kernels will not show up in VTune at all.

For OpenCL running on Intel GPU VTune would not ask for .cl location, it would get source, binary and debug info w\o user help.

For OpenCL running on CPU the kernel would appear among the other CPU-side functions - is that your case?

hi Svetlana,

I want to benchmark an OpenCL kernel on the Intel CPUs. I was able to do this previously using vtune 2016, but not 2018. 

if you want to try, here is how

git clone https://github.com/fangq/mcxcl.git
cd mcxcl/src
make

once you have the mcxcl binary under mcxcl/bin, you can then open vtune, create a new session, add mcxcl/bin/mcxcl as the binary, add mcxcl/example/benchmark/ folder as the work folder, and add 

-A -f benchmark1.json -k ../../src/mcx_core.cl -b 0 -n 1e7 -G 1

as the command line parameter, where number after -G is a 01 string. If you Intel CPU is the 1st device, then use 1; if t is the second, use 01; 3rd, use 001 etc. You should also supply the search path to the source (mcxcl/src folder).

you can then run a basic hotspot test. The top hotspot is the OpenCL kernel called mcx_main_loop() defined in the mcxcl/src/mcx_core.cl. In the bottom-up view, double clicking on this item, Vtune asks me to select the src file, in vtune 2016, when I select mcx_core.cl, it shows the line-by-line profiling results; but in 2018, it jumped to a line (but wrong), but the CPU time columns are empty for all lines.

I am attaching a screenshot I got from vtune 2016 years ago, but now vtune 2016 license has expired, and I can not get 2018 to work.

0 Kudos
QFang1
Novice
1,747 Views

can anyone help? 

here are the screenshots I got from vtune 2018, top-left show the profiling settings, including the src search path, left-bottom show the warnings in the log, right-top show the bottom-up view. Double-clicking on any of the item in the bottom-up page brings me to the bottom-right view, showing only the assembly codes, with both source/assembly buttons disabled. 

please let me know how can I show source code lines in the profiler. I already included -g in my compilation commands.

0 Kudos
PAVEL_G_Intel
Employee
1,747 Views

Hi,

Do you have no sources for every function or for some specific?

As I see you have a lot of warnings about not loaded debug information. For every this module VTune Amplifier cannot show the sources.
You specified search paths for tbb and mcxcl and I see not problem with this modules load.

Let's do experiment:
Change the grouping to Module/Function/Call Stack. And try to drill down to any function inside the libtbb.so or mcxcl. Do you see the source file here?

 

0 Kudos
QFang1
Novice
1,747 Views

hi Pavel, I changed the grouping to "Module/Function/Call Stack", the screenshot is attached. No information is shown under the main cl kernel.

All I am interested in is the OpenCL kernel mcx_main_loop(). It is defined in the mcx_core.cl unit (https://github.com/fangq/mcxcl/blob/master/src/mcx_core.cl#L339). The warnings were mostly about system libraries, which are not of my interest.

Please let me know if there are other suggestions to let vtune to load the kernel source.

on a side note, I found that using the latest intel ocl library, adding "-g" in the clBuildProgram call will always give me a segfault. it worked previously. you can test this by appending -J "-g" option in the command line, for example, the below command give me this output

fangq@taote:~/space/git/Project/github/mcxcl/example/benchmark$ ../../bin/mcxcl -A -f benchmark1.json -k ../../src/mcx_core.cl -b 0 -G 001 -n 1e7 -J "-DMCX_USE_NATIVE -g"
==============================================================================
=                      Monte Carlo eXtreme (MCX) -- OpenCL                   =
=            Copyright (c) 2010-2017 Qianqian Fang <q.fang at neu.edu>       =
=                                 http://mcx.space/                          =
=                                                                            =
= Computational Optics & Translational Imaging (COTI) Lab- http://fanglab.or =
=               Department of Bioengineering, Northeastern University        =
==============================================================================
=        The MCX Project is funded by the NIH/NIGMS under grant R01-GM114365 =
==============================================================================
$Rev::6e839e $ Last $Date::2017-07-20 12:46:23 -04$ by $Author::Qianqian Fang$
==============================================================================
- code name: [Vanilla MCXCL] compiled with OpenCL version [1]
- compiled with: [RNG] Logistic-Lattice [Seed Length] 5
initializing streams ...	init complete : 0 ms
Stack dump:
0.	Running pass 'Function Pass Manager' on module 'main'.
1.	Running pass 'X86 Assembly / Object Emitter' on function '@__mcx_main_loop_separated_args'
Segmentation fault (core dumped)
 
0 Kudos
QFang1
Novice
1,747 Views

by the way, does intel still provide non-commercial/academic licenses for vtune 2016? my previous license has expired.

I just don't want to drain too much time into getting the latest vtune to work.

0 Kudos
QFang1
Novice
1,747 Views

another question, are there other tools in the Parallel Studio XE can give you line-by-line timing information? I saw there are Advisor and Inspector tools, but don't have much experience. I just want to get around this problem. thanks

0 Kudos
PAVEL_G_Intel
Employee
1,747 Views

Hi,

I don't think it's possible to get license for old version of VTune Amplifier. But I confirm that I was able to reproduce the problem. I also wasn't able to see sources on VTune Amplifier 2016.
Could you provide your VTune Amplifier build number?  amplxe-cl --version

I am unfortunately not proficient in OpenCL analysis but as I know it depends on OpenCL runtime. Do you remember what runtime you use earlier?

0 Kudos
QFang1
Novice
1,747 Views

hi Pavel, glad you can reproduce this issue. the build number is 525261. It was downloaded a couple of weeks ago from Intel's website.

fangq@taote$ amplxe-cl --version
Intel(R) VTune(TM) Amplifier 2018 (build 525261) Command Line Tool
Copyright (C) 2009-2017 Intel Corporation. All rights reserved.

For vtune 2016, when double clicking on any function calls inside the kernel, vtune will first ask the user to provide the path to the source code, I then select mcx_core.cl, then, it shows the line-by-line timing info. For every new test, this has to be done once.

For the OpenCL run time, I currently have Intel's opencl-1.2-6.4.0.25, previously I have been using intel-opencl-1.2-6.2.0.1760 for vtune 2016.

please let me know there is a workaround for this version, or there is another version I can try.

thanks

 

0 Kudos
Reply