12#ifndef ARCANE_STD_OTF2LIBWRAPPER_H
13#define ARCANE_STD_OTF2LIBWRAPPER_H
19#include "arcane/utils/String.h"
21#include "arcane/core/ISubDomain.h"
58 static OTF2_TimeStamp
getTime();
69 static OTF2_FlushType
_preFlush(
void* user_data, OTF2_FileType file_type, OTF2_LocationRef location,
void* caller_data,
bool final);
70 static OTF2_TimeStamp
_postFlush(
void* user_data, OTF2_FileType file_type, OTF2_LocationRef location);
86 using is_transparent = void;
87 bool operator()(
const EntryPointId& lhs,
const EntryPointId& rhs)
const
89 return lhs.m_name < rhs.m_name;
91 bool operator()(
const String& name,
const EntryPointId& ep_id)
const
93 return name < ep_id.m_name;
95 bool operator()(
const EntryPointId& ep_id,
const String& name)
const
97 return ep_id.m_name < name;
107 uint32_t m_desc_offset;
109 uint32_t m_thread_id;
110 uint32_t m_hostname_id;
112 uint32_t m_comm_world_id;
116 uint32_t m_comm_self_id;
120 uint32_t m_rank_offset;
121 std::set<EntryPointId, EntryPointId::EntryPointIdCompare> m_ep_id_set;
126 OTF2_Archive* m_archive =
nullptr;
127 OTF2_FlushCallbacks m_flush_callbacks;
128 OTF2_EvtWriter* m_evt_writer =
nullptr;
129 uint64_t m_evt_nb = 0;
130 OTF2_GlobalDefWriter* m_global_def_writer =
nullptr;
133 std::vector<uint64_t> m_comm_members;
Declarations of types for the 'base' component of Arccore.
Interface of the subdomain manager.
Otf2LibWrapper(ISubDomain *sub_domain)
Constructor.
~Otf2LibWrapper()
Destructor.
void _buildOtf2ClockAndStringDefinition(uint64_t global_start_time, uint64_t global_end_time)
void _buildOtf2GroupAndCommDefinition()
static uint64_t s_epoch_start
Static member.
void init(const String &archive_name)
Initialization method. Allows defining the path where the archive will be found, as well as its name.
void _buildOtf2ParadigmAndSystemDefinition()
uint32_t getApplicationNameId() const
Helper for the application name.
OTF2_EvtWriter * getEventWriter()
int getMpiNbRank() const
Helper for the number of MPI ranks.
void _buildOtf2LocationDefinition()
Internal method to write the system definition associated with the otf2 archive.
static OTF2_TimeStamp getTime()
Internal static method to retrieve the timestamp.
void finalize()
Method to call to finalize the archive creation (i.e., we no longer want to record events).
static OTF2_TimeStamp _postFlush(void *user_data, OTF2_FileType file_type, OTF2_LocationRef location)
Internal static method to set the callback to be called after the event is recorded.
static OTF2_FlushType _preFlush(void *user_data, OTF2_FileType file_type, OTF2_LocationRef location, void *caller_data, bool final)
Internal static method to set the callback to be called before the event is recorded.
int getMpiRank() const
Helper for the MPI rank number.
void _buildOtf2RegionDefinition()
uint32_t getEntryPointId(const String &ep_name) const
Helper for the ID of an entry point via its name.
uint32_t getSynchronizeId() const
Helper for the string "synchronize".
Unicode character string.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.