Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Otf2LibWrapper Class Reference

Wrapper class for OTF2 library functions. More...

#include <arcane/std/internal/Otf2LibWrapper.h>

Collaboration diagram for Arcane::Otf2LibWrapper:

Classes

struct  EntryPointId
struct  InternalIds

Public Member Functions

 Otf2LibWrapper (ISubDomain *sub_domain)
 Constructor.
 ~Otf2LibWrapper ()
 Destructor.
void init (const String &archive_name)
 Initialization method. Allows defining the path where the archive will be found, as well as its name.
void finalize ()
 Method to call to finalize the archive creation (i.e., we no longer want to record events).
OTF2_EvtWriter * getEventWriter ()
uint32_t getEntryPointId (const String &ep_name) const
 Helper for the ID of an entry point via its name.
uint32_t getApplicationNameId () const
 Helper for the application name.
uint32_t getSynchronizeId () const
 Helper for the string "synchronize".
int getMpiRank () const
 Helper for the MPI rank number.
int getMpiNbRank () const
 Helper for the number of MPI ranks.

Static Public Member Functions

static OTF2_TimeStamp getTime ()
 Internal static method to retrieve the timestamp.

Private Member Functions

void _createOtf2Ids ()
void _buildOtf2ClockAndStringDefinition (uint64_t global_start_time, uint64_t global_end_time)
void _buildOtf2ParadigmAndSystemDefinition ()
void _buildOtf2LocationDefinition ()
 Internal method to write the system definition associated with the otf2 archive.
void _buildOtf2RegionDefinition ()
void _buildOtf2GroupAndCommDefinition ()

Static Private Member Functions

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.
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.

Private Attributes

ISubDomainm_sub_domain = nullptr
OTF2_Archive * m_archive = nullptr
OTF2_FlushCallbacks m_flush_callbacks
OTF2_EvtWriter * m_evt_writer = nullptr
uint64_t m_evt_nb = 0
OTF2_GlobalDefWriter * m_global_def_writer = nullptr
InternalIds m_id
std::vector< uint64_t > m_comm_members

Static Private Attributes

static uint64_t s_epoch_start = 0
 Static member.

Detailed Description

Wrapper class for OTF2 library functions.

Definition at line 41 of file Otf2LibWrapper.h.

Constructor & Destructor Documentation

◆ Otf2LibWrapper()

Arcane::Otf2LibWrapper::Otf2LibWrapper ( ISubDomain * sub_domain)

Constructor.

Definition at line 51 of file Otf2LibWrapper.cc.

References _postFlush(), and _preFlush().

Here is the call graph for this function:

◆ ~Otf2LibWrapper()

Arcane::Otf2LibWrapper::~Otf2LibWrapper ( )

Destructor.

Definition at line 63 of file Otf2LibWrapper.cc.

Member Function Documentation

◆ _buildOtf2ClockAndStringDefinition()

void Arcane::Otf2LibWrapper::_buildOtf2ClockAndStringDefinition ( uint64_t global_start_time,
uint64_t global_end_time )
private

Internal method for creating the set of strings used in the definitions necessary for the OTF2 archive. Must be called at the beginning of archiving

Definition at line 347 of file Otf2LibWrapper.cc.

References Arcane::Platform::getHostName(), and Arcane::String::localstr().

Referenced by finalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _buildOtf2GroupAndCommDefinition()

void Arcane::Otf2LibWrapper::_buildOtf2GroupAndCommDefinition ( )
private

Internal method to define the regions associated with otf2 events Must be called at the end of archiving This method actually writes the info into the definition file

Definition at line 811 of file Otf2LibWrapper.cc.

Referenced by finalize().

Here is the caller graph for this function:

◆ _buildOtf2LocationDefinition()

void Arcane::Otf2LibWrapper::_buildOtf2LocationDefinition ( )
private

Internal method to write the system definition associated with the otf2 archive.

Definition at line 550 of file Otf2LibWrapper.cc.

References Arcane::Array< T >::at().

Referenced by finalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _buildOtf2ParadigmAndSystemDefinition()

void Arcane::Otf2LibWrapper::_buildOtf2ParadigmAndSystemDefinition ( )
private

Internal method to define the regions associated with otf2 events Must be called at the end of archiving

Definition at line 524 of file Otf2LibWrapper.cc.

Referenced by finalize().

Here is the caller graph for this function:

◆ _buildOtf2RegionDefinition()

void Arcane::Otf2LibWrapper::_buildOtf2RegionDefinition ( )
private

Internal method to define the regions associated with otf2 events Must be called at the end of archiving

Definition at line 586 of file Otf2LibWrapper.cc.

Referenced by finalize().

Here is the caller graph for this function:

◆ _createOtf2Ids()

void Arcane::Otf2LibWrapper::_createOtf2Ids ( )
private

Internal method for creating naming identifiers for the definitions necessary for the OTF2 archive. Must be called in init

Definition at line 292 of file Otf2LibWrapper.cc.

Referenced by init().

Here is the caller graph for this function:

◆ _postFlush()

OTF2_TimeStamp Arcane::Otf2LibWrapper::_postFlush ( void * user_data,
OTF2_FileType file_type,
OTF2_LocationRef location )
staticprivate

Internal static method to set the callback to be called after the event is recorded.

Definition at line 278 of file Otf2LibWrapper.cc.

References getTime().

Referenced by Otf2LibWrapper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _preFlush()

OTF2_FlushType Arcane::Otf2LibWrapper::_preFlush ( void * user_data,
OTF2_FileType file_type,
OTF2_LocationRef location,
void * caller_data,
bool final )
staticprivate

Internal static method to set the callback to be called before the event is recorded.

Definition at line 263 of file Otf2LibWrapper.cc.

Referenced by Otf2LibWrapper().

Here is the caller graph for this function:

◆ finalize()

void Arcane::Otf2LibWrapper::finalize ( )

Method to call to finalize the archive creation (i.e., we no longer want to record events).

Definition at line 137 of file Otf2LibWrapper.cc.

References _buildOtf2ClockAndStringDefinition(), _buildOtf2GroupAndCommDefinition(), _buildOtf2LocationDefinition(), _buildOtf2ParadigmAndSystemDefinition(), _buildOtf2RegionDefinition(), and getTime().

Here is the call graph for this function:

◆ getApplicationNameId()

uint32_t Arcane::Otf2LibWrapper::getApplicationNameId ( ) const

Helper for the application name.

Definition at line 230 of file Otf2LibWrapper.cc.

◆ getEntryPointId()

uint32_t Arcane::Otf2LibWrapper::getEntryPointId ( const String & ep_name) const

Helper for the ID of an entry point via its name.

Definition at line 197 of file Otf2LibWrapper.cc.

References ARCANE_FATAL.

◆ getEventWriter()

OTF2_EvtWriter * Arcane::Otf2LibWrapper::getEventWriter ( )

Accessor for the internal otf2 event writer. Increments an internal event counter on each call.

Definition at line 186 of file Otf2LibWrapper.cc.

◆ getMpiNbRank()

int Arcane::Otf2LibWrapper::getMpiNbRank ( ) const

Helper for the number of MPI ranks.

Definition at line 220 of file Otf2LibWrapper.cc.

◆ getMpiRank()

int Arcane::Otf2LibWrapper::getMpiRank ( ) const

Helper for the MPI rank number.

Definition at line 210 of file Otf2LibWrapper.cc.

◆ getSynchronizeId()

uint32_t Arcane::Otf2LibWrapper::getSynchronizeId ( ) const

Helper for the string "synchronize".

Definition at line 240 of file Otf2LibWrapper.cc.

◆ getTime()

◆ init()

void Arcane::Otf2LibWrapper::init ( const String & archive_name)

Initialization method. Allows defining the path where the archive will be found, as well as its name.

Definition at line 75 of file Otf2LibWrapper.cc.

References _createOtf2Ids(), ARCANE_FATAL, getTime(), Arcane::String::localstr(), and s_epoch_start.

Here is the call graph for this function:

Member Data Documentation

◆ m_archive

OTF2_Archive* Arcane::Otf2LibWrapper::m_archive = nullptr
private

Definition at line 126 of file Otf2LibWrapper.h.

◆ m_comm_members

std::vector<uint64_t> Arcane::Otf2LibWrapper::m_comm_members
private

Definition at line 133 of file Otf2LibWrapper.h.

◆ m_evt_nb

uint64_t Arcane::Otf2LibWrapper::m_evt_nb = 0
private

Definition at line 129 of file Otf2LibWrapper.h.

◆ m_evt_writer

OTF2_EvtWriter* Arcane::Otf2LibWrapper::m_evt_writer = nullptr
private

Definition at line 128 of file Otf2LibWrapper.h.

◆ m_flush_callbacks

OTF2_FlushCallbacks Arcane::Otf2LibWrapper::m_flush_callbacks
private

Definition at line 127 of file Otf2LibWrapper.h.

◆ m_global_def_writer

OTF2_GlobalDefWriter* Arcane::Otf2LibWrapper::m_global_def_writer = nullptr
private

Definition at line 130 of file Otf2LibWrapper.h.

◆ m_id

InternalIds Arcane::Otf2LibWrapper::m_id
private

Definition at line 132 of file Otf2LibWrapper.h.

◆ m_sub_domain

ISubDomain* Arcane::Otf2LibWrapper::m_sub_domain = nullptr
private

Definition at line 125 of file Otf2LibWrapper.h.

◆ s_epoch_start

uint64_t Arcane::Otf2LibWrapper::s_epoch_start = 0
staticprivate

Static member.

Definition at line 131 of file Otf2LibWrapper.h.

Referenced by getTime(), and init().


The documentation for this class was generated from the following files: