Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MpiSerializeMessageList.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/* MpiSerializeMessageList.h (C) 2000-2020 */
9/* */
10/* Implémentation de ISerializeMessageList pour MPI. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSINGMPI_MPISERIALIZEMESSAGELIST_H
13#define ARCCORE_MESSAGEPASSINGMPI_MPISERIALIZEMESSAGELIST_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
18#include "arccore/message_passing/ISerializeMessageList.h"
19#include "arccore/message_passing/Request.h"
20#include "arccore/trace/TraceGlobal.h"
21#include "arccore/trace/TimeMetric.h"
23#include "arccore/serialize/SerializeGlobal.h"
24#include "arccore/collections/Array.h"
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28
29namespace Arccore::MessagePassing::Mpi
30{
31using namespace Arccore::MessagePassing::internal;
32
33/*---------------------------------------------------------------------------*/
34/*---------------------------------------------------------------------------*/
35
36class MyMpiParallelMng;
37class MpiSerializeMessage;
38
39/*---------------------------------------------------------------------------*/
40/*---------------------------------------------------------------------------*/
41
42class ARCCORE_MESSAGEPASSINGMPI_EXPORT MpiSerializeMessageRequest
43{
44 public:
47 : m_mpi_message(mpi_message), m_request(std::move(request)) {}
48 public:
49 BasicSerializeMessage* m_mpi_message = nullptr;
50 Request m_request;
51};
52
53/*---------------------------------------------------------------------------*/
54/*---------------------------------------------------------------------------*/
55/*!
56 * \brief Implémentation MPI de la gestion des 'ISerializeMessage'.
57 */
58class ARCCORE_MESSAGEPASSINGMPI_EXPORT MpiSerializeMessageList
60{
61 private:
62
63 class _SortMessages;
64
65 public:
66
68
69 public:
70
71 void addMessage(ISerializeMessage* msg) override;
72 void processPendingMessages() override;
73 Integer waitMessages(eWaitType wait_type) override;
74 Ref<ISerializeMessage>
75 createAndAddMessage(MessageRank destination,ePointToPointMessageType type) override;
76
77 Request _processOneMessageGlobalBuffer(BasicSerializeMessage* msm,MessageRank source,MessageTag mpi_tag);
78 Request _processOneMessage(BasicSerializeMessage* msm,MessageRank source,MessageTag mpi_tag);
79
80 private:
81
82 Integer _waitMessages(eWaitType wait_type);
83 Integer _waitMessages2(eWaitType wait_type);
84
85 private:
86
87 MpiSerializeDispatcher* m_dispatcher = nullptr;
88 MpiAdapter* m_adapter = nullptr;
89 ITraceMng* m_trace = nullptr;
90 UniqueArray<BasicSerializeMessage*> m_messages_to_process;
92 TimeMetricAction m_message_passing_phase;
93 bool m_is_verbose = false;
94};
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98
99} // End Namespace Arccore::MessagePassing::Mpi
100
101/*---------------------------------------------------------------------------*/
102/*---------------------------------------------------------------------------*/
103
104#endif
105
Déclarations des types de la composante 'base' de Arccore.
Interface du gestionnaire de traces.
Implémentation MPI de la gestion des 'ISerializeMessage'.
Requête d'un message.
Definition Request.h:77
Vecteur 1D de données avec sémantique par valeur (style STL).
ePointToPointMessageType
Type de message point à point.
Int32 Integer
Type représentant un entier.