sponsored

Flow Graph Analysis for Performance

Interactively build, validate, and visualize algorithms

istock 647209510
istock/PeopleImages

Flow graphs have been used to represent programming since the earliest days because they’re such a powerful way to think about programming. Real-time programming, event-based programming, and parallel programming have all helped make flow graphs even more popular.

Today, we can design and analyze the parallelism in an application using the Flow Graph Analyzer (FGA), an Intel tool that supports parallel applications using Intel® Threading Building Blocks (TBB) flow graph. FGA allows us to interactively build, validate, and visualize algorithms – even as we write code.

This helps speed up algorithm design by letting us start with high-level tuning of our thinking on how to use parallelism before we commit to coding. FGA follows us through the process of coding, allowing us to stay on track with the performance we planned to obtain. The critical path analysis feature will reduce the set of nodes (even large graphs) by focusing on the critical sections when tuning so we’re less likely to waste time tuning code that’s not on a critical path.

I’ve seen example customer graphs, with tens of thousands of nodes, where this is absolutely essential. A more common graph with a much smaller number of nodes still benefits a great deal from this help to focus on what matters most.

Visualize Parallelism

At the heart of it, FGA aims to help us visualize the structure of a parallel program. It aids our understanding of potential bottlenecks by analyzing an application’s critical path performance. So, starting with a blank canvas, let’s construct a flow graph application by interactively adding nodes and edges through a graphical interface.

The screenshot of the Flow Graph Analyzer has five areas labelled: (1) menu/toolbars to control the design, editing, visualization, and analysis of flow graphs; (2) views for design options, hierarchical graph topology, or analysis with squares in a tree map – as shown on this particular screenshot; (3) graph viewing and editing area; (4) reports on properties, rules checks, and critical path analysis; (5) performance statistics and execution timeline charts.

Model Graphs in a Heterogeneous World

The Intel TBB flow graph interface provides for heterogeneous usage through nodes that use OpenMP or OpenCL. This mixing of TBB, OpenMP, and OpenCL allows for a very rich environment for using diverse hardware. The FGA helps with these important heterogeneous graphs as well.

The FGA is well worth a try (see links at the end of this article on how to get it for free). It’s also getting significant attention from tool developers at Intel, who recently added “omp parallel region support” so that TBB flow graph nodes containing OpenMP are identified and involved in the parallelism analysis in the tool. That’s a great start for deeper OpenMP support, and it should grow from there in future releases.

Free and Easy Download

The latest and greatest Flow Graph Analyzer is available from Intel in the Parallel Studio product, which is currently in beta for the “2019” version of all their tools and libraries. The Flow Graph Analyzer has been integrated into the Intel® Advisor tool as of the beta. The beta is freely available, and the link for joining is provided below.

Useful links for more information

·         Intel® Parallel Studio XE 2019 Beta – Information on how to join the beta (free)

·         Intel Parallel Universe Magazine – Issue 30 – article highlighting a specific example of using flow graph analysis: “Driving Performance with Intel® Advisor’s Flow Graph Analyzer”

·         Early version: Intel Flow Graph Analyzer User Guide (not yet directly part of the beta documentation – I have been told that it will be integrated into the Intel Advisor documentation by August)

Related: