Example: Profile an OpenMP Application on Linux*

Use Intel VTune Profiler on a Linux machine to profile a sample iso3dfd_omp_offload OpenMP application offloaded onto an Intel GPU. Learn how to run a GPU analysis and examine results.

Prerequisites

Build and Compile the OpenMP Offload Application

  1. Download the iso3dfd_omp_offload OpenMP Offload sample.

  2. Open the src directory.

    cd <sample_dir>/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/src
  3. Compile the OpenMP Offload application.

    mkdir build; 
    cmake -DVERIFY_RESULTS=0 ..
    make -j
    

    This generates a src/iso3dfd executable.

Run a GPU Analysis on the OpenMP Offload Application

You are now ready to run the GPU Offload Analysis on the OpenMP application you compiled.

  1. Open VTune Profiler and click on New Project to create a project.

  2. On the welcome page, click on Configure Analysis to set up your analysis.

  3. Select these settings for your analysis.
    • In the WHERE pane, select Local Host.
    • In the WHAT pane, select Launch Application and specify the iso3dfd_omp_offload binary as the application to profile.
    • In the HOW pane, select the GPU Offload analysis type from the Accelerators group in the Analysis Tree.
    Configuration for GPU Offload Analysis
  4. Click the Start button to run the analysis.

VTune Profiler collects data and displays analysis results in the GPU Offload viewpoint.

For a deeper analysis, see a related recipe in the VTune Profiler Performance Analysis Cookbook. You can also continue your profiling with the GPU Compute/Media Hotspots analysis.