Software Archive
Read-only legacy content
17061 Discussions

How to graphically evaluate program on mic with vtune

yuyinyang
Beginner
880 Views

I want to get the detailed information in the Bottom up or Top-down tab, like the assembly code, source code, and the execution time for each particular assembly instruction, just as what I can get on normal x86 server.

However, I even can't make the program correctly run in the amplxe-gui. Or some No call stack information result.

Can anyone tell me how to configure the project properties in the amplxe-gui and how to get the assembly instructions of the program and their corresponding running time on Xeon Phi? I'm using the trial version of vtune_amplifier_xe_2015.1.0.367959.

0 Kudos
1 Solution
robert-reed
Valued Contributor II
880 Views

An issue with the following string:

amplxe-cl -collect advanced-hotspots -knob collection-detail=stack-sampling -target-system=mic-native -r ./result -search-dir /opt/mpss/3.4/sysroots/k1om-mpss-linux/boot -- ssh mic0 /home/yuyinyang/workspace/hellomem/mic_gcc_O3

Is that this line specifies the new, VTune Amplifier XE 2015 method for invoking a native run, -target-system=mic-native (you could make it specific to MIC0 by saying "-target-system=mic-native:0") but the invocation string used is still the pre-v15, ssh-based method, presuming a host launch of ssh to execute something on mic0.  If /home/yuyinyang/workspace/hellomem/mic_gcc_O3 IS a correct path to your application running on coprocessor mic0, it should be sufficient in this line.

 It appears that you employed that with the amplxe-gui session described above.  Presumably you compiled this native program using cross-compilation (-mmic) and symbols (-g) and specified as Source Search directory the folder containing the program source files, if that differs from where you actually run the program.  The control for enabling stacks is not on the Project Properties page but on the collection launch page.

VTuneStackEnabling.PNG

Selecting Hotspots, stacks and context switches enables stack tracing on the coprocessor and requires that the vtsspp driver is running on the coprocessor.  I noticed that the VTune Amplifier in the examples is not the latest--V15 U1 is build 380310--and there were some issues with VTSS++ on the coprocessor associated with which version of Intel MPSS was running (there was a problem with the V15 initial release VTSS++ and Intel MPSS 3.4).  If you are still struggling, I would recommend that you first try to get the V15 U1 release installed on your system and ensure it is running intel MPSS 3.4 and then retry your experiments, being sure to cross-compile (-mmic) and enable symbols (-g)..  

View solution in original post

0 Kudos
4 Replies
Dmitry_P_Intel1
Employee
880 Views

Hello,

It might be worth to read the following page for details how to configure collection on Xeon Phi in VTune GUI:

https://software.intel.com/en-us/node/529790

Here is also an example of running advanced-hotspot analysis with stacks for a native application and search dir for Xeon Phi kernel symbol resolution:

amplxe-cl -collect advanced-hotspots -knob collection-detail=stack-sampling -target-system=mic-native -r <result_dir> -search-dir /opt/mpss/<MPSS_version>/sysroots/k1om-mpss-linux/boot <path_to_app_on_card>

Also please note that analysis with stacks is availabe for native applications only.

BTW - what threading model do you use?

Thank you, Dmitry

 

 

0 Kudos
yuyinyang
Beginner
880 Views

Hello,

I tried to run the command to profile:

amplxe-cl -collect advanced-hotspots -knob collection-detail=stack-sampling -target-system=mic-native -r ./result -search-dir /opt/mpss/3.4/sysroots/k1om-mpss-linux/boot -- ssh mic0 /home/yuyinyang/workspace/hellomem/mic_gcc_O3

but I got this problem:

amplxe: Error: Cannot enable advanced capabilities for Hardware Event-based Sampling: problem with the driver (vtss/vtsspp). Check that the driver is running and the driver group is in the current user group list. See "Building and Managing the Sampling Driver" help topic for further details.

While using the amplxe-gui, I set the Target system as "Intel Xeon Phi coprocessor (Native)", the card number as "0(mic0)", target type as "Launch Application", the Application as "/home/yuyinyang/workspace/hellomem/mic_gcc_O3"(this is the path of my program on mic), with the application parameters empty. The Binary/Symbol Search Directory and Source Search directory are both set as the path of the running program.

However, the sampling result is still a main function with "No call stack information". I can't see the source code or assembly neither.

The details can be seen in the attachments. How can I figure this out?

BTW, I'm sorry that I'm not sure what do you mean by threading model, do you mean the thread affinity? I'm using the scatter affinity.

 

0 Kudos
robert-reed
Valued Contributor II
881 Views

An issue with the following string:

amplxe-cl -collect advanced-hotspots -knob collection-detail=stack-sampling -target-system=mic-native -r ./result -search-dir /opt/mpss/3.4/sysroots/k1om-mpss-linux/boot -- ssh mic0 /home/yuyinyang/workspace/hellomem/mic_gcc_O3

Is that this line specifies the new, VTune Amplifier XE 2015 method for invoking a native run, -target-system=mic-native (you could make it specific to MIC0 by saying "-target-system=mic-native:0") but the invocation string used is still the pre-v15, ssh-based method, presuming a host launch of ssh to execute something on mic0.  If /home/yuyinyang/workspace/hellomem/mic_gcc_O3 IS a correct path to your application running on coprocessor mic0, it should be sufficient in this line.

 It appears that you employed that with the amplxe-gui session described above.  Presumably you compiled this native program using cross-compilation (-mmic) and symbols (-g) and specified as Source Search directory the folder containing the program source files, if that differs from where you actually run the program.  The control for enabling stacks is not on the Project Properties page but on the collection launch page.

VTuneStackEnabling.PNG

Selecting Hotspots, stacks and context switches enables stack tracing on the coprocessor and requires that the vtsspp driver is running on the coprocessor.  I noticed that the VTune Amplifier in the examples is not the latest--V15 U1 is build 380310--and there were some issues with VTSS++ on the coprocessor associated with which version of Intel MPSS was running (there was a problem with the V15 initial release VTSS++ and Intel MPSS 3.4).  If you are still struggling, I would recommend that you first try to get the V15 U1 release installed on your system and ensure it is running intel MPSS 3.4 and then retry your experiments, being sure to cross-compile (-mmic) and enable symbols (-g)..  

0 Kudos
yuyinyang
Beginner
880 Views

Hi Robert,

Thanks a lot. This is really comprehensive and helpful.

0 Kudos
Reply