Build Application and Create New Project

Before you start analyzing your application target for hotspots, do the following:

  1. Get software tools.

  2. Build application with full optimizations.

  3. Run the application without debugging to 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:

  • VTune Amplifier, including sample applications

  • tar file extraction utility

  • GNU* C++ compiler

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 the Intel® Parallel Studio XE. You may see minor differences if you installed a different Intel Studio. For more information on product capabilities in your installed Intel Studio, see the studio-specific supplemental documentation in <install-dir>/<Intel_studio>/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_2013.
  2. Extract the sample from the tar 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

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

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

  2. Build your target:

    $ make

    The tachyon_find_hotspots application is built.

Create a Performance Baseline

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

    $ ./tachyon_find_hotspots dat/balls.dat

    The tachyon_find_hotspots application starts running.

    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. For the tachyon_find_hotspots executable in the figure above, the execution time is 13.365 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

To analyze your target the VTune Amplifier, you need to create a project, which is a container for an analysis target configuration and data collection results.

  1. If working in a bash shell, 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 GUI.

  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 the tachyon project directory under the $HOME/intel/ampl/projects directory and opens the Project Properties: Target dialog box.

  5. In the Application to Launch pane of the Target tab, specify and configure your target as follows:

    • For the Application field, browse to <sample_code_dir>/tachyon_find_hotspots, for example: /home/myuser/samples/tachyon/tachyon_find_hotspots.

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

  6. Click OK to apply the settings and exit the Project Properties dialog box.

Key Terms

Optimization Notice

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804


Supplemental documentation specific to a particular Intel Studio may be available at <install-dir>/<studio>/documentation/.

Пожалуйста, обратитесь к странице Уведомление об оптимизации для более подробной информации относительно производительности и оптимизации в программных продуктах компании Intel.