32 #ifndef OTF2_CALLBACKS_H
33 #define OTF2_CALLBACKS_H
197 ( * OTF2_MemoryAllocate )(
void* userData,
200 void** perBufferData,
201 uint64_t chunkSize );
231 void** perBufferData,
308 #define OTF2_COLLECTIVES_ROOT 0
357 uint32_t numberOfFiles );
393 uint32_t numberElements,
411 uint32_t numberElements,
430 const uint32_t* outElements,
448 uint32_t numberElements,
465 const uint32_t* inElements,
467 uint32_t outElements,
uint64_t OTF2_LocationRef
Type used to indicate a reference to a Location definition.
Definition: OTF2_GeneralDefinitions.h:139
void(* OTF2_Collectives_Release)(void *userData, OTF2_CollectiveContext *globalCommContext, OTF2_CollectiveContext *localCommContext)
Optionally called in OTF2_Archive_Close or OTF2_Reader_Close respectively.
Definition: OTF2_Callbacks.h:481
uint8_t OTF2_Type
Wrapper for enum OTF2_Type_enum.
Definition: OTF2_GeneralDefinitions.h:561
uint8_t OTF2_FileType
Wrapper for enum OTF2_FileType_enum.
Definition: OTF2_GeneralDefinitions.h:427
OTF2_CallbackCode(* OTF2_Collectives_GetRank)(void *userData, OTF2_CollectiveContext *commContext, uint32_t *rank)
Returns the rank of this OTF2_Archive objects in this communication context. A number between 0 and o...
Definition: OTF2_Callbacks.h:333
OTF2_PostFlushCallback otf2_post_flush
Callback which is called after a flush.
Definition: OTF2_Callbacks.h:150
OTF2_CallbackCode(* OTF2_Collectives_Gatherv)(void *userData, OTF2_CollectiveContext *commContext, const void *inData, uint32_t inElements, void *outData, const uint32_t *outElements, OTF2_Type type, uint32_t root)
Performs a gather collective on the given communication context where each ranks contribute different...
Definition: OTF2_Callbacks.h:425
OTF2_CallbackCode(* OTF2_Collectives_Barrier)(void *userData, OTF2_CollectiveContext *commContext)
Performs a barrier collective on the given communication context.
Definition: OTF2_Callbacks.h:379
Struct which holds all collective callbacks.
Definition: OTF2_Callbacks.h:490
OTF2_CallbackCode(* OTF2_Collectives_FreeLocalComm)(void *userData, OTF2_CollectiveContext *localCommContext)
Destroys the communication context previous created by the OTF2_Collectives_CreateLocalComm callback...
Definition: OTF2_Callbacks.h:368
Structure holding the flush callbacks.
Definition: OTF2_Callbacks.h:145
This header file provides general definitions which should be accessible in all internal and external...
OTF2_CallbackCode(* OTF2_Locking_Destroy)(void *userData, OTF2_Lock lock)
Destroys a locking object.
Definition: OTF2_Callbacks.h:576
uint64_t OTF2_TimeStamp
OTF2 time stamp.
Definition: OTF2_GeneralDefinitions.h:103
OTF2_CallbackCode(* OTF2_Collectives_CreateLocalComm)(void *userData, OTF2_CollectiveContext **localCommContext, OTF2_CollectiveContext *globalCommContext, uint32_t globalRank, uint32_t globalSize, uint32_t localRank, uint32_t localSize, uint32_t fileNumber, uint32_t numberOfFiles)
Create a new disjoint partitioning of the the globalCommContext communication context. numberOfFiles denotes the number of the partitions. fileNumber denotes in which of the partitions this OTF2_Archive should belong. localSize is the size of this partition and localRank the rank of this OTF2_Archive in the partition.
Definition: OTF2_Callbacks.h:349
uint8_t OTF2_FlushType
Defines whether the recorded data is flushed to a file or not. Please see OTF2_FlushType_enum for a d...
Definition: OTF2_GeneralDefinitions.h:367
void *(* OTF2_MemoryAllocate)(void *userData, OTF2_FileType fileType, OTF2_LocationRef location, void **perBufferData, uint64_t chunkSize)
Function pointer for allocating memory for chunks.
Definition: OTF2_Callbacks.h:197
void(* OTF2_MemoryFreeAll)(void *userData, OTF2_FileType fileType, OTF2_LocationRef location, void **perBufferData, bool final)
Function pointer to release all allocated chunks.
Definition: OTF2_Callbacks.h:228
OTF2_CallbackCode
Return value to indicate that the record reading should be interrupted.
Definition: OTF2_GeneralDefinitions.h:344
struct OTF2_LockObject * OTF2_Lock
Opaque type for a locking object.
Definition: OTF2_Callbacks.h:545
OTF2_CallbackCode(* OTF2_Collectives_Bcast)(void *userData, OTF2_CollectiveContext *commContext, void *data, uint32_t numberElements, OTF2_Type type, uint32_t root)
Performs a broadcast collective on the given communication context.
Definition: OTF2_Callbacks.h:390
OTF2_CallbackCode(* OTF2_Collectives_GetSize)(void *userData, OTF2_CollectiveContext *commContext, uint32_t *size)
Returns the number of OTF2_Archive objects operating in this communication context.
Definition: OTF2_Callbacks.h:319
Struct which holds all locking callbacks.
Definition: OTF2_Callbacks.h:636
OTF2_MemoryFreeAll otf2_free_all
Callback which is called to release all previous allocated chunks.
Definition: OTF2_Callbacks.h:244
OTF2_PreFlushCallback otf2_pre_flush
Callback which is called prior a flush.
Definition: OTF2_Callbacks.h:148
OTF2_CallbackCode(* OTF2_Locking_Unlock)(void *userData, OTF2_Lock lock)
Unlocks a locking object.
Definition: OTF2_Callbacks.h:608
OTF2_CallbackCode(* OTF2_Collectives_Scatterv)(void *userData, OTF2_CollectiveContext *commContext, const void *inData, const uint32_t *inElements, void *outData, uint32_t outElements, OTF2_Type type, uint32_t root)
Performs a scatter collective on the given communication context where each ranks contribute differen...
Definition: OTF2_Callbacks.h:462
OTF2_MemoryAllocate otf2_allocate
Callback which is called to allocate a new chunk.
Definition: OTF2_Callbacks.h:242
OTF2_CallbackCode(* OTF2_Collectives_Gather)(void *userData, OTF2_CollectiveContext *commContext, const void *inData, void *outData, uint32_t numberElements, OTF2_Type type, uint32_t root)
Performs a gather collective on the given communication context where each ranks contribute the same ...
Definition: OTF2_Callbacks.h:407
Structure holding the memory callbacks.
Definition: OTF2_Callbacks.h:239
struct OTF2_CollectiveContext OTF2_CollectiveContext
User provided type for collective groups.
Definition: OTF2_Callbacks.h:303
OTF2_CallbackCode(* OTF2_Locking_Lock)(void *userData, OTF2_Lock lock)
Locks a locking object.
Definition: OTF2_Callbacks.h:592
void(* OTF2_Locking_Release)(void *userData)
Signals the end of life of the OTF2_Archive or OTF2_Reader object to the locking callbacks.
Definition: OTF2_Callbacks.h:629
OTF2_CallbackCode(* OTF2_Locking_Create)(void *userData, OTF2_Lock *lock)
Creates a new locking object.
Definition: OTF2_Callbacks.h:560
Error codes and error handling.
OTF2_TimeStamp(* OTF2_PostFlushCallback)(void *userData, OTF2_FileType fileType, OTF2_LocationRef location)
Definition for the post flush callback.
Definition: OTF2_Callbacks.h:133
OTF2_FlushType(* OTF2_PreFlushCallback)(void *userData, OTF2_FileType fileType, OTF2_LocationRef location, void *callerData, bool final)
Definition for the pre flush callback.
Definition: OTF2_Callbacks.h:110
OTF2_CallbackCode(* OTF2_Collectives_Scatter)(void *userData, OTF2_CollectiveContext *commContext, const void *inData, void *outData, uint32_t numberElements, OTF2_Type type, uint32_t root)
Performs a scatter collective on the given communication context where each ranks contribute the same...
Definition: OTF2_Callbacks.h:444