Intel® Advisor Help
With Intel® Advisor, you can analyze parallel tasks running on a cluster to examine performance of your MPI application.
To start MPI jobs, use an MPI launcher such as mpirun, mpiexec, srun, aprun. You can use the Intel Advisor with the Intel® MPI Library or other MPI implementations only through the command line interface, but you can view the result using the standalone GUI, as well as the command line. The examples provided in this section use mpirun with the advisor command line interface (CLI) to spawn processes across the cluster and collect data about the application.
To analyze your MPI application:
You can analyze your application as one of the following:
You can generate pre-configured command lines for collecting results for the Intel MPI Library launcher or a custom launcher using Intel Advisor graphical user interface (GUI). In this case, you do not need to type each command with all options and paths to a project directory and an application executable manually.
See Generate Command Lines for details.
With the Intel MPI Library, you can analyze a single MPI rank or several ranks of your MPI application with the Intel Advisor. This can help you to decrease analysis overhead.
Recommended MPI ranks to analyze are rank 1 and higher, because rank 0 might include time for configuration and not be a good representative for the general MPI application performance.
MPI Command Syntax
To collect performance data for an MPI application with Intel Advisor using the mpirun launcher of the Intel MPI Library, use the following command syntax:
mpirun -gtool "advisor --collect=<analysis-type> --search-dir src:r=<source-dir> [--no-auto-finalize] --project-dir=<project-dir>:<rank-set>" -n <N><application-name> [<application-options>]
where:
Prerequisite: Set up environment variables to enable Intel Advisor CLI.
In the commands below:
Note: In the commands below, make sure to replace the application path and name before executing a command. If your application requires additional command line options, add them after the executable name.
This example shows how to run a Survey, Trip Counts, and Roofline analyses for the rank 1 of the MPI application with the gtool option of the Intel MPI Library.
mpirun -gtool "advisor --collect=survey --project-dir=./advi_results:1" -n 4 ./mpi_sample
mpirun -gtool "advisor --collect=tripcounts --flop --project-dir=./advi_results:1" -n 4 ./mpi_sample
After you collect the Survey, Trip Counts, and FLOP data, you also get the Roofline report for your application.
Prerequisite: Set up environment variables to enable Intel Advisor CLI.
In the commands below:
Note: In the commands below, make sure to replace the application path and name before executing a command. If your application requires additional command line options, add them after the executable name.
Analyze a Set of Ranks
This example shows how to run a Survey, Trip Counts, and Roofline analyses for a set of ranks of the MPI application with the gtool option of the Intel MPI Library.
mpirun -gtool "advisor --collect=survey --project-dir=./advi_results:1-2,4" -n 4 ./mpi_sample
mpirun -gtool "advisor --collect=tripcounts --flop --project-dir=./advi_results:1-2,4" -n 4./mpi_sample
After you collect the Survey, Trip Counts, and FLOP data, you also get the Roofline report for your application.
Analyze All Ranks
This example shows how to run a Survey, Trip Counts, and Roofline analyses for all ranks of the MPI application with the gtool option of the Intel MPI Library.
mpirun -gtool "advisor --collect=survey --project-dir=./advi_results" -n 4 ./mpi_sample
mpirun -gtool "advisor --collect=tripcounts --flop --project-dir=./advi_results" -n 4./mpi_sample
After you collect the Survey, Trip Counts, and FLOP data, you also get the Roofline report for your application.
With non-Intel MPI library implementation, you can only analyze all ranks of your MPI application with Intel Advisor. This might increase analysis overhead.
MPI Command Syntax
To collect performance data for an MPI application with Intel Advisor using the mpirun launcher, use the following command syntax:
mpirun -n <N> "advisor --collect=<analysis-type> --search-dir src:r=<source-dir>--trace-mpi [--no-auto-finalize] --project-dir=<project-dir>" <application-name> [<application-options>]
where:
Prerequisite: Set up environment variables to enable Intel Advisor CLI.
In the commands below:
Note: In the commands below, make sure to replace the application path and name before executing a command. If your application requires additional command line options, add them after the executable name.
This example shows how to run a Survey, Trip Counts, and Roofline analyses for all 4 ranks of the MPI application.
mpirun -n 4 "advisor --collect=survey --project-dir=./advi_results"./mpi_sample
mpirun -n 4 "advisor --collect=tripcounts --flop --project-dir=./advi_results" ./mpi_sample
After you collect the Survey, Trip Counts, and FLOP data, you also get the Roofline report for your application.
For example:
mpiexec -gwdir \\<host1>\mpi -hosts 2 <host1> 1 <host2> 1 advisor --collect=survey --project-dir=\\<host1>\mpi\advi_results -- \\<host1>\mpi\mpi_sample.exe
advisor --import-dir=\\<host1>\mpi\advi_results --project-dir=\\<host1>\mpi\new_advi_results --search-dir src:=\\<host1>\mpi --mpi-rank=1
advisor --report=survey --project-dir=\\<host1>\mpi\new_advi_results
or:
mpiexec -mapall -gwdir z:\ -hosts 2 <host1> 1 <host2> 1 advisor --collect=survey --project-dir=z:\advi_results -- z:\mpi_sample.exe
or:
mpiexec -map z:\\<host1>\mpi -gwdir z:\ -hosts 2 <host1> 1 <host2> 1 advisor --collect=survey --project-dir=z:\advi_results -- z:\mpi_sample.exe
Intel Advisor saves collection results into subdirectories for each rank analyzed under the project directory specified with --project-dir. The subdirectories are named as rank.<n> , where the numeric suffix <n> corresponds to an MPI rank analyzed. You can only view results for one rank at a time.
To view the performance results collected for a specific rank, you can do one of the following.
View Results in GUI
From the Intel Advisor GUI, open a result project file *.advixeproj that resides in the <project-dir> /rank.<n> directory.
You can also open the GUI from command line:
advisor-gui ./advi_results/rank.1
View Results in Command Line
Run the Intel Advisor --report action to print the result summary in a terminal:
advisor --report=<analysis-type> --project-dir=<project-dir> --mpi-rank=<n>
where:
View Results in a File
You can save results for a specified rank to a TXT, CSV, or a XML file. For example, save the results to a advisor_result.csv file, run the following command:
advisor --report=<analysis-type> --format=csv --report-output=advisor_result.csv --project-dir=<project-dir> --mpi-rank=<n>
where:
For more details on analyzing MPI applications, see the Intel MPI Library and online MPI documentation on the Intel® Developer Zone at https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html
For detailed syntax, refer to the Intel® MPI Library Developer Reference for Linux* OS or Intel® MPI Library Developer Reference for Windows* OS.
Hybrid applications: Intel MPI Library and OpenMP* on the Intel Developer Zone at https://www.intel.com/content/www/us/en/developer/articles/technical/hybrid-applications-mpi-openmp.html