You can use Intel Advisor to identify issues and help you with threading and vectorization optimization on the specific Intel processors that your Fortran, C, or C++ applications run on. The software, which is available as a module on HECC systems, provides recommended workflows for these two optimization areas.
Intel Advisor offers both a command-line interface (CLI) and a graphical user interface (GUI). We recommend that you use the CLI (advixe-cl) in a PBS batch job to collect data, and then use the GUI (advixe-gui) to analyze the result, as it provides a more comprehensive view than the CLI. However, please note that learning how to navigate the GUI will take some effort and time. For more information, see the Intel documentation, Intel Advisor GUI.
Analysis Types
Each Intel Advisor workflow involves a combination of some of the analysis types listed below. For detailed information about these workflows, see the Intel documentation, Getting Started with Intel Advisor, or access the CLI help page by running advixe-cl -h workflow.
Survey analysis
Helps to identify loop hotspots and provides recommendations for how to fix vectorization issues.
Trip counts and flops analysis
Counts the number of times loops are executed and provides data about floating-point operations (flops), memory traffic, and AVX-512 mask usage. This analysis requires more instrumentation and will perturb your application more. Thus, it takes longer time than the survey analysis.
Dependencies analysis
Checks for real data dependencies in loops the compiler did not vectorize because of assumed dependencies.
Memory access patterns analysis
Checks for memory access issues such as non-contiguous, or non-unit stride access.
Suitability analysis
Predicts the maximum speed-up of your application, based on the inserted annotations and a variety of what-if modeling parameters you can experiment with. Use this information to choose the best candidates for parallelization with threads.
Roofline analysis
Runs two analyses one by one: (1) the survey analysis, and (2) the trip counts and flops analysis. A roofline chart is then generated which plots an application's achieved floating-point performance and arithmetic intensity (AI) against the machine's maximum achievable performance.
Depending on the processors your application runs on, you may consider adding an option that instructs the compiler to generate a binary that targets certain instruction sets. The options are listed in the following table.
Processor Type
Option
Cascade Lake, Skylake
-xCORE-AVX512
Broadwell
-xCORE-AVX2
Multiple auto-dispatch code paths
-axCORE-AVX512,CORE-AVX2,AVX -xSSE4.2
Collecting Data
Load the module and collect data:
module use -a /nasa/modulefiles/testing
module load advisor/
advixe-cl -collect=<string> [-action-option] [-global-option] [--] <target> [<target options>]
where:
<string> is one of the following analysis types: survey, tripcounts, dependencies, map, or suitability Note: For non-MPI applications, <string> can also be roofline. For MPI applications, roofline analysis can only be done by performing survey and tripcounts in two separate steps.
For information about action-option and global-option, run advixe-cl -h collect.
Analyzing the Result
The data collected are stored in a directory tree (for example, my_result), which you specify using an action-option called -project-dir.
Depending on the analysis type used in data collection, you might find the subdirectories hsxxx, trcxxx, dpxxx, and mpxxx in the my_result/e000 directory (for serial or pure OpenMP applications) or in the my_result/rank.n directory (for the nth-rank of an MPI application).
To view the result on a PFE, use either the Intel Advisor GUI (advixe-gui) or the CLI (advixe-cl).
Use the Intel Advisor GUI
Load the module and run advixe-gui:
module use -a /nasa/modulefiles/testing
module load advisor/
advixe-gui my_result
After the GUI starts, click Show My Result. In the main window, you can choose one of three panels: Summary (default view), Survey & Roofline, or Refinement Reports. All three are described below.
Summary
Might show gigaflops count, AI, number of threads, loop metrics, vectorization gain/efficiency, top time-consuming loops, and platform information.
Survey & Roofline
Might show the roofline chart, source code, assembly code, detailed info on flops, AI, efficiency, reason for no vectorization of the top-time-consuming loops.
Refinement Reports
Might show memory access patterns report (1-stride, 0-stride, constant-stide, irregular stride) and dependencies report.
Use the Intel Advisor CLI
Load the module and run advixe-cl:
module use -a /nasa/modulefiles/testing
module load advisor/
advixe-cl -report=<string> [-action-option] [-global-option] [--] <target> [<target options>]
For information on <string>, action-option, and global-option, run: advixe-cl -h report
Note: If the job runs too quickly, there is not enough data collected to generate a report.