Automate Intel Advisor Workflows

Set Up Environment

Environment

Set-Up Tasks

Intel® Parallel Studio XE/Linux* OS

  • Do one of the following:

    • Run one of the following source commands:

      • For csh/tcsh users: source <advisor-install-dir>/advixe-vars.csh

      • For bash users: source <advisor-install-dir>/advixe-vars.sh

      The default installation path, <advisor-install-dir>, is below:

      • /opt/intel/ for root users

      • $HOME/intel/ for non-root users

    • Add <advisor-install-dir>/bin32 or <advisor-install-dir>/bin64 to your path.

    • Run the <parallel-studio-install-dir>/psxevars.csh or <parallel-studio-install-dir>/psxevars.sh command. The default installation path, <parallel-studio-install-dir>, is below:

      • /opt/intel/ for root users

      • $HOME/intel/ for non-root users

  • Make sure you run your application in the same Linux* OS environment as the Intel Advisor.

Intel Parallel Studio XE/Windows* OS

Do one of the following:

  • Run the <advisor-install-dir>\advixe-vars.bat command.

    The default installation path, <advisor-install-dir>, is below C:\Program Files (x86)\IntelSWTools\ (on certain systems, instead of Program Files (x86), the directory name is Program Files ).

  • Run the <parallel-studio-install-dir>\psxevars.bat command.

    The default installation path, <parallel-studio-install-dir>, is below C:\Program Files (x86)\IntelSWTools\.

Intel® System Studio

Run the <advisor-install-dir>\advixe-vars.bat command to set up your environment. The default installation path, <advisor-install-dir>, is below C:\Program Files (x86)\IntelSWTools\ (on certain systems, instead of Program Files (x86), the directory name is Program Files ).

Command Line

This section shows how to get started using the Intel Advisor CLI. The main advantage of using the Intel Advisor CLI instead of the GUI is you can perform analysis and collect data as part of an automated or background task, and then view the result in a CLI report (or in the GUI) at your convenience.

Below are examples of typical Intel Advisor CLI tasks.

To Do This

Use This CLI Model

View a full list of command line options.

(Applies to Vectorization Advisor & Threading Advisor.)

advixe-cl --help

Note

You can also check the Intel Advisor User Guide.

Run a Survey analysis.

(Applies to Vectorization Advisor & Threading Advisor.)

Linux* OS: advixe-cl --collect=survey –-project-dir=./myAdvisorProj -- myTargetApplication

Windows* OS: advixe-cl --collect=survey --project-dir=myAdvisorProj -- myTargetApplication

After running a Survey analysis, run a Trip Counts and FLOP analysis.

(Trip Counts applies to Vectorization Advisor & Threading Advisor, but FLOP is most useful in Vectorization Advisor.)

Linux* OS: advixe-cl --collect=tripcounts --flop –-project-dir=./myAdvisorProj -- myTargetApplication

Windows* OS: advixe-cl --collect tripcounts --flop --project-dir myAdvisorProj -- myTargetApplication

Tip

  • Make sure you use the same project directory for both the Survey analysis and Trip Counts and FLOP analysis.

  • If you run the Trip Counts and FLOP analysis before running a Survey analysis, use the no-auto-finalize option.

Run a Roofline analysis.

(Roofline applies to Vectorization Advisor & Threading Advisor, but is most useful in Vectorization Advisor.)

Linux* OS: advixe-cl --collect=roofline –-project-dir=./myAdvisorProj -- myTargetApplication

Windows* OS: advixe-cl --collect=roofline --project-dir=myAdvisorProj -- myTargetApplication

Run a Roofline With Callstacks analysis.

Linux* OS: advixe-cl --collect=roofline --stacks –-project-dir=./myAdvisorProj -- myTargetApplication

Windows* OS: advixe-cl --collect=roofline --stacks --project-dir=myAdvisorProj -- myTargetApplication

Print a Survey Report to identify loop IDs for Refinement analyses.

(Applies to Vectorization Advisor.)

Linux* OS: advixe-cl --report=survey –-project-dir=./myAdvisorProj

Windows* OS: advixe-cl --report=survey --project-dir=myAdvisorProj

Run a Refinement analysis.

(Applies to Vectorization Advisor.)

Linux* OS: advixe-cl --collect=[dependencies | map] --mark-up-list=[loopID],[loopID] –-project-dir=./myAdvisorProj -- myTargetApplication

Windows* OS: advixe-cl --collect=[dependencies | map] --mark-up-list=[loopID],[loopID] --project-dir=myAdvisorProj -- myTargetApplication

Run a Dependencies analysis.

(Applies to Threading Advisor.)

Linux* OS: advixe-cl --collect=dependencies --project-dir=./myAdvisorProj  -- myTargetApplicaton

Windows* OS: advixe-cl --collect=dependencies --project-dir=myAdvisorProj -- myTargetApplicaton

Create a snapshot, put sources and binaries in it, and pack into an archive.

(Applies to Vectorization Advisor & Threading Advisor.)

Linux* OS: advixe-cl --snapshot --project-dir=./user/test/vec_project --pack --cache-sources --cache-binaries -- ./tmp/myAdvisorProj_snapshot

Windows* OS: advixe-cl --snapshot --project-dir=/user/test/vec_project --pack --cache-sources --cache-binaries -- /tmp/myAdvisorProj_snapshot

Report a top-down functions list instead of a loop list.

(Applies to Vectorization Advisor & Threading Advisor.)

advixe-cl --report=survey --top-down --display-callstack

Report all compiler opt-report and vec-report metrics.

(Applies to Vectorization Advisor.)

advixe-cl --report=survey --show-all-columns

Report the top five self-time hotspots that were not vectorized because of a not inner loop msg id.

(Applies to Vectorization Advisor.)

advixe-cl --report=survey --limit=5 --filter="Vectorization Message(s)"="loop was not vectorized: not inner loop"

Tip

Click the appropriate Intel Advisor control: Get command line control in the Workflow to generate the corresponding collection command line.

MPI

This section shows how to get started using the Intel Advisor in an MPI environment.

You can perform an MPI analysis only through the Intel Advisor CLI; however, there are several ways to view an Intel Advisor result:

  • If you have an Intel Advisor GUI in your cluster environment, open a result in the GUI.

  • If you do not have an Intel Advisor GUI on your cluster node, copy the result directory to another machine with the Intel Advisor GUI and open the result there.

  • Use the Intel Advisor command line reports to browse results on a cluster node.

Use mpirun, mpiexec, or your preferred MPI batch job manager with the advixe-cl command to start an analysis. You may also use the -gtool option of mpirun. See the Intel® MPI Library Reference Manual (available in the Intel® Software Documentation Library) for more information.

Below are examples of typical Intel Advisor MPI tasks.

To Do This

Use This Command Line Model

Run 10 MPI ranks (processes), and start an Intel Advisor analysis on each rank.

Linux* OS: $ mpirun -n 10 advixe-cl --collect=survey --project-dir=./my_proj -- ./your_app

Windows* OS: $ mpirun -n 10 advixe-cl -collect=survey --project-dir=my_proj -- your_app

Intel Advisor creates a number of result directories in the current directory, named as rank.0, rank.1, ... rank.n, where n is the MPI process rank.

Intel Advisor does not combine results from different ranks, so you must explore each rank result independently.

Run 10 MPI ranks, and start an Intel Advisor analysis only on rank #1.

Linux* OS: $ mpirun -n 10 advixe-cl --collect=survey --project-dir=./my_proj -- ./your_app : -np 9 ./your_app

Windows* OS: $ mpirun -n 10 advixe-cl --collect=survey --project-dir=my_proj -- your_app :0

Run 10 MPI ranks, and build a Roofline chart on rank #1.

Linux* OS:

  1. $ mpirun -n 10 advixe-cl --collect=survey --project-dir=./my_proj -- ./your_app :1 -np 9 ./your_app

  2. $ mpirun -n 10 advixe-cl --collect=tripcounts --flop --project-dir=./my_proj -- ./your_app :1 -np 9 ./your_app

Windows* OS:

  1. $ mpirun -n 10 advixe-cl --collect=survey --project-dir=my_proj -- your_app :1

  2. $ mpirun -n 10 advixe-cl --collect=survey --flop --project-dir=my_proj -- your_app :1

Tip

Make sure you use the same project directory for both the Survey analysis and Trip Counts and FLOP analysis.

For more complete information about compiler optimizations, see our Optimization Notice.