Stacks view

The Stacks view(s) offer a good top-down view of your program. Depending on your program and thread view mode you will see some combination of Main Thread Stacks, Thread Stacks, and OpenMP Stacks tabs.

It is easy to follow down from the main function to see which code paths took the most time. Each line of the Stacks view shows the performance of one line of your source code, including all the functions called by that line.

The sparkline graphs are described in detail in Source code (MAP).

Stacks view

The Stacks view shows:

  • The first line, slow, represents the entire program run.

  • Nested below slow is a call to the stride function. Almost all of this call was in single-threaded compute (dark green).

  • The stride function spent most of that time on the line arr_out(i,j)=sqrt(...) at slow.f90, line 114. 19.3% of the entire run was spent executing this line of code.

  • The 0.3% MPI time inside stride comes from an MPI_Barrier on line 121.

  • The next major function called from program slow is the overlap function, shown at the bottom of this figure. A more detailed breakdown is described in Metrics view. This function ran for 30.0% of the total time, and almost all of this was in MPI calls.

When you click on any line of the Stacks view, the Source Code viewer jumps to that line of code. This makes it a very easy way to navigate and understand the performance of even complex codes.

The percentage MPI time gives an idea as to how well your program is scaling and shows the location of any communication bottlenecks. As discussed in Source code (MAP), a sawtooth pattern in the view represents imbalance between processes or cores.

In the figure above, the MPI_Send call inside the overlap function has a sawtooth pattern. This means that some processes took significantly longer to finish the call than others, perhaps because they were waiting longer for their receiver to become ready.

The Stacks view shows which lines of code spend the most time running, computing, or waiting. As with most places in the user interface, you can hover over a line or chart for a more detailed breakdown.