Intel® Advisor User Guide

ID 766448
Date 11/07/2023
Public

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

Version

Location

Example Use

Windows*

fgtrun.bat

%FGT_ROOT%\windows\bin

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

Linux*

fgtrun.sh

${FGT_ROOT}/linux/bin

fgtrun.sh <app-binary-name> [<binary-args>] [--ia32/ --intel64] [--omp] [--xml]

macOS*

fgtrun.sh

${FGT_ROOT}/macos/bin

fgtrun.sh <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:

--omp

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

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

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

--xml

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.

--sym

Get mapping between nodes and source code.

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