Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MpiMessagePassingMng.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 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/* MpiMessagePassingMng.h (C) 2000-2024 */
9/* */
10/* Implémentation MPI du gestionnaire des échanges de messages. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSINGMPI_MPIMESSAGEPASSINGMNG_H
13#define ARCCORE_MESSAGEPASSINGMPI_MPIMESSAGEPASSINGMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arccore/message_passing_mpi/MessagePassingMpiGlobal.h"
18#include "arccore/message_passing/MessagePassingMng.h"
19
20/*---------------------------------------------------------------------------*/
21/*---------------------------------------------------------------------------*/
22
23namespace Arccore::MessagePassing::Mpi
24{
25
26/*---------------------------------------------------------------------------*/
27/*---------------------------------------------------------------------------*/
28/*!
29 * \brief Implémentation MPI du gestionnaire des échanges de messages.
30 */
31class ARCCORE_MESSAGEPASSINGMPI_EXPORT MpiMessagePassingMng
32: public MessagePassingMng
33{
34 public:
35
37 {
38 public:
39
40 BuildInfo(Int32 comm_rank, Int32 comm_size, IDispatchers* dispatchers, MPI_Comm comm)
41 : m_comm_rank(comm_rank)
42 , m_comm_size(comm_size)
43 , m_dispatchers(dispatchers)
44 , m_communicator(comm)
45 {}
46
47 public:
48
49 Int32 commRank() const { return m_comm_rank; }
50 Int32 commSize() const { return m_comm_size; }
51 IDispatchers* dispatchers() const { return m_dispatchers; }
52 MPI_Comm communicator() const { return m_communicator; }
53
54 private:
55
56 Int32 m_comm_rank;
57 Int32 m_comm_size;
58 IDispatchers* m_dispatchers;
59 MPI_Comm m_communicator;
60 };
61
62 public:
63
64 explicit MpiMessagePassingMng(const BuildInfo& bi);
65
66 public:
67
68 const MPI_Comm* getMPIComm() const { return &m_mpi_communicator; }
69
70 private:
71
72 MPI_Comm m_mpi_communicator;
73};
74
75/*---------------------------------------------------------------------------*/
76/*---------------------------------------------------------------------------*/
77
78} // namespace Arccore::MessagePassing::Mpi
79
80/*---------------------------------------------------------------------------*/
81/*---------------------------------------------------------------------------*/
82
83#endif
Interface du conteneur des dispatchers.
Gestionnaire des échanges de messages.
Implémentation MPI du gestionnaire des échanges de messages.
std::int32_t Int32
Type entier signé sur 32 bits.