Arcane  v3.15.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
NoMpiProfiling.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* NoMpiProfiling.h (C) 2000-2025 */
9/* */
10/* Implementation de l'interface IMpiProfiling. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSINGMPI_NOMPIPROFILING_H
13#define ARCCORE_MESSAGEPASSINGMPI_NOMPIPROFILING_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
18#include "arccore/message_passing_mpi/IMpiProfiling.h"
19#include "arccore/message_passing/Request.h"
20#include "arccore/collections/CollectionsGlobal.h"
22
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
26namespace Arcane::MessagePassing::Mpi
27{
28
29/*---------------------------------------------------------------------------*/
30/*---------------------------------------------------------------------------*/
36class ARCCORE_MESSAGEPASSINGMPI_EXPORT NoMpiProfiling
37: public IMpiProfiling
38{
39 public:
40 NoMpiProfiling() = default;
41 virtual ~NoMpiProfiling() = default;
42
43 ReturnType _ret(int r)
44 {
45 return (ReturnType)(r);
46 }
47
48 public:
49 // Bcast
50 ReturnType broadcast(void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) final
51 {
52 return _ret(MPI_Bcast(buffer, count, datatype, root, comm));
53 }
54 // Gather
55 ReturnType gather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
56 int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) final
57 {
59 }
60 // Gatherv
61 ReturnType gatherVariable(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
62 const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm) final
63 {
65 }
66 // allGather
67 ReturnType allGather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
69 {
71 }
72 // Allgatherv
73 ReturnType allGatherVariable(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
74 const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm) final
75 {
77 }
78 // Scatterv
79 ReturnType scatterVariable(const void* sendbuf, const int* sendcounts, const int* displs,
81 int root, MPI_Comm comm) final
82 {
84 }
85 // Alltoall
86 ReturnType allToAll(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
88 {
90 }
91 // Alltoallv
92 ReturnType allToAllVariable(const void* sendbuf, const int* sendcounts, const int* sdispls,
93 MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
94 const int* rdispls, MPI_Datatype recvtype, MPI_Comm comm) final
95 {
97 }
98 // Barrier
99 ReturnType barrier(MPI_Comm comm) final
100 {
101 return _ret(MPI_Barrier(comm));
102 }
103 // Reduce
104 ReturnType reduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
105 MPI_Op op, int root, MPI_Comm comm) final
106 {
107 return _ret(MPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm));
108 }
109 // Allreduce
110 ReturnType allReduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
111 MPI_Op op, MPI_Comm comm) final
112 {
113 return _ret(MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm));
114 }
115 // Scan
116 ReturnType scan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final
117 {
118 return _ret(MPI_Scan(sendbuf, recvbuf, count, datatype, op, comm));
119 }
120 // Sendrecv
121 ReturnType sendRecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int dest,
123 int source, int recvtag, MPI_Comm comm, MPI_Status* status) final
124 {
126 source, recvtag, comm, status));
127 }
128 // Isend
129 ReturnType iSend(const void* buf, int count, MPI_Datatype datatype, int dest, int tag,
130 MPI_Comm comm, MPI_Request* request) final
131 {
132 return _ret(MPI_Isend(buf, count, datatype, dest, tag, comm, request));
133 }
134 // Send
135 ReturnType send(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) final
136 {
137 return _ret(MPI_Send(buf, count, datatype, dest, tag, comm));
138 }
139 // Irecv
140 ReturnType iRecv(void* buf, int count, MPI_Datatype datatype, int source, int tag,
141 MPI_Comm comm, MPI_Request* request) final
142 {
143 return _ret(MPI_Irecv(buf, count, datatype, source, tag, comm, request));
144 }
145 // recv
146 ReturnType recv(void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status) final
147 {
148 return _ret(MPI_Recv(buf, count, datatype, source, tag, comm, status));
149 }
150 // Test
151 ReturnType test(MPI_Request* request, int* flag, MPI_Status* status) final
152 {
153 return _ret(MPI_Test(request, flag, status));
154 }
155 // Probe
156 ReturnType probe(int source, int tag, MPI_Comm comm, MPI_Status* status) final
157 {
158 return _ret(MPI_Probe(source, tag, comm, status));
159 }
160 // Get_count
161 ReturnType getCount(const MPI_Status* status, MPI_Datatype datatype, int* count) final
162 {
163 return _ret(MPI_Get_count(status, datatype, count));
164 }
165 // Wait
166 ReturnType wait(MPI_Request* request, MPI_Status* status) final
167 {
168 return _ret(MPI_Wait(request, status));
169 }
170 // Waitall
172 {
173 return _ret(MPI_Waitall(count, array_of_requests, array_of_statuses));
174 }
175 // Testsome
178 {
180 }
181 // Waitsome
184 {
186 }
187};
188
189/*---------------------------------------------------------------------------*/
190/*---------------------------------------------------------------------------*/
191
192} // namespace Arccore::MessagePassing::Mpi
193
194/*---------------------------------------------------------------------------*/
195/*---------------------------------------------------------------------------*/
196
197#endif
Déclarations des types de la composante 'base' de Arccore.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:149
Interface d'abstraction pour les operations MPI. Sert principalement a utiliser un decorateur pour le...
Implementation de l'interface des operations MPI. Correspond a un simple appel aux fonctions MPI du m...