Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IParallelExchanger.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/* IParallelExchanger.h (C) 2000-2025 */
9/* */
10/* Information exchange between processors. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IPARALLELEXCHANGER_H
13#define ARCANE_CORE_IPARALLELEXCHANGER_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19#include "arcane/core/ParallelExchangerOptions.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
56class ARCANE_CORE_EXPORT IParallelExchanger
57{
58 public:
59
69
70 public:
71
72 virtual ~IParallelExchanger() = default;
73
74 public:
75
91
98
100 virtual void processExchange() = 0;
101
103 virtual void processExchange(const ParallelExchangerOptions& options) = 0;
104
105 public:
106
107 virtual IParallelMng* parallelMng() const = 0;
108
110 virtual Integer nbSender() const = 0;
112 virtual Int32ConstArrayView senderRanks() const = 0;
114 virtual void addSender(Int32 rank) = 0;
117
119 virtual Integer nbReceiver() const = 0;
124
126 [[deprecated("Y2021: Use ParallelExchangerOptions::setExchangeMode()")]]
127 virtual void setExchangeMode(eExchangeMode mode) = 0;
129 [[deprecated("Y2021: Use ParallelExchangerOptions::exchangeMode()")]]
130 virtual eExchangeMode exchangeMode() const = 0;
131
133 virtual void setVerbosityLevel(Int32 v) = 0;
135 virtual Int32 verbosityLevel() const = 0;
136
138 virtual void setName(const String& name) = 0;
140 virtual String name() const = 0;
141};
142
143/*---------------------------------------------------------------------------*/
144/*---------------------------------------------------------------------------*/
145
146} // namespace Arcane
147
148/*---------------------------------------------------------------------------*/
149/*---------------------------------------------------------------------------*/
150
151#endif
Declarations of Arcane's general types.
File containing declarations concerning the message passing model.
Information exchange between processors.
virtual void addSender(Int32 rank)=0
Adds a processor to send to.
@ EM_Independant
Uses point-to-point exchanges (send/recv).
@ EM_Collective
Uses collective operations (allToAll).
@ EM_Auto
Automatically chooses between point-to-point or collective.
virtual void setName(const String &name)=0
Sets the instance name. This name is used during prints.
virtual Integer nbSender() const =0
Number of processors to which we send.
virtual void setExchangeMode(eExchangeMode mode)=0
Sets the exchange mode.
virtual Integer nbReceiver() const =0
Number of processors from which we will receive messages.
virtual String name() const =0
Instance name.
virtual void initializeCommunicationsMessages(Int32ConstArrayView recv_ranks)=0
Calculates communications.
virtual void setVerbosityLevel(Int32 v)=0
Sets the verbosity level.
virtual Int32 verbosityLevel() const =0
Verbosity level.
virtual eExchangeMode exchangeMode() const =0
Specified exchange mode.
virtual bool initializeCommunicationsMessages()=0
Calculates communications.
virtual ISerializeMessage * messageToSend(Integer i)=0
Message intended for the i-th processor.
virtual void processExchange()=0
Performs the exchange using the default options of ParallelExchangerOptions.
virtual void processExchange(const ParallelExchangerOptions &options)=0
Performs the exchange using the options options.
virtual Int32ConstArrayView senderRanks() const =0
List of ranks of processors to which we send.
virtual Int32ConstArrayView receiverRanks()=0
List of ranks of processors from which we will receive messages.
virtual ISerializeMessage * messageToReceive(Integer i)=0
Message received from the i-th processor.
Interface of the parallelism manager for a subdomain.
Options for IParallelMng::processExchange().
@ EM_Auto
Automatically chooses between point-to-point or collective.
@ EM_Collective
Uses collective operations (allToAll).
@ EM_Independant
Uses point-to-point exchanges (send/recv).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
std::int32_t Int32
Signed integer type of 32 bits.