Arcane  4.2.3.0
Developer documentation
Loading...
Searching...
No Matches
MpiControlDispatcher.cc
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/* MpiControlDispatcher.cc (C) 2000-2025 */
9/* */
10/* Manage Control/Utility parallel messages for MPI. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arccore/message_passing_mpi/internal/MpiControlDispatcher.h"
15
16//#include "arccore/message_passing_mpi/MpiMessagePassingMng.h"
17#include "arccore/message_passing_mpi/internal/MpiAdapter.h"
18#include "arccore/message_passing_mpi/internal/MpiRequestList.h"
19
20#include "arccore/message_passing/Request.h"
21#include "arccore/message_passing/IMessagePassingMng.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane::MessagePassing::Mpi
28{
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
31
32MpiControlDispatcher::
33MpiControlDispatcher(MpiAdapter* adapter, IMessagePassingMng* mpm)
34: m_adapter(adapter)
35, m_message_passing_mng(mpm)
36{
37}
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
41
42void MpiControlDispatcher::
43waitAllRequests(ArrayView<Request> requests)
44{
45 m_adapter->waitAllRequests(requests);
46}
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
51void MpiControlDispatcher::
52waitSomeRequests(ArrayView<Request> requests,
53 ArrayView<bool> indexes,
54 bool is_non_blocking)
55{
56 m_adapter->waitSomeRequests(requests, indexes, is_non_blocking);
57}
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
62IMessagePassingMng* MpiControlDispatcher::
63commSplit(bool keep)
64{
65 return m_adapter->commSplit(keep);
66}
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71Ref<IMessagePassingMng> MpiControlDispatcher::
72splitCommunicator(bool keep)
73{
74 IMessagePassingMng* mpm = m_adapter->commSplit(keep);
75 return makeRef(mpm);
76}
77
78/*---------------------------------------------------------------------------*/
79/*---------------------------------------------------------------------------*/
80
81void MpiControlDispatcher::
82barrier()
83{
84 m_adapter->barrier();
85}
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90Request MpiControlDispatcher::
91nonBlockingBarrier()
92{
93 return m_adapter->nonBlockingBarrier();
94}
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98
99MessageId MpiControlDispatcher::
100probe(const PointToPointMessageInfo& message)
101{
102 return m_adapter->probeMessage(message);
103}
104
105/*---------------------------------------------------------------------------*/
106/*---------------------------------------------------------------------------*/
107
108MessageSourceInfo MpiControlDispatcher::
109legacyProbe(const PointToPointMessageInfo& message)
110{
111 return m_adapter->legacyProbeMessage(message);
112}
113
114/*---------------------------------------------------------------------------*/
115/*---------------------------------------------------------------------------*/
116
117IProfiler* MpiControlDispatcher::
118profiler() const
119{
120 return m_adapter->profiler();
121}
122
123/*---------------------------------------------------------------------------*/
124/*---------------------------------------------------------------------------*/
125
126void MpiControlDispatcher::
127setProfiler(IProfiler* p)
128{
129 m_adapter->setProfiler(p);
130}
131
132/*---------------------------------------------------------------------------*/
133/*---------------------------------------------------------------------------*/
134
135Ref<IRequestList> MpiControlDispatcher::
136createRequestListRef()
137{
138 return createRef<MpiRequestList>(m_adapter);
139}
140
141/*---------------------------------------------------------------------------*/
142/*---------------------------------------------------------------------------*/
143
144} // namespace Arcane::MessagePassing::Mpi
145
146/*---------------------------------------------------------------------------*/
147/*---------------------------------------------------------------------------*/
Brief list of message exchange functions.
Interface of the message passing manager.
Reference to an instance.
Ref< TrueType > createRef(Args &&... args)
Creates an instance of type TrueType with arguments Args and returns a reference to it.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.