Introduction
Intel® VTune™ Amplifier XE 2015 now includes some new capabilities for analyzing Intel® Xeon Phi™ coprocessor applications. This article will step through this analysis on a Intel® Xeon Phi™ coprocessor and also outline some of the new capabilities.
Compiling and running the application
The application we will be using is one of the samples include in VTune Amplifier. It is located in /opt/intel/vtune_amplifier_xe_2015/samples/en/C++/matrix_vtune_amp_xe.tgz. To build the application on Linux*:
- First source the environment for the Intel® Compiler you are using.
- source /opt/intel/compiler_xe_2015/compilervars.sh intel64
- Untar the sample in a directory where you have permission
- tar xvzf matrix_vtune_amp_xe.tgz
- By default the sample does not use OpenMP*. You will need to modify the Makefile
- cd matrix/linux
- Edit the Makefile
- Comment the default PARAMODEL and uncomment the OpenMP PARAMODEL.
- Build the application to run native on the Intel® Xeon Phi™ coprocessor
- cd matrix/linux
- make mic
- The make command from step #4 will create a Intel Xeon Phi native matrix.mic executable. It will also copy the file to mic0:/tmp.
- Verify the libiomp5.so library is available on your Intel Xeon Phi coprocessor.
- Run the application
- /tmp/matrix.mic
Addr of buf1 = 0x7fec2b054010
Offs of buf1 = 0x7fec2b054180
Addr of buf2 = 0x7fec23fd3010
Offs of buf2 = 0x7fec23fd31c0
Addr of buf3 = 0x7fec1cf52010
Offs of buf3 = 0x7fec1cf52100
Addr of buf4 = 0x7fec15ed1010
Offs of buf4 = 0x7fec15ed1140
Threads #: 240 OpenMP threads
Matrix size: 3840
Using multiply kernel: multiply1
Freq = 1.090908 GHz
Execution time = 23.866 seconds
Running the application using VTune Amplifier
- Source /opt/intel/vtune_amplifier_2015/amplxvar.sh
- Start the VTune Amplifier GUI
- amplxe-gui
- Create a VTune Amplifier project
- We will be selecting the menu item Intel Xeon Phi coprocessor (native)
- Specify the "Launch Application" menu item
- Specify the application name /tmp/matrix.mic
- Note: This application is located on the Intel Xeon Phi coprocessor's file system.
- Click on Ok
- To analyze your application
Summary
VTune Amplifier has made some significant improvements in the analysis of Intel Xeon Phi coprocessor applications. This article has explained how to launch native applications under VTune Amplifier using the new GUI interface available in the 2015 release, but you can easily analyze offloaded applications using a very similar method, using the “Intel Xeon Phi coprocessor (host launch)” menu item shown in a menu above. Changes for the 2015 release also impact the command line interface, amplxe-cl. Look for another article to explain that.