Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IMessagePassingMng.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/* IMessagePassingMng.h (C) 2000-2025 */
9/* */
10/* Interface of the message passing manager. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCCORE_MESSAGEPASSING_IMESSAGEPASSINGMNG_H
13#define ARCCORE_MESSAGEPASSING_IMESSAGEPASSINGMNG_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \brief Destroys the instance \a p.
30 *
31 * The instance \a p must not be used after this call
32 */
33extern "C++" void ARCCORE_MESSAGEPASSING_EXPORT
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39/*!
40 * \brief Interface of the message passing manager.
41 *
42 * This manager does not do much itself and merely
43 * delegates operations via the IDispatchers interface.
44 *
45 * Instances of these classes must be destroyed via the method
46 * mpDelete().
47 */
48class ARCCORE_MESSAGEPASSING_EXPORT IMessagePassingMng
49{
50 friend void ARCCORE_MESSAGEPASSING_EXPORT mpDelete(IMessagePassingMng*);
52
53 public:
54
55 // TODO: Rendre obsolète fin 2022: [[deprecated("Use mpDelete() instead")]]
56 virtual ~IMessagePassingMng() = default;
57
58 public:
59
60 //! Rank of this instance in the communicator
61 virtual Int32 commRank() const = 0;
62
63 //! Number of instances in the communicator
64 virtual Int32 commSize() const = 0;
65
66 //! Interface for collecting execution times (can be null)
67 virtual ITimeMetricCollector* timeMetricCollector() const = 0;
68
69 /*!
70 * \brief MPI communicator associated with this instance.
71 *
72 * The communicator is only valid if the instance is associated with an
73 * MPI implementation.
74 */
75 virtual Communicator communicator() const;
76
77 public:
78
79 virtual IDispatchers* dispatchers() = 0;
80};
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85} // namespace Arcane::MessagePassing
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
90#endif
General declarations for the 'message_passing' component.
#define ARCCORE_DECLARE_REFERENCE_COUNTED_INCLASS_METHODS()
Macro to declare the virtual methods managing reference counters.
Communicator for message exchange.
Interface of the dispatcher container.
Interface of the message passing manager.
friend void mpDelete(IMessagePassingMng *)
Destroys the instance p.
virtual Int32 commRank() const =0
Rank of this instance in the communicator.
virtual Communicator communicator() const
MPI communicator associated with this instance.
virtual Int32 commSize() const =0
Number of instances in the communicator.
virtual ITimeMetricCollector * timeMetricCollector() const =0
Interface for collecting execution times (can be null).
Declarations of types and methods used by message exchange mechanisms.
void mpDelete(IMessagePassingMng *p)
Destroys the instance p.
std::int32_t Int32
Signed integer type of 32 bits.