Arcane  v3.14.10.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-2022 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-2018 */
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
19#include "arccore/message_passing_mpi/IMpiProfiling.h"
20
21#include "arccore/message_passing/Request.h"
22
23#include "arccore/collections/CollectionsGlobal.h"
24
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30namespace Arccore::MessagePassing::Mpi
31{
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
40class ARCCORE_MESSAGEPASSINGMPI_EXPORT NoMpiProfiling
41: public IMpiProfiling
42{
43 public:
44 NoMpiProfiling() = default;
45 virtual ~NoMpiProfiling() = default;
46
47 ReturnType _ret(int r)
48 {
49 return (ReturnType)(r);
50 }
51
52 public:
53 // Bcast
54 ReturnType broadcast(void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) final
55 {
56 return _ret(MPI_Bcast(buffer, count, datatype, root, comm));
57 }
58 // Gather
59 ReturnType gather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
60 int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) final
61 {
63 }
64 // Gatherv
65 ReturnType gatherVariable(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
66 const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm) final
67 {
69 }
70 // allGather
71 ReturnType allGather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
73 {
75 }
76 // Allgatherv
77 ReturnType allGatherVariable(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
78 const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm) final
79 {
81 }
82 // Scatterv
83 ReturnType scatterVariable(const void* sendbuf, const int* sendcounts, const int* displs,
85 int root, MPI_Comm comm) final
86 {
88 }
89 // Alltoall
90 ReturnType allToAll(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf,
92 {
94 }
95 // Alltoallv
96 ReturnType allToAllVariable(const void* sendbuf, const int* sendcounts, const int* sdispls,
97 MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
98 const int* rdispls, MPI_Datatype recvtype, MPI_Comm comm) final
99 {
101 }
102 // Barrier
103 ReturnType barrier(MPI_Comm comm) final
104 {
105 return _ret(MPI_Barrier(comm));
106 }
107 // Reduce
108 ReturnType reduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
109 MPI_Op op, int root, MPI_Comm comm) final
110 {
111 return _ret(MPI_Reduce(sendbuf, recvbuf, count, datatype, op, root, comm));
112 }
113 // Allreduce
114 ReturnType allReduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
115 MPI_Op op, MPI_Comm comm) final
116 {
117 return _ret(MPI_Allreduce(sendbuf, recvbuf, count, datatype, op, comm));
118 }
119 // Scan
120 ReturnType scan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final
121 {
122 return _ret(MPI_Scan(sendbuf, recvbuf, count, datatype, op, comm));
123 }
124 // Sendrecv
125 ReturnType sendRecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int dest,
127 int source, int recvtag, MPI_Comm comm, MPI_Status* status) final
128 {
130 source, recvtag, comm, status));
131 }
132 // Isend
133 ReturnType iSend(const void* buf, int count, MPI_Datatype datatype, int dest, int tag,
134 MPI_Comm comm, MPI_Request* request) final
135 {
136 return _ret(MPI_Isend(buf, count, datatype, dest, tag, comm, request));
137 }
138 // Send
139 ReturnType send(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) final
140 {
141 return _ret(MPI_Send(buf, count, datatype, dest, tag, comm));
142 }
143 // Irecv
144 ReturnType iRecv(void* buf, int count, MPI_Datatype datatype, int source, int tag,
145 MPI_Comm comm, MPI_Request* request) final
146 {
147 return _ret(MPI_Irecv(buf, count, datatype, source, tag, comm, request));
148 }
149 // recv
150 ReturnType recv(void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status) final
151 {
152 return _ret(MPI_Recv(buf, count, datatype, source, tag, comm, status));
153 }
154 // Test
155 ReturnType test(MPI_Request* request, int* flag, MPI_Status* status) final
156 {
157 return _ret(MPI_Test(request, flag, status));
158 }
159 // Probe
160 ReturnType probe(int source, int tag, MPI_Comm comm, MPI_Status* status) final
161 {
162 return _ret(MPI_Probe(source, tag, comm, status));
163 }
164 // Get_count
165 ReturnType getCount(const MPI_Status* status, MPI_Datatype datatype, int* count) final
166 {
167 return _ret(MPI_Get_count(status, datatype, count));
168 }
169 // Wait
170 ReturnType wait(MPI_Request* request, MPI_Status* status) final
171 {
172 return _ret(MPI_Wait(request, status));
173 }
174 // Waitall
176 {
177 return _ret(MPI_Waitall(count, array_of_requests, array_of_statuses));
178 }
179 // Testsome
182 {
184 }
185 // Waitsome
188 {
190 }
191};
192
193/*---------------------------------------------------------------------------*/
194/*---------------------------------------------------------------------------*/
195
196} // namespace Arccore::MessagePassing::Mpi
197
198/*---------------------------------------------------------------------------*/
199/*---------------------------------------------------------------------------*/
200
201#endif
Déclarations des types de la composante 'base' de Arccore.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
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...