3.1-rc3 (revision d9ca08bb)
Attribute Conventions

While users have the liberty to select attribute names and formats as they like, the OTF2 project suggests certain conventions to enable interoperability between various OTF2 producers and consumers. The conventions used by Vampir and Score-P are as follows:

General Style and Formatting

Score-P and Vampir have historically used a variety of conventions for how attribute names should be formatted and whether they should be namespaced. Any OTF2 consumer that intends to read trace files produced by Score-P should read the following sections carefully and note the expected names and types of attributes. For future development, best practice is as follows:

As a reminder, tools that read OTF2 should gracefully handle the absence of any free-form optional attributes.

Memory Space Attributes

These attributes may be assigned to any data transfer operation. They should describe respectively the source and destination of the data transfer. They refer to an appropriate LocationGroup. In the case of unified memory, it should generally be possible to determine whether the source and target addresses are actually in main memory (corresponding to the location group of the associated CPU process) or in accelerator memory (corresponding to the location group of the accelerator context).

Memory Allocation Attributes

These attributes are conventionally used to describe memory allocation performed within a region, as described by Enter and Leave events. They are conventionally of type OTF2_TYPE_UINT64. The Vampir tool uses the _ADDRESS suffix as a hint to format an attribute in hexadecimal style. The usage of these attributes is described with respect to standard memory allocation (e.g. malloc or new).

More complex behavior may be modeled with combinations of these attributes: for instance, a realloc can be represented as a deallocation and allocation, as can a memory move.

I/O Attributes

This attribute is used in I/O recording to describe the starting point of an I/O operation in a file. This is conventionally of type OTF2_TYPE_UINT64. Score-P records this attribute for IoOperationBegin events.

Process and Thread Attributes

These attributes are recorded by Score-P upon process or thread creation, as reflected by ProgramBegin events for processes and ThreadBegin or ThreadTeamBegin events for threads. These are conventionally of type OTF2_TYPE_UINT64. Note that ProgramBegin accepts not only a process ID, but also a thread ID for the initial thread. This allows OTF2 users to omit thread creation events for the main thread of the program while still recording the associated thread ID somewhere. This style is produced by Score-P.

Tools writing OTF2 should take particular note of the following: