Wrapper class for OTF2 library functions. More...
#include <arcane/std/internal/Otf2LibWrapper.h>
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 | |
| ISubDomain * | m_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. | |
Wrapper class for OTF2 library functions.
Definition at line 41 of file Otf2LibWrapper.h.
| Arcane::Otf2LibWrapper::Otf2LibWrapper | ( | ISubDomain * | sub_domain | ) |
Constructor.
Definition at line 51 of file Otf2LibWrapper.cc.
References _postFlush(), and _preFlush().
| Arcane::Otf2LibWrapper::~Otf2LibWrapper | ( | ) |
Destructor.
Definition at line 63 of file Otf2LibWrapper.cc.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
| 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().
| uint32_t Arcane::Otf2LibWrapper::getApplicationNameId | ( | ) | const |
Helper for the application name.
Definition at line 230 of file Otf2LibWrapper.cc.
| 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.
| 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.
| int Arcane::Otf2LibWrapper::getMpiNbRank | ( | ) | const |
Helper for the number of MPI ranks.
Definition at line 220 of file Otf2LibWrapper.cc.
| int Arcane::Otf2LibWrapper::getMpiRank | ( | ) | const |
Helper for the MPI rank number.
Definition at line 210 of file Otf2LibWrapper.cc.
| uint32_t Arcane::Otf2LibWrapper::getSynchronizeId | ( | ) | const |
Helper for the string "synchronize".
Definition at line 240 of file Otf2LibWrapper.cc.
|
static |
Internal static method to retrieve the timestamp.
Definition at line 250 of file Otf2LibWrapper.cc.
References s_epoch_start.
Referenced by _postFlush(), Arcane::Otf2MpiProfiling::allGather(), Arcane::Otf2MpiProfiling::allGatherVariable(), Arcane::Otf2MpiProfiling::allReduce(), Arcane::Otf2MpiProfiling::allToAll(), Arcane::Otf2MpiProfiling::allToAllVariable(), Arcane::Otf2MpiProfiling::barrier(), Arcane::Otf2MpiProfiling::broadcast(), finalize(), Arcane::Otf2MpiProfiling::gather(), Arcane::Otf2MpiProfiling::gatherVariable(), init(), Arcane::Otf2MpiProfiling::iSend(), Arcane::Otf2MpiProfiling::recv(), Arcane::Otf2MpiProfiling::reduce(), Arcane::Otf2MpiProfiling::scan(), Arcane::Otf2MpiProfiling::scatterVariable(), Arcane::Otf2MpiProfiling::send(), Arcane::Otf2MessagePassingProfilingService::startProfiling(), Arcane::Otf2MessagePassingProfilingService::stopProfiling(), and Arcane::Otf2MpiProfiling::test().
| 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.
|
private |
Definition at line 126 of file Otf2LibWrapper.h.
|
private |
Definition at line 133 of file Otf2LibWrapper.h.
|
private |
Definition at line 129 of file Otf2LibWrapper.h.
|
private |
Definition at line 128 of file Otf2LibWrapper.h.
|
private |
Definition at line 127 of file Otf2LibWrapper.h.
|
private |
Definition at line 130 of file Otf2LibWrapper.h.
|
private |
Definition at line 132 of file Otf2LibWrapper.h.
|
private |
Definition at line 125 of file Otf2LibWrapper.h.
|
staticprivate |
Static member.
Definition at line 131 of file Otf2LibWrapper.h.