Example: Profile an OpenMP Application on Linux*
Use
Intel VTune
on a Linux machine to profile a sample
Profiler
iso3dfd_omp_offload
OpenMP application offloaded onto an Intel GPU. Learn how to run a GPU analysis and examine results.
Prerequisites
- Make sure your system is running Linux* OS kernel 4.14 or a newer version.
- Use one of these versions of Intel Processor Graphics:
- Gen 8
- Gen 9
- Gen 11
- Your system should be running on one of these Intel processors:
- 7th Generation Intel® Core™ i7 Processors (code name Kaby Lake)
- 8th Generation Intel® Core™ i7 Processors (code name Coffee Lake)
- 10th Generation Intel® Core™ i7 Processors (code name Ice Lake)
- For the Linux GUI, use:
- GTK+ version 2.10 or newer (2.18 and newer versions are recommended)
- Pango version 1.14 or newer
- X.Org version 1.0 or newer (1.7 and newer versions are recommended)
- InstallIntel VTunefrom one of these sources:Profiler
- Download the Intel® oneAPI HPC Toolkit which contains theIntel® oneAPI DPC++/C++ Compiler(icx/icpx) that you need to profile OpenMP applications.
- Set up environment variables. Execute thevars.shscript.
Build and Compile the OpenMP Offload Application
- Download theiso3dfd_omp_offloadOpenMP Offload sample.
- Open to the sample directory.cd <sample_dir>/DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload
- Compile the OpenMP Offload application.mkdir build; cmake -DVERIFY_RESULTS=0 .. make -jThis generates asrc/iso3dfdexecutable.
To delete the program, type:
This removes the executable and object files that you created with themake clean
make
command.
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.
- OpenVTuneand click onProfilerNew Projectto create a project.
- On the welcome page, click onConfigure Analysisto set up your analysis.
- Select these settings for your analysis.
- In theWHEREpane, selectLocal Host.
- In theWHATpane, selectLaunch Applicationand specify theiso3dfd_omp_offloadbinary as the application to profile.
- In theHOWpane, select theGPU Offloadanalysis type from theAcceleratorsgroup in the Analysis Tree.
- Click theStartbutton to run the analysis.
VTune
collects data and displays analysis results in the
Profiler
GPU Offload
viewpoint.
- In theSummarywindow, see statistics on CPU and GPU resource usage. Use this data to determine if your application is:
- GPU-bound
- CPU-bound
- Utilizing the compute resources of your system inefficiently
- Use the information in thePlatformwindow to see basic CPU and GPU metrics.
- Investigate specific computing tasks in theGraphicswindow.
VTune
Performance Analysis Cookbook. You can also continue your profiling with the
GPU Compute/Media Hotspots analysis.
Profiler