Intel® Advisor User Guide

ID 766448
Date 11/07/2023

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Collecting Trace Files with fgtrun Script

Use the fgtrun script to collect the trace information from your application.

Before running the script, you must set the FGT_ROOT variable to <advisor-install-dir>\fga\fgt as described in the Collecting Traces Outside the Flow Graph Analyzer GUI. The fgtrun script sets the paths necessary to execute your application and generate the GraphML* and TraceML* files that can be loaded into the Flow Graph Analyzer for visualization.

The following table lists the directories in which the scripts are located on a given system.

Operating System



Example Use




fgtrun.bat <app-binary-name> [<binary-args>] [--ia32/ --intel64] [--vc12/ --vc14/ --vc14.1] [--xml]


${FGT_ROOT}/linux/bin <app-binary-name> [<binary-args>] [--ia32/ --intel64] [--omp] [--xml]


${FGT_ROOT}/macos/bin <app-binary-name> [<binary-args>] [--ia32/ --intel64] [--omp] [--xml]

The fgtrun script tries to automatically detect the architecture and C/C++ runtime version (Windows* OS only) of the executable used to collect the traces and requires the presence of helper tools. If the helper tools are not available or fail to identify the required information, fgtrun scripts sets default values and runs the collection. Optionally you can override these default values by setting architecture and C/C++ runtime version information (Windows* OS only) using command line arguments when the script is invoked.

The fgtrun has the following options:


Enable OpenMP* trace collection for applications linked with -qopenmp.

The OpenMP* runtime environment must be set correctly before the script is launched.

This OpenMP* trace collection capability is currently not supported on the Windows* OS.


Collect traces in XML format.

By default, the collector generates binary traces. If trace collection fails, you can switch to XML trace generation mode to debug the cause of the failure.


Get mapping between nodes and source code.

The symbol resolution feature is currently only supported on Linux* OS.