Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
internal/Otf2MessagePassingProfilingService.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* Otf2MessagePassingProfilingService.h (C) 2000-2025 */
9/* */
10/* Performance information for "message passing" in Otf2 format */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_STD_INTERNAL_OTF2MESSAGEPASSINGPROFILINGSERVICE_H
13#define ARCANE_STD_INTERNAL_OTF2MESSAGEPASSINGPROFILINGSERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/IMessagePassingProfilingService.h"
18#include "arcane/utils/String.h"
19
20#include "arcane/core/AbstractService.h"
21#include "arcane/core/ISubDomain.h"
22#include "arcane/core/ObserverPool.h"
23#include "arcane/core/VariableSynchronizerEventArgs.h"
24
25#include "arccore/message_passing/Stat.h"
26
27#include "arcane/std/internal/Otf2LibWrapper.h"
28#include "arcane/std/internal/Otf2MpiProfiling.h"
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33namespace Arcane
34{
35namespace MP = ::Arccore::MessagePassing;
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
43class Otf2MessagePassingProfilingService
44: public AbstractService
46{
47 public:
48
49 explicit Otf2MessagePassingProfilingService(const ServiceBuildInfo& sbi);
50 ~Otf2MessagePassingProfilingService() noexcept override;
51
52 void startProfiling() override;
53 void stopProfiling() override;
54 void printInfos(std::ostream& output) override;
55 String implName() override;
56
57 private:
58
59 void _updateFromBeginEntryPointEvt();
60 void _updateFromEndEntryPointEvt();
61 void _updateFromSynchronizeEvt(const VariableSynchronizerEventArgs& arg);
62
63 ISubDomain* m_sub_domain = nullptr;
64 Otf2LibWrapper m_otf2_wrapper;
65 Otf2MpiProfiling m_otf2_prof;
66 MP::IProfiler* m_prof_backup = nullptr;
67 ObserverPool m_observer;
68 EventObserverPool m_observer_pool;
69 String m_impl_name;
70 MP::IControlDispatcher* m_control_dispatcher = nullptr;
71};
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76} // namespace Arcane
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81#endif
AbstractService(const ServiceBuildInfo &)
Constructor from a ServiceBuildInfo.
Interface of a profiling service dedicated to "message passing".
Interface of the subdomain manager.
Definition ISubDomain.h:75
List of observers.
Wrapper class for OTF2 library functions.
void printInfos(std::ostream &output) override
Displays information from the profiling.
String implName() override
Gives the name of the service that implements the interface.
Implementation of the MPI operations interface. Decorates each MPI call with functions from the libra...
Structure containing the information to create a service.
Arguments for the event notifying a variable synchronization.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Namespace containing the types and declarations that manage the message-passing parallelism mechanism...