Examples¶
A number of example scripts is available in the directory examples.
Here, a brief description of the example scritps follows.
Bar Charts with Matplotlib¶
barchartCpathID.py¶
Produces a bar chart plot of the time spent (or some other metric) in a given function (identified by its CNode ID) for all processors.
barchartFuncwise_multiplecases.py¶
Variation of barchartFuncwise.py, where multiple .cubex files are provided.
barchartFuncwise.py¶
Produces a bar chart plot of time spent (or some other metric) in the functions called by a root function that can be chosen by name.
barchartFuncwiseMPI.py¶
Variant of barchartFuncwise.py, where we select the MPI calls that were performed inside a particular function, recursively, and plot a barchart showing the time spent in each kind of MPI function.
barchartLevelwise_multiplecases.py¶
Similar to barchartLevelwise.py, but processes multiple .cubex files.
barchartLevelwise.py¶
Produce a bar chart plot, where bars represent the time spent (or some other metric) in a given functions, or some other metric function-wise. The data to plot represents the function calls a given level of the calltree (the script can be modified to be to select any range of levels).
barchartNfuncs.py¶
Produces a bar chart plot that displays the time spent in the N most expensive functions.
Interactive plots with Plotly¶
plot_time_imbalance.py¶
This example script processes a single .cubex file, and shows the inclusive time as a sunburst plot and as a treemap. The color of the plot elements is now dependent on the imbalance between ranks.
Usage: ./example2.py <cubex file>
if <cubex file> is not provided, ‘../test_data/profile.cubex’ is used.
plot_time_inclusive.py¶
This example script processes a single .cubex file, and shows the inclusive time as a sunburst plot.
Usage: ./example1.py <cubex file>
if <cubex file> is not provided, ‘../test_data/profile.cubex’ is used.
scatter_papi.py¶
This example reads the .cubex files containing PAPI counter values produced by scalasca and combines them using CUPyBE. Then, it creates some scatter plots (using matplotlib) which mimic the roofline diagrams, estimating an arithmetic intensity-like and a FLOP-like quantity from, respectively, load/store operations or cache reads and floating point vector operations, and floating point operations and execution time.
Usage: ./scatter_papi.py [scalasca dir]
If scalasca dir is absent, then the current directory is taken as input.
time_imbalance_dashboard.py¶
This example script processes a single .cubex file, starts a dashboard to display the data as a sunburst or a treemap plot (the user can switch the visualisation to both types). The threshold for displaying the branches/leaves of the calltree, in terms of fraction of total runtime, can be adjusted with the slider.
Usage: ./example3.py <cubex file>
if <cubex file> is not provided, ‘../test_data/profile.cubex’ is used.