Information exchange between processors. More...
#include <arcane/core/IParallelExchanger.h>
Public Types | |
| enum | eExchangeMode { EM_Independant = ParallelExchangerOptions::EM_Independant , EM_Collective = ParallelExchangerOptions::EM_Collective , EM_Auto = ParallelExchangerOptions::EM_Auto } |
Public Member Functions | |
| virtual bool | initializeCommunicationsMessages ()=0 |
| Calculates communications. | |
| virtual void | initializeCommunicationsMessages (Int32ConstArrayView recv_ranks)=0 |
| Calculates communications. | |
| 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 IParallelMng * | parallelMng () const =0 |
| virtual Integer | nbSender () const =0 |
| Number of processors to which we send. | |
| virtual Int32ConstArrayView | senderRanks () const =0 |
| List of ranks of processors to which we send. | |
| virtual void | addSender (Int32 rank)=0 |
| Adds a processor to send to. | |
| virtual ISerializeMessage * | messageToSend (Integer i)=0 |
| Message intended for the i-th processor. | |
| virtual Integer | nbReceiver () const =0 |
| Number of processors from which we will receive messages. | |
| 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. | |
| virtual void | setExchangeMode (eExchangeMode mode)=0 |
| Sets the exchange mode. | |
| virtual eExchangeMode | exchangeMode () const =0 |
| Specified exchange mode. | |
| virtual void | setVerbosityLevel (Int32 v)=0 |
| Sets the verbosity level. | |
| virtual Int32 | verbosityLevel () const =0 |
| Verbosity level. | |
| virtual void | setName (const String &name)=0 |
| Sets the instance name. This name is used during prints. | |
| virtual String | name () const =0 |
| Instance name. | |
Information exchange between processors.
This class allows sending and receiving arbitrary messages from any number of other processors.
The operation is as follows.
It is possible to specify, before calling processExchange(), how the messages will be sent via setExchangeMode(). By default, the mechanism used is that of point-to-point communications (EM_Independant) but it is possible to use a collective mode (EM_Collective) which uses 'all to all' type messages.
Definition at line 56 of file IParallelExchanger.h.
| Enumerator | |
|---|---|
| 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. |
Definition at line 60 of file IParallelExchanger.h.
|
pure virtual |
Adds a processor to send to.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData().
|
pure virtual |
Specified exchange mode.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
Calculates communications.
Based on m_send_ranks provided by each processor, determines the list of processors to which a message must be sent.
To know the processors from which information is expected, it is necessary to perform a communication (allGatherVariable()). If we know these processors beforehand, we must use one of the overloaded versions of this method.
| true | if there is nothing to exchange |
| false | otherwise. |
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData().
|
pure virtual |
Calculates communications.
Assumes that the list of processors from which information is desired is in recv_ranks.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
Message received from the i-th processor.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::GhostLayerBuilder::addGhostChildFromParent().
|
pure virtual |
Message intended for the i-th processor.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData().
|
pure virtual |
Instance name.
Implemented in Arcane::ParallelExchanger.
Referenced by setName().
|
pure virtual |
Number of processors from which we will receive messages.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::GhostLayerBuilder::addGhostChildFromParent().
|
pure virtual |
Number of processors to which we send.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData().
|
pure virtual |
Performs the exchange using the default options of ParallelExchangerOptions.
Implemented in Arcane::ParallelExchanger.
Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), and Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData().
|
pure virtual |
Performs the exchange using the options options.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
List of ranks of processors from which we will receive messages.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
List of ranks of processors to which we send.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
Sets the exchange mode.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
Sets the instance name. This name is used during prints.
Implemented in Arcane::ParallelExchanger.
References name().
|
pure virtual |
Sets the verbosity level.
Implemented in Arcane::ParallelExchanger.
|
pure virtual |
Verbosity level.
Implemented in Arcane::ParallelExchanger.