Intel® VTune™ Amplifier 2016

Build Application and Create New Project

Before you start analyzing your application for locks and waits, do the following:

  1. Get software tools.

  2. Build application with full optimizations.

  3. Create a performance baseline.

  4. Create a VTune Amplifier project.

Get Software Tools

You need the following tools to try tutorial steps yourself using the tachyon sample application:

Acquire Intel VTune Amplifier

If you do not already have access to the VTune Amplifier, you can download an evaluation copy from http://software.intel.com/en-us/articles/intel-software-evaluation-center/.

Note

This document focuses on using the VTune™ Amplifier in Intel® Parallel Studio XE Professional Edition. You may see minor differences if you installed a different Intel product. For more information on product capabilities in your installed product, see the product-specific supplemental documentation in <install-dir>/<Intel_product>/documentation/.

Install and Set Up VTune Amplifier Sample Applications

  1. Copy the tachyon_vtune_amp_xe.tgz file from the <install-dir>/samples/<locale>/C++/ directory to a writable directory or share on your system. The default installation path is opt/intel/vtune_amplifier_xe_2016.
  2. Extract the sample from the .tgz file.

Note

  • Samples are non-deterministic. Your screens may vary from the screen captures shown throughout this tutorial.
  • Samples are designed only to illustrate the VTune Amplifier features; they do not represent best practices for creating code.

Build the Target in the Release Mode

Build the target in the Release mode with full optimizations, which is recommended for performance analysis.

  1. Browse to the directory where you extracted the sample code (for example, /home/samples/tachyon). Make sure this directory contains Makefile.

  2. Clean up all the previous builds using the following command:

    $ make clean

  3. Build your target:

    $ make

    The tachyon_analyze_locks application is built and stored in the tachyon directory.

Create a Performance Baseline

  1. Run tachyon_analyze_locks with dat/balls.dat as an input parameter. For example:

    ./tachyon_analyze_locks dat/balls.dat

    The tachyon_analyze_locks application runs in multiple sections (depending on the number of CPUs in your system).

    Note

    Before you start the application, minimize the amount of other software running on your computer to get more accurate results.

  2. Note the execution time displayed in the window caption and in the shell window. For the tachyon_analyze_locks executable in the figure above, the execution time is 11.632 seconds. The total execution time is the baseline against which you will compare subsequent runs of the application.

    Note

    Run the application several times, note the execution time for each run, and use the average number. This helps to minimize skewed results due to transient system activity.

Create a Project

  1. Set the EDITOR or VISUAL environment variable to associate your source files with the code editor (like emacs, vi, vim, gedit, and so on). For example:

    $ export EDITOR=gedit

  2. Run the amplxe-gui script launching the VTune Amplifier.

  3. Click the menu button and select New > Project... to create a new project.

    The Create a Project dialog box opens.

  4. Specify the project name tachyon that will be used as the project directory name.

    VTune Amplifier creates a project directory under the $HOME/intel/amplxe/projects directory and opens the Choose Target and Analysis Type window with the Analysis Target tab active.

  5. From the left pane, select the local target system and from the right pane select the Launch Application target type from the drop-down menu.

    The configuration pane is updated with the settings specific to the selected target type.

  6. Specify and configure your target as follows:

    • For the Application field, browse to: <tachyon_dir>/tachyon_analyze_locks (for example, /home/samples/tachyon/tachyon_analyze_locks).

    • For the Application parameters field, specify dat/balls.dat.

  7. Click the Choose Analysis button on the right to switch to the analysis type configuration.

Key Terms

Next Step

Run Locks and Waits Analysis