Skip to content

CARM Quick Start Guide

This tutorial will cover how to use the CARM Tool to benchmark the system and profile your application.

Loading the module

Begin by loading the appropriate module:

module load carm-roofline

Benchmarking the system

To benchmark the system, use the carm benchmark command. You can configure it to best match your application's characteristics. For example, to run a benchmarks with 1, 32 and 64 threads you can:

carm benchmark --threads 1 32 64

Consult the documentation for more information on how you can configure the benchmarks.

Profiling your application

To profile your application, use the carm profile command. The tool supports multiple profiling backends, including PAPI and perf.

Simple profiling example

To profile an application which has not been instrumented, you can use the perf backend. This is the simplest approach, but provides limited insight into the performance, since the whole execution is represented by a single point in the roofline plot

carm profile --backend perf -- ./my_application arg1 arg2

Advanced profiling example

For more advanced profiling, you can use the PAPI backend and instrument your application with PAPI HL calls. For more information on how to do this, consult the profiling documentation and the example application.

By profiling your application with PAPI, you can annotate different code regions to inspect their performance characteristics individually. To profile such an application, you can use the following command:

module load PAPI
carm profile --backend papi --aggregation region_merged -- ./my_application arg1 arg2

Multiple --aggregation options are available, which controls how code regions are aggregated into roofline points. region_merged will merge the same region across multiple threads and ranks into a single point. You can see how each aggregation mode works here.

Visualizing the results

You can use the carm gui command to visualize the results of your benchmarks and profiling runs. To open the GUI on your browser, you will need to forward the port to your local machine. If you are connecting to Deucalion via SSH, connect with the following command:

ssh -L 8050:localhost:8050 <username>@login.deucalion.macc.fccn.pt

Then, run the GUI with:

carm gui

The tool will print a URL to your terminal, which you can open in your browser. For more information on how to use the GUI, consult the quick start guide.