Developer Guide

  • 2021.2
  • 03/31/2021
  • Public Content

Interoperability with Other Tools Through -gtool

To simplify interoperability with other analysis tools, Intel® MPI Library provides the
option (also available as the
environment variable). Using the
option, you can analyze specific MPI processes with VTune™ Profiler, Intel® Advisor, Valgrind,* and other tools through the
The Intel Advisor CLI uses
to analyze MPI applications. For sample command lines and example scenarios, including the Weather Research and Forecasting (WRF) Model, see Analyze Vectorization and Memory Aspects of an MPI Application.
If you are not using the
option, to analyze an MPI process with, for example, VTune Profiler, you must specify the relevant command in the corresponding argument set:
$ mpirun -n 3 ./myprog : -n 1 vtune -c advanced-hotspots -r ah -- ./myprog
option allows you to specify a single analysis command for all argument sets (separated by colons '
') at once. Even though it is allowed to use
within a single argument set, it is not recommended to use it in several sets at once and combine the two analysis methods (with
 and argument sets).
For example, to analyze processes 3, 5, 6, and 7 with the VTune Profiler, you can use the following command line:
$ mpirun -n 8 -gtool "vtune -collect hotspots -r result:3,5-7" ./myprog
option also provides several methods for finer process selection. For example, you can easily analyze only one process on each host, using the
launch mode:
$ mpirun -n 8 -ppn 4 -hosts node1,node2 -gtool "vtune -collect hotspots -r result:all=exclusive" ./myprog
You can also use the
option to specify
 parameters in a configuration file. All the same rules apply. Additionally, you can separate different command lines with section breaks.
For example, if
contains the following settings:
env VARIABLE1=value1 VARIABLE2=value2:3,5,7-9; env VARIABLE3=value3:0,11 env VARIABLE4=value4:1,12
The following command sets
for processes 3, 5, 7, 8, and 9 and sets
for processes 0 and 11, while
is set for processes 1 and 12:
$ mpirun -n 16 -gtoolfile gtool_config_file a.out

for Debugging

runtime option can help you with debugging, when attaching to several processes at once. Instead of attaching to each process individually, you can specify all the processes in a single command line. For example:
$ mpirun -n 16 -gtool "gdb:3,5,7-9=attach" ./myprog
The command line above attaches the GNU* Debugger (GDB*) to processes 3, 5, 7, 8 and 9.
Do not use the
options together. Use one option at a time.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at