Information exchange between processors. More...
#include <arcane/impl/ParallelExchanger.h>
Public Member Functions | |
| ParallelExchanger (IParallelMng *pm) | |
| bool | initializeCommunicationsMessages () override |
| Calculates communications. | |
| void | initializeCommunicationsMessages (Int32ConstArrayView recv_ranks) override |
| Calculates communications. | |
| void | processExchange () override |
| Performs the exchange using the default options of ParallelExchangerOptions. | |
| void | processExchange (const ParallelExchangerOptions &options) override |
| Performs the exchange using the options options. | |
| IParallelMng * | parallelMng () const override |
| Integer | nbSender () const override |
| Number of processors to which we send. | |
| Int32ConstArrayView | senderRanks () const override |
| List of ranks of processors to which we send. | |
| void | addSender (Int32 rank) override |
| Adds a processor to send to. | |
| ISerializeMessage * | messageToSend (Integer i) override |
| Message intended for the i-th processor. | |
| Integer | nbReceiver () const override |
| Number of processors from which we will receive messages. | |
| Int32ConstArrayView | receiverRanks () override |
| List of ranks of processors from which we will receive messages. | |
| ISerializeMessage * | messageToReceive (Integer i) override |
| Message received from the i-th processor. | |
| void | setExchangeMode (eExchangeMode mode) override |
| Sets the exchange mode. | |
| eExchangeMode | exchangeMode () const override |
| Specified exchange mode. | |
| void | setVerbosityLevel (Int32 v) override |
| Sets the verbosity level. | |
| Int32 | verbosityLevel () const override |
| Verbosity level. | |
| void | setName (const String &name) override |
| Sets the instance name. This name is used during prints. | |
| String | name () const override |
| Instance name. | |
| Public Member Functions inherited from Arcane::TraceAccessor | |
| TraceAccessor (ITraceMng *m) | |
| Constructs an accessor via the trace manager m. | |
| TraceAccessor (const TraceAccessor &rhs) | |
| Copy constructor. | |
| TraceAccessor & | operator= (const TraceAccessor &rhs) |
| Copy assignment operator. | |
| virtual | ~TraceAccessor () |
| Frees resources. | |
| ITraceMng * | traceMng () const |
| Trace manager. | |
| TraceMessage | info () const |
| Flow for an information message. | |
| TraceMessage | pinfo () const |
| Flow for a parallel information message. | |
| TraceMessage | info (char category) const |
| Flow for an information message of a given category. | |
| TraceMessage | pinfo (char category) const |
| Flow for a parallel information message of a given category. | |
| TraceMessage | info (bool v) const |
| Flow for an information message. | |
| TraceMessage | warning () const |
| Flow for a warning message. | |
| TraceMessage | pwarning () const |
| TraceMessage | error () const |
| Flow for an error message. | |
| TraceMessage | perror () const |
| TraceMessage | log () const |
| Flow for a log message. | |
| TraceMessage | plog () const |
| Flow for a log message. | |
| TraceMessage | logdate () const |
| Flow for a log message preceded by the date. | |
| TraceMessage | fatal () const |
| Flow for a fatal error message. | |
| TraceMessage | pfatal () const |
| Flow for a parallel fatal error message. | |
| TraceMessageDbg | debug (Trace::eDebugLevel=Trace::Medium) const |
| Flow for a debug message. | |
| Trace::eDebugLevel | configDbgLevel () const |
| Debug level of the configuration file. | |
| TraceMessage | info (Int32 verbose_level) const |
| Flow for an information message of a given level. | |
| TraceMessage | linfo () const |
| Flow for an information message with the local information level of this instance. | |
| TraceMessage | linfo (Int32 relative_level) const |
| Flow for an information message with the local information level of this instance. | |
| void | fatalMessage (const StandaloneTraceMessage &o) const |
Private Member Functions | |
| ParallelExchanger (Ref< IParallelMng > pm) | |
| void | _initializeCommunicationsMessages () |
| void | _processExchangeCollective () |
| void | _processExchangeWithControl (Int32 max_pending_message) |
| Exchange with control over the maximum number of messages in flight. | |
| void | _processExchange (const ParallelExchangerOptions &options) |
Private Attributes | |
| Ref< IParallelMng > | m_parallel_mng |
| Int32UniqueArray | m_send_ranks |
| List of subdomains to send. | |
| Int32UniqueArray | m_recv_ranks |
| List of subdomains to receive. | |
| UniqueArray< ISerializeMessage * > | m_comms_buf |
| List of messages to send and receive. | |
| UniqueArray< SerializeMessage * > | m_recv_serialize_infos |
| List of messages to receive. | |
| UniqueArray< SerializeMessage * > | m_send_serialize_infos |
| List of messages to receive. | |
| SerializeMessage * | m_own_send_message = nullptr |
| Message sent to self. | |
| SerializeMessage * | m_own_recv_message = nullptr |
| Message received by self. | |
| eExchangeMode | m_exchange_mode = EM_Independant |
| Exchange mode. | |
| Int32 | m_verbosity_level = 0 |
| Verbosity level. | |
| String | m_name |
| Instance name used for display. | |
| Timer | m_timer |
| Timer to measure time spent in exchanges. | |
Friends | |
| Ref< IParallelExchanger > | createParallelExchangerImpl (Ref< IParallelMng > pm) |
Additional Inherited Members | |
| Public Types inherited from Arcane::IParallelExchanger | |
| enum | eExchangeMode { EM_Independant = ParallelExchangerOptions::EM_Independant , EM_Collective = ParallelExchangerOptions::EM_Collective , EM_Auto = ParallelExchangerOptions::EM_Auto } |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Information exchange between processors.
Definition at line 44 of file ParallelExchanger.h.
| Arcane::ParallelExchanger::ParallelExchanger | ( | IParallelMng * | pm | ) |
Definition at line 38 of file ParallelExchanger.cc.
|
override |
Definition at line 61 of file ParallelExchanger.cc.
|
private |
Definition at line 47 of file ParallelExchanger.cc.
|
private |
Definition at line 137 of file ParallelExchanger.cc.
|
private |
Definition at line 197 of file ParallelExchanger.cc.
|
private |
Definition at line 253 of file ParallelExchanger.cc.
|
private |
Exchange with control over the maximum number of messages in flight.
Definition at line 431 of file ParallelExchanger.cc.
References Arcane::Array< T >::begin(), Arcane::MessagePassing::ISerializeMessage::destination(), Arcane::Array< T >::end(), Arcane::TraceAccessor::info(), Arcane::MessagePassing::ISerializeMessage::isSend(), m_comms_buf, m_name, m_verbosity_level, Arcane::math::max(), Arcane::AbstractArray< T >::size(), Arcane::MessagePassing::ISerializeMessage::source(), and Arcane::MessagePassing::WaitSome.
|
inlineoverridevirtual |
Adds a processor to send to.
Implements Arcane::IParallelExchanger.
Definition at line 72 of file ParallelExchanger.h.
References m_send_ranks.
|
inlineoverridevirtual |
Specified exchange mode.
Implements Arcane::IParallelExchanger.
Definition at line 79 of file ParallelExchanger.h.
References m_exchange_mode.
|
overridevirtual |
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. |
Implements Arcane::IParallelExchanger.
Definition at line 83 of file ParallelExchanger.cc.
References m_recv_ranks, and m_send_ranks.
|
overridevirtual |
Calculates communications.
Assumes that the list of processors from which information is desired is in recv_ranks.
Implements Arcane::IParallelExchanger.
Definition at line 126 of file ParallelExchanger.cc.
References m_recv_ranks, and Arcane::ConstArrayView< T >::size().
|
overridevirtual |
Message received from the i-th processor.
Implements Arcane::IParallelExchanger.
Definition at line 364 of file ParallelExchanger.cc.
References m_recv_serialize_infos.
|
overridevirtual |
Message intended for the i-th processor.
Implements Arcane::IParallelExchanger.
Definition at line 355 of file ParallelExchanger.cc.
References m_send_serialize_infos.
|
inlineoverridevirtual |
Instance name.
Implements Arcane::IParallelExchanger.
Definition at line 85 of file ParallelExchanger.h.
References m_name.
Referenced by setName().
|
inlineoverridevirtual |
Number of processors from which we will receive messages.
Implements Arcane::IParallelExchanger.
Definition at line 74 of file ParallelExchanger.h.
References m_recv_ranks.
|
inlineoverridevirtual |
Number of processors to which we send.
Implements Arcane::IParallelExchanger.
Definition at line 70 of file ParallelExchanger.h.
References m_send_ranks.
|
overridevirtual |
Implements Arcane::IParallelExchanger.
Definition at line 74 of file ParallelExchanger.cc.
|
overridevirtual |
Performs the exchange using the default options of ParallelExchangerOptions.
Implements Arcane::IParallelExchanger.
Definition at line 166 of file ParallelExchanger.cc.
References m_exchange_mode, processExchange(), and Arcane::ParallelExchangerOptions::setExchangeMode().
Referenced by processExchange().
|
overridevirtual |
Performs the exchange using the options options.
Implements Arcane::IParallelExchanger.
Definition at line 177 of file ParallelExchanger.cc.
References Arcane::platform::getCurrentDateTime(), Arcane::TraceAccessor::info(), m_name, m_timer, and m_verbosity_level.
|
inlineoverridevirtual |
List of ranks of processors from which we will receive messages.
Implements Arcane::IParallelExchanger.
Definition at line 75 of file ParallelExchanger.h.
References m_recv_ranks.
|
inlineoverridevirtual |
List of ranks of processors to which we send.
Implements Arcane::IParallelExchanger.
Definition at line 71 of file ParallelExchanger.h.
References m_send_ranks.
|
inlineoverridevirtual |
Sets the exchange mode.
Implements Arcane::IParallelExchanger.
Definition at line 78 of file ParallelExchanger.h.
References m_exchange_mode.
|
overridevirtual |
Sets the instance name. This name is used during prints.
Implements Arcane::IParallelExchanger.
Definition at line 384 of file ParallelExchanger.cc.
References m_name, and name().
|
overridevirtual |
Sets the verbosity level.
Implements Arcane::IParallelExchanger.
Definition at line 373 of file ParallelExchanger.cc.
References m_verbosity_level.
|
inlineoverridevirtual |
Verbosity level.
Implements Arcane::IParallelExchanger.
Definition at line 82 of file ParallelExchanger.h.
References m_verbosity_level.
|
friend |
Definition at line 489 of file ParallelExchanger.cc.
|
private |
List of messages to send and receive.
Definition at line 98 of file ParallelExchanger.h.
Referenced by _processExchangeWithControl().
|
private |
Exchange mode.
Definition at line 113 of file ParallelExchanger.h.
Referenced by exchangeMode(), processExchange(), and setExchangeMode().
|
private |
Instance name used for display.
Definition at line 119 of file ParallelExchanger.h.
Referenced by _processExchangeWithControl(), name(), processExchange(), and setName().
|
private |
Message received by self.
Definition at line 110 of file ParallelExchanger.h.
|
private |
Message sent to self.
Definition at line 107 of file ParallelExchanger.h.
|
private |
Definition at line 89 of file ParallelExchanger.h.
|
private |
List of subdomains to receive.
Definition at line 95 of file ParallelExchanger.h.
Referenced by initializeCommunicationsMessages(), initializeCommunicationsMessages(), nbReceiver(), and receiverRanks().
|
private |
List of messages to receive.
Definition at line 101 of file ParallelExchanger.h.
Referenced by messageToReceive().
|
private |
List of subdomains to send.
Definition at line 92 of file ParallelExchanger.h.
Referenced by addSender(), initializeCommunicationsMessages(), nbSender(), and senderRanks().
|
private |
List of messages to receive.
Definition at line 104 of file ParallelExchanger.h.
Referenced by messageToSend().
|
private |
Timer to measure time spent in exchanges.
Definition at line 122 of file ParallelExchanger.h.
Referenced by processExchange().
|
private |
Verbosity level.
Definition at line 116 of file ParallelExchanger.h.
Referenced by _processExchangeWithControl(), processExchange(), setVerbosityLevel(), and verbosityLevel().