Annotate your program

Typically, we integrate Caliper into a program by marking source-code sections of interest with descriptive annotations. Linaro MAP can connect to Caliper and access the information provided by these annotations.

Annotate in C/C++

Linaro MAP supports Caliper’s high-level C/C++ API for annotating functions, loops (although loop iterations are not recorded) and code regions. Refer to the Annotation API in the Caliper documentation, for details and examples.

Note

Using the low-level API for C/C++ applications is not recommended. Low-level API calls must be nested, otherwise they are not supported.

Annotate in Fortran

For Fortran programs, the low-level API must be used to emulate the high-level API. These label types are supported: function, loop, statement, annotation. They match the attribute names used by the high-level API.

Note

Caliper regions must be nested. Close all inner regions before closing an outer region.

use Caliper
call cali_begin_string_byname('function', 'myFunction')
...
call_end_byname('function')