![]() |
1.2.1 (revision 3238)
|
This layer always writes globally defined OTF2 definition records and is used to write either the global definitions in addition to local definitions or write all definitions as globally valid in combination with OTF2_GlobalEventWriter. Global definitions are stored in one global definition file, which makes it nearly impossible to write them in a distributed manner. It is therefore only allowed to get such a writer from an OTF2_ArchiveHandler which is marked as OTF2_MASTER. More...
Go to the source code of this file.
Typedefs | |
typedef struct OTF2_GlobalDefWriter_struct | OTF2_GlobalDefWriter |
Typedef of the struct which keeps all necessary information of a global definition writer. Can be used to reference these structs from external. | |
Functions | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_GetNumberOfDefinitions (OTF2_GlobalDefWriter *writerHandle, uint64_t *numberOfDefinitions) |
Returns the current number of written definitions of a global definition writer. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_GetNumberOfLocations (OTF2_GlobalDefWriter *writerHandle, uint64_t *numberOfLocations) |
Returns the current number of written location definitions of a global definition writer. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteAttribute (OTF2_GlobalDefWriter *writerHandle, OTF2_AttributeRef self, OTF2_StringRef name, OTF2_Type type) |
Writes a Attribute definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteCallpath (OTF2_GlobalDefWriter *writerHandle, OTF2_CallpathRef self, OTF2_CallpathRef parent, OTF2_RegionRef region) |
Writes a Callpath definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteCallsite (OTF2_GlobalDefWriter *writerHandle, OTF2_CallsiteRef self, OTF2_StringRef sourceFile, uint32_t lineNumber, OTF2_RegionRef enteredRegion, OTF2_RegionRef leftRegion) |
Writes a Callsite definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteClockProperties (OTF2_GlobalDefWriter *writerHandle, uint64_t timerResolution, uint64_t globalOffset, uint64_t traceLength) |
Writes a ClockProperties definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteComm (OTF2_GlobalDefWriter *writerHandle, OTF2_CommRef self, OTF2_StringRef name, OTF2_GroupRef group, OTF2_CommRef parent) |
Writes a Comm definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteGroup (OTF2_GlobalDefWriter *writerHandle, OTF2_GroupRef self, OTF2_StringRef name, OTF2_GroupType groupType, OTF2_Paradigm paradigm, OTF2_GroupFlag groupFlags, uint32_t numberOfMembers, const uint64_t *members) |
Writes a Group definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteLocation (OTF2_GlobalDefWriter *writerHandle, OTF2_LocationRef self, OTF2_StringRef name, OTF2_LocationType locationType, uint64_t numberOfEvents, OTF2_LocationGroupRef locationGroup) |
Writes a Location definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteLocationGroup (OTF2_GlobalDefWriter *writerHandle, OTF2_LocationGroupRef self, OTF2_StringRef name, OTF2_LocationGroupType locationGroupType, OTF2_SystemTreeNodeRef systemTreeParent) |
Writes a LocationGroup definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteMetricClass (OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef self, uint8_t numberOfMetrics, const OTF2_MetricMemberRef *metricMembers, OTF2_MetricOccurrence metricOccurrence, OTF2_RecorderKind recorderKind) |
Writes a MetricClass definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteMetricClassRecorder (OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef metricClass, OTF2_LocationRef recorder) |
Writes a MetricClassRecorder definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteMetricInstance (OTF2_GlobalDefWriter *writerHandle, OTF2_MetricRef self, OTF2_MetricRef metricClass, OTF2_LocationRef recorder, OTF2_MetricScope metricScope, uint64_t scope) |
Writes a MetricInstance definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteMetricMember (OTF2_GlobalDefWriter *writerHandle, OTF2_MetricMemberRef self, OTF2_StringRef name, OTF2_StringRef description, OTF2_MetricType metricType, OTF2_MetricMode metricMode, OTF2_Type valueType, OTF2_MetricBase metricBase, int64_t exponent, OTF2_StringRef unit) |
Writes a MetricMember definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteParameter (OTF2_GlobalDefWriter *writerHandle, OTF2_ParameterRef self, OTF2_StringRef name, OTF2_ParameterType parameterType) |
Writes a Parameter definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteRegion (OTF2_GlobalDefWriter *writerHandle, OTF2_RegionRef self, OTF2_StringRef name, OTF2_StringRef canonicalName, OTF2_StringRef description, OTF2_RegionRole regionRole, OTF2_Paradigm paradigm, OTF2_RegionFlag regionFlags, OTF2_StringRef sourceFile, uint32_t beginLineNumber, uint32_t endLineNumber) |
Writes a Region definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteRmaWin (OTF2_GlobalDefWriter *writerHandle, OTF2_RmaWinRef self, OTF2_StringRef name, OTF2_CommRef comm) |
Writes a RmaWin definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteString (OTF2_GlobalDefWriter *writerHandle, OTF2_StringRef self, const char *string) |
Writes a String definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteSystemTreeNode (OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef self, OTF2_StringRef name, OTF2_StringRef className, OTF2_SystemTreeNodeRef parent) |
Writes a SystemTreeNode definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteSystemTreeNodeDomain (OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef systemTreeNode, OTF2_SystemTreeDomain systemTreeDomain) |
Writes a SystemTreeNodeDomain definition record into the GlobalDefWriter. | |
OTF2_ErrorCode | OTF2_GlobalDefWriter_WriteSystemTreeNodeProperty (OTF2_GlobalDefWriter *writerHandle, OTF2_SystemTreeNodeRef systemTreeNode, OTF2_StringRef name, OTF2_StringRef value) |
Writes a SystemTreeNodeProperty definition record into the GlobalDefWriter. |
This layer always writes globally defined OTF2 definition records and is used to write either the global definitions in addition to local definitions or write all definitions as globally valid in combination with OTF2_GlobalEventWriter. Global definitions are stored in one global definition file, which makes it nearly impossible to write them in a distributed manner. It is therefore only allowed to get such a writer from an OTF2_ArchiveHandler which is marked as OTF2_MASTER.
OTF2_ErrorCode OTF2_GlobalDefWriter_GetNumberOfDefinitions | ( | OTF2_GlobalDefWriter * | writerHandle, |
uint64_t * | numberOfDefinitions | ||
) |
Returns the current number of written definitions of a global definition writer.
writerHandle | Handle to the global definition writer. | |
[out] | numberOfDefinitions | Storage for the number of definitions. |
OTF2_ErrorCode OTF2_GlobalDefWriter_GetNumberOfLocations | ( | OTF2_GlobalDefWriter * | writerHandle, |
uint64_t * | numberOfLocations | ||
) |
Returns the current number of written location definitions of a global definition writer.
writerHandle | Handle to the global definition writer. | |
[out] | numberOfLocations | Storage for the number of locations. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteAttribute | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_AttributeRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_Type | type | ||
) |
Writes a Attribute definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Attribute definition. |
name | Name of the attribute. References a String definition. |
type | Type of the attribute value. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallpath | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_CallpathRef | self, | ||
OTF2_CallpathRef | parent, | ||
OTF2_RegionRef | region | ||
) |
Writes a Callpath definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Callpath definition. |
parent | References a Callpath definition. |
region | References a Region definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteCallsite | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_CallsiteRef | self, | ||
OTF2_StringRef | sourceFile, | ||
uint32_t | lineNumber, | ||
OTF2_RegionRef | enteredRegion, | ||
OTF2_RegionRef | leftRegion | ||
) |
Writes a Callsite definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Callsite definition. |
sourceFile | The source file where this call was made. References a String definition. |
lineNumber | Line number in the source file where this call was made. |
enteredRegion | The region which was called. References a Region definition. |
leftRegion | The region which made the call. References a Region definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteClockProperties | ( | OTF2_GlobalDefWriter * | writerHandle, |
uint64_t | timerResolution, | ||
uint64_t | globalOffset, | ||
uint64_t | traceLength | ||
) |
Writes a ClockProperties definition record into the GlobalDefWriter.
Defines the timer resolution and time range of this trace. There will be no event with a timestamp less than globalOffset, and no event with timestamp greater than (globalOffset + traceLength).
writerHandle | The writer handle. |
timerResolution | Ticks per seconds. |
globalOffset | A timestamp smaller than all event timestamps. |
traceLength | A timespan which includes the timespan between the smallest and greatest timestamp of all event timestamps. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteComm | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_CommRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_GroupRef | group, | ||
OTF2_CommRef | parent | ||
) |
Writes a Comm definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Comm definition. |
name | The name given by calling MPI_Comm_set_name on this communicator. Or the empty name to indicate that no name was given. References a String definition. |
group | The describing MPI group of this MPI communicator The group needs to be of type OTF2_GROUP_TYPE_MPI_GROUP or OTF2_GROUP_TYPE_MPI_COMM_SELF. References a Group definition. |
parent | The parent MPI communicator from which this communicator was created, if any. Use OTF2_UNDEFINED_COMM to indicate no parent. References a Comm definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteGroup | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_GroupRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_GroupType | groupType, | ||
OTF2_Paradigm | paradigm, | ||
OTF2_GroupFlag | groupFlags, | ||
uint32_t | numberOfMembers, | ||
const uint64_t * | members | ||
) |
Writes a Group definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Group definition. |
name | Name of this group References a String definition. |
groupType | The type of this group. Since version 1.2. |
paradigm | The paradigm of this communication group. Since version 1.2. |
groupFlags | Flags for this group. Since version 1.2. |
numberOfMembers | The number of members in this group. |
members | The identifiers of the group members. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocation | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_LocationRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_LocationType | locationType, | ||
uint64_t | numberOfEvents, | ||
OTF2_LocationGroupRef | locationGroup | ||
) |
Writes a Location definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Location definition. |
name | Name of the location References a String definition. |
locationType | Location type. |
numberOfEvents | Number of events this location has recorded. |
locationGroup | Location group which includes this location. References a LocationGroup definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteLocationGroup | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_LocationGroupRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_LocationGroupType | locationGroupType, | ||
OTF2_SystemTreeNodeRef | systemTreeParent | ||
) |
Writes a LocationGroup definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this LocationGroup definition. |
name | Name of the group. References a String definition. |
locationGroupType | Type of this group. |
systemTreeParent | Parent of this location group in the system tree. References a SystemTreeNode definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricClass | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_MetricRef | self, | ||
uint8_t | numberOfMetrics, | ||
const OTF2_MetricMemberRef * | metricMembers, | ||
OTF2_MetricOccurrence | metricOccurrence, | ||
OTF2_RecorderKind | recorderKind | ||
) |
Writes a MetricClass definition record into the GlobalDefWriter.
For a metric class it is implicitly given that the event stream that records the metric is also the scope. A metric class can contain multiple different metrics.
writerHandle | The writer handle. |
self | The unique identifier for this MetricClass definition. |
numberOfMetrics | Number of metrics within the set. |
metricMembers | List of metric members. References a MetricMember definition. |
metricOccurrence | Defines occurrence of a metric set. |
recorderKind | What kind of locations will record this metric class, or will this metric class only be recorded by metric instances. Since version 1.2. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricClassRecorder | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_MetricRef | metricClass, | ||
OTF2_LocationRef | recorder | ||
) |
Writes a MetricClassRecorder definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
metricClass | Parent MetricClass definition to which this one is a supplementary definition. References a MetricClass definition. |
recorder | The location which recorded the referenced metric class. References a Location definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricInstance | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_MetricRef | self, | ||
OTF2_MetricRef | metricClass, | ||
OTF2_LocationRef | recorder, | ||
OTF2_MetricScope | metricScope, | ||
uint64_t | scope | ||
) |
Writes a MetricInstance definition record into the GlobalDefWriter.
A metric instance is used to define metrics that are recorded at one location for multiple locations or for another location. The occurrence of a metric instance is implicitly of type OTF2_METRIC_ASYNCHRONOUS.
writerHandle | The writer handle. |
self | The unique identifier for this MetricClass definition. |
metricClass | The instanced MetricClass. This metric class must be of kind OTF2_RECORDER_KIND_ABSTRACT. References a MetricClass definition. |
recorder | Recorder of the metric: location ID. References a Location definition. |
metricScope | Defines type of scope: location, location group, system tree node, or a generic group of locations. |
scope | Scope of metric: ID of a location, location group, system tree node, or a generic group of locations. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteMetricMember | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_MetricMemberRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_StringRef | description, | ||
OTF2_MetricType | metricType, | ||
OTF2_MetricMode | metricMode, | ||
OTF2_Type | valueType, | ||
OTF2_MetricBase | metricBase, | ||
int64_t | exponent, | ||
OTF2_StringRef | unit | ||
) |
Writes a MetricMember definition record into the GlobalDefWriter.
A metric is defined by a metric member definition. A metric member is always a member of a metric class. Therefore, a single metric is a special case of a metric class with only one member. It is not allowed to reference a metric member id in a metric event, but only metric class IDs.
writerHandle | The writer handle. |
self | The unique identifier for this MetricMember definition. |
name | Name of the metric. References a String definition. |
description | Description of the metric. References a String definition. |
metricType | Metric type: PAPI, etc. |
metricMode | Metric mode: accumulative, fix, relative, etc. |
valueType | Type of the value: int64_t, uint64_t, or double. |
metricBase | The recorded values should be handled in this given base, either binary or decimal. This information can be used if the value needs to be scaled. |
exponent | The values inside the Metric events should be scaled by the factor base^exponent, to get the value in its base unit. For example, if the metric values come in as KiBi, than the base should be OTF2_BASE_BINARY and the exponent 10. Than the writer does not need to scale the values up to bytes, but can directly write the KiBi values into the Metric event. At reading time, the reader can apply the scaling factor to get the value in its base unit, ie. in bytes. |
unit | Unit of the metric. This needs to be the scale free base unit, ie. "bytes", "operations", or "seconds". In particular this unit should not have any scale prefix. References a String definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteParameter | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_ParameterRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_ParameterType | parameterType | ||
) |
Writes a Parameter definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Parameter definition. |
name | Name of the parameter (variable name etc.) References a String definition. |
parameterType | Type of the parameter, OTF2_ParameterType for possible types. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteRegion | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_RegionRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_StringRef | canonicalName, | ||
OTF2_StringRef | description, | ||
OTF2_RegionRole | regionRole, | ||
OTF2_Paradigm | paradigm, | ||
OTF2_RegionFlag | regionFlags, | ||
OTF2_StringRef | sourceFile, | ||
uint32_t | beginLineNumber, | ||
uint32_t | endLineNumber | ||
) |
Writes a Region definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this Region definition. |
name | Name of the region (demangled name if available). References a String definition. |
canonicalName | Alternative name of the region (e.g. mangled name). References a String definition. Since version 1.1. |
description | A more detailed description of this region. References a String definition. |
regionRole | Region role. Since version 1.1. |
paradigm | Paradigm. Since version 1.1. |
regionFlags | Region flags. Since version 1.1. |
sourceFile | The source file where this region was declared. References a String definition. |
beginLineNumber | Starting line number of this region in the source file. |
endLineNumber | Ending line number of this region in the source file. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteRmaWin | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_RmaWinRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_CommRef | comm | ||
) |
Writes a RmaWin definition record into the GlobalDefWriter.
A window defines the communication context for any remote-memory access operation.
writerHandle | The writer handle. |
self | The unique identifier for this RmaWin definition. |
name | Name, e.g. 'GASPI Queue 1', 'NVidia Card 2', etc.. References a String definition. |
comm | Communicator object used to create the window. References a Comm definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteString | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_StringRef | self, | ||
const char * | string | ||
) |
Writes a String definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this String definition. |
string | The string, null terminated. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNode | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_SystemTreeNodeRef | self, | ||
OTF2_StringRef | name, | ||
OTF2_StringRef | className, | ||
OTF2_SystemTreeNodeRef | parent | ||
) |
Writes a SystemTreeNode definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
self | The unique identifier for this SystemTreeNode definition. |
name | Free form instance name of this node. References a String definition. |
className | Free form class name of this node References a String definition. |
parent | Parent id of this node. May be OTF2_UNDEFINED_SYSTEM_TREE_NODE to indicate that there is no parent. References a SystemTreeNode definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNodeDomain | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_SystemTreeNodeRef | systemTreeNode, | ||
OTF2_SystemTreeDomain | systemTreeDomain | ||
) |
Writes a SystemTreeNodeDomain definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
systemTreeNode | Parent SystemTreeNode definition to which this one is a supplementary definition. References a SystemTreeNode definition. |
OTF2_ErrorCode OTF2_GlobalDefWriter_WriteSystemTreeNodeProperty | ( | OTF2_GlobalDefWriter * | writerHandle, |
OTF2_SystemTreeNodeRef | systemTreeNode, | ||
OTF2_StringRef | name, | ||
OTF2_StringRef | value | ||
) |
Writes a SystemTreeNodeProperty definition record into the GlobalDefWriter.
writerHandle | The writer handle. |
systemTreeNode | Parent SystemTreeNode definition to which this one is a supplementary definition. References a SystemTreeNode definition. |
name | Name of the property. References a String definition. |
value | Property value. References a String definition. |