Arcane  v3.15.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Otf2MpiProfiling.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/* Otf2MpiProfiling.h (C) 2000-2018 */
9/* */
10/* Implementation de l'interface IMpiProfiling permettant l'instrumentation */
11/* au format OTF2 . */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_STD_OTF2MPIPROFILING_H
14#define ARCANE_STD_OTF2MPIPROFILING_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
19#include "arccore/collections/CollectionsGlobal.h"
20#include "arccore/message_passing/Request.h"
21#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
22#include "arccore/message_passing_mpi/IMpiProfiling.h"
23#include "arccore/message_passing_mpi/MessagePassingMpiEnum.h"
24#include "arcane/std/Otf2LibWrapper.h"
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arcane
30{
31using namespace Arccore::MessagePassing::Mpi;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
42: public IMpiProfiling
43{
44 public:
45 // Pour l'instant void pour des raisons de compatibilité mais devra à terme
46 // être IMpiProfiling::ReturnType
47 using ReturnType = void;
48
49 public:
51 ~Otf2MpiProfiling() override = default;
52
53 public:
54 // Bcast
55 ReturnType broadcast(void* buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) final;
56 // Gather
58 int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) final;
59 // Gatherv
61 const int* recvcounts, const int* displs, MPI_Datatype recvtype, int root, MPI_Comm comm) final;
62 // Allgather
65 // Allgatherv
67 const int* recvcounts, const int* displs, MPI_Datatype recvtype, MPI_Comm comm) final;
68 // Scatterv
69 ReturnType scatterVariable(const void* sendbuf, const int* sendcounts, const int* displs,
71 int root, MPI_Comm comm) final;
72 // Alltoall
75 // Alltoallv
76 ReturnType allToAllVariable(const void* sendbuf, const int* sendcounts, const int* sdispls,
77 MPI_Datatype sendtype, void* recvbuf, const int* recvcounts,
78 const int* rdispls, MPI_Datatype recvtype, MPI_Comm comm) final;
79 // Barrier
81 // Reduce
82 ReturnType reduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
83 MPI_Op op, int root, MPI_Comm comm) final;
84 // Allreduce
85 ReturnType allReduce(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype,
86 MPI_Op op, MPI_Comm comm) final;
87 // Scan
88 ReturnType scan(const void* sendbuf, void* recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final;
89 // Sendrecv
90 ReturnType sendRecv(const void* sendbuf, int sendcount, MPI_Datatype sendtype, int dest,
92 int source, int recvtag, MPI_Comm comm, MPI_Status* status) final;
93 // Isend
94 ReturnType iSend(const void* buf, int count, MPI_Datatype datatype, int dest, int tag,
95 MPI_Comm comm, MPI_Request* request) final;
96 // Send
97 ReturnType send(const void* buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) final;
98 // Irecv
99 ReturnType iRecv(void* buf, int count, MPI_Datatype datatype, int source, int tag,
100 MPI_Comm comm, MPI_Request* request) final;
101 // recv
102 ReturnType recv(void* buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status* status) final;
103 // Test
104 ReturnType test(MPI_Request* request, int* flag, MPI_Status* status) final;
105 // Probe
106 ReturnType probe(int source, int tag, MPI_Comm comm, MPI_Status* status) final;
107 // Get_count
108 ReturnType getCount(const MPI_Status* status, MPI_Datatype datatype, int* count) final;
109 // Wait
110 ReturnType wait(MPI_Request* request, MPI_Status* status) final;
111 // Waitall
113 // Testsome
116 // Waitsome
119
120 private:
121 Otf2LibWrapper* m_otf2_wrapper;
122
123 private:
124 void _doEventEnter(eMpiName event_name);
125 void _doEventLeave(eMpiName event_name);
126 ReturnType _ret(int r) const
127 {
128 return (ReturnType)(r);
129 }
130};
131
132/*---------------------------------------------------------------------------*/
133/*---------------------------------------------------------------------------*/
134
135} // namespace Arcane
136
137/*---------------------------------------------------------------------------*/
138/*---------------------------------------------------------------------------*/
139
140#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...
Classe d'encapsulation des fonctions de la librairie OTF2.
Implementation de l'interface des operations MPI. Decore chacun des appels MPI avec les fonctions de ...
ReturnType allGatherVariable(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm) final
MPI_Allgatherv.
ReturnType allGather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) final
MPI_Allgather.
ReturnType waitAll(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]) final
MPI_Waitall.
ReturnType testSome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) final
MPI_Testsome.
ReturnType probe(int source, int tag, MPI_Comm comm, MPI_Status *status) final
MPI_Probe.
ReturnType barrier(MPI_Comm comm) final
MPI_Barrier.
ReturnType sendRecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) final
MPI_Sendrecv.
ReturnType recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) final
MPI_recv.
ReturnType reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) final
MPI_Reduce.
ReturnType scatterVariable(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) final
MPI_Scatterv.
ReturnType allToAllVariable(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) final
MPI_Alltoallv.
ReturnType allToAll(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) final
MPI_Alltoall.
ReturnType gatherVariable(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) final
MPI_Gatherv.
ReturnType scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final
MPI_Scan.
ReturnType waitSome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]) final
MPI_Waitsome.
ReturnType getCount(const MPI_Status *status, MPI_Datatype datatype, int *count) final
MPI_Get_count.
ReturnType broadcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) final
MPI_Bcast.
ReturnType gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) final
MPI_Gather.
ReturnType wait(MPI_Request *request, MPI_Status *status) final
MPI_Wait.
ReturnType test(MPI_Request *request, int *flag, MPI_Status *status) final
MPI_Test.
ReturnType send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) final
MPI_Send.
ReturnType allReduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) final
MPI_Allreduce.
ReturnType iSend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) final
MPI_Isend.
ReturnType iRecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) final
MPI_Irecv.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-