Arcane  4.2.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-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/* NoMpiProfiling.h (C) 2000-2026 */
9/* */
10/* Implementation de l'interface IMpiProfiling. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSINGMPI_INTERNAL_NOMPIPROFILING_H
13#define ARCCORE_MESSAGEPASSINGMPI_INTERNAL_NOMPIPROFILING_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
18#include "arccore/message_passing_mpi/internal/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 {
58 return _ret(MPI_Gather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm));
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 {
64 return _ret(MPI_Gatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm));
65 }
66 // allGather
67 ReturnType allGather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
68 int recvcount, MPI_Datatype recvtype, MPI_Comm comm) final
69 {
70 return _ret(MPI_Allgather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm));
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 {
76 return _ret(MPI_Allgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm));
77 }
78 // Scatterv
79 ReturnType scatterVariable(const void* sendbuf, const int* sendcounts, const int* displs,
80 MPI_Datatype sendtype, void* recvbuf, int recvcount, MPI_Datatype recvtype,
81 int root, MPI_Comm comm) final
82 {
83 return _ret(MPI_Scatterv(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm));
84 }
85 // Alltoall
86 ReturnType allToAll(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
87 int recvcount, MPI_Datatype recvtype, MPI_Comm comm) final
88 {
89 return _ret(MPI_Alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm));
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 {
96 return _ret(MPI_Alltoallv(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm));
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 // Scan exclusif
121 ReturnType scanExclusive(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final
122 {
123 return _ret(MPI_Exscan(sendbuf, recvbuf, count, datatype, op, comm));
124 }
125 // Sendrecv
126 ReturnType sendRecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int dest,
127 int sendtag, void* recvbuf, int recvcount, MPI_Datatype recvtype,
128 int source, int recvtag, MPI_Comm comm, MPI_Status* status) final
129 {
130 return _ret(MPI_Sendrecv(sendbuf, sendcount, sendtype, dest, sendtag, recvbuf, recvcount, recvtype,
131 source, recvtag, comm, status));
132 }
133 // Isend
134 ReturnType iSend(const void* buf, int count, MPI_Datatype datatype, int dest, int tag,
135 MPI_Comm comm, MPI_Request* request) final
136 {
137 return _ret(MPI_Isend(buf, count, datatype, dest, tag, comm, request));
138 }
139 // Send
140 ReturnType send(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) final
141 {
142 return _ret(MPI_Send(buf, count, datatype, dest, tag, comm));
143 }
144 // Irecv
145 ReturnType iRecv(void* buf, int count, MPI_Datatype datatype, int source, int tag,
146 MPI_Comm comm, MPI_Request* request) final
147 {
148 return _ret(MPI_Irecv(buf, count, datatype, source, tag, comm, request));
149 }
150 // recv
151 ReturnType recv(void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status) final
152 {
153 return _ret(MPI_Recv(buf, count, datatype, source, tag, comm, status));
154 }
155 // Test
156 ReturnType test(MPI_Request* request, int* flag, MPI_Status* status) final
157 {
158 return _ret(MPI_Test(request, flag, status));
159 }
160 // Probe
161 ReturnType probe(int source, int tag, MPI_Comm comm, MPI_Status* status) final
162 {
163 return _ret(MPI_Probe(source, tag, comm, status));
164 }
165 // Get_count
166 ReturnType getCount(const MPI_Status* status, MPI_Datatype datatype, int* count) final
167 {
168 return _ret(MPI_Get_count(status, datatype, count));
169 }
170 // Wait
171 ReturnType wait(MPI_Request* request, MPI_Status* status) final
172 {
173 return _ret(MPI_Wait(request, status));
174 }
175 // Waitall
176 ReturnType waitAll(int count, MPI_Request* array_of_requests, MPI_Status* array_of_statuses) final
177 {
178 return _ret(MPI_Waitall(count, array_of_requests, array_of_statuses));
179 }
180 // Testsome
181 ReturnType testSome(int incount, MPI_Request* array_of_requests, int* outcount,
182 int* array_of_indices, MPI_Status* array_of_statuses) final
183 {
184 return _ret(MPI_Testsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses));
185 }
186 // Waitsome
187 ReturnType waitSome(int incount, MPI_Request* array_of_requests, int* outcount,
188 int* array_of_indices, MPI_Status* array_of_statuses) final
189 {
190 return _ret(MPI_Waitsome(incount, array_of_requests, outcount, array_of_indices, array_of_statuses));
191 }
192};
193
194/*---------------------------------------------------------------------------*/
195/*---------------------------------------------------------------------------*/
196
197} // namespace Arcane::MessagePassing::Mpi
198
199/*---------------------------------------------------------------------------*/
200/*---------------------------------------------------------------------------*/
201
202#endif
Déclarations des types de la composante 'base' de Arccore.