Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MessagePassing::ISerializeMessage Class Referenceabstract

Interface for a serialization message between IMessagePassingMng. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/message_passing/arccore/message_passing/ISerializeMessage.h>

Inheritance diagram for Arcane::MessagePassing::ISerializeMessage:
Collaboration diagram for Arcane::MessagePassing::ISerializeMessage:

Public Types

enum  eMessageType { MT_Send , MT_Recv , MT_Broadcast }
enum class  eStrategy { Default , OneMessage }
 Sending/receiving strategy. More...

Public Member Functions

virtual ~ISerializeMessage ()=default
 Releases resources.
virtual bool isSend () const =0
 true if it should send, false if it should receive
virtual eMessageType messageType () const =0
 Message type.
virtual Int32 destRank () const =0
 Destination rank (if isSend() is true) or sender.
virtual MessageRank destination () const =0
 Destination rank (if isSend() is true) or sender.
virtual Int32 origRank () const =0
 Message sender rank See also destRank() for interpretation based on the value of isSend().
virtual MessageRank source () const =0
 Message sender rank.
virtual ISerializerserializer ()=0
 Serializer.
virtual bool finished () const =0
 true if the message is finished
virtual void setFinished (bool v)=0
 Sets the 'finished' state of the message.
virtual void setTag (Int32 tag)=0
virtual void setInternalTag (MessageTag tag)=0
 Sets an internal tag for the message.
virtual Int32 tag () const =0
 Internal tag of the message.
virtual MessageTag internalTag () const =0
 Internal tag of the message.
virtual MessageId _internalMessageId () const =0
 Message identifier.
virtual void setStrategy (eStrategy strategy)=0
 Sets the sending/receiving strategy.
virtual eStrategy strategy () const =0
 Strategy used for sends/receives.
virtual bool isProcessed () const =0
 Indicates if the message has already been processed.

Detailed Description

Interface for a serialization message between IMessagePassingMng.

A serialization message consists of a series of bytes sent from a source rank() to a destination rank(). If isSend() is true, source() sends to destination(), otherwise it is the reverse. If it is a receive message, the serializer() is allocated and filled automatically. For parallelism to work correctly, a send message must correspond to a receive message (sent by the destination rank).

The message can be non-blocking. A message can be destroyed when its finished() property is true.

Definition at line 45 of file arccore/src/message_passing/arccore/message_passing/ISerializeMessage.h.

Member Enumeration Documentation

◆ eMessageType

enum Arcane::MessagePassing::ISerializeMessage::eMessageType

◆ eStrategy

Sending/receiving strategy.

Enumerator
Default 

Default strategy.

OneMessage 

Strategy using a single message if possible.

This assumes using the mpProbe() function to know the message size before posting the reception.

Definition at line 56 of file arccore/src/message_passing/arccore/message_passing/ISerializeMessage.h.

Member Function Documentation

◆ _internalMessageId()

virtual MessageId Arcane::MessagePassing::ISerializeMessage::_internalMessageId ( ) const
pure virtual

Message identifier.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References _internalMessageId().

Referenced by _internalMessageId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ destination()

virtual MessageRank Arcane::MessagePassing::ISerializeMessage::destination ( ) const
pure virtual

Destination rank (if isSend() is true) or sender.

In the case of a reception, the rank can be null to indicate that you wish to receive from anyone. rank by specifying A_NULL_RANK.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References destination().

Referenced by Arcane::mesh::FaceUniqueIdBuilder::_exchangeData(), Arcane::mesh::Parallel3EdgeUniqueIdBuilder::_exchangeData(), Arcane::ParallelExchanger::_processExchangeWithControl(), Arcane::Parallel::VariableParallelOperationBase::applyOperation(), destination(), Arcane::mesh::ItemsExchangeInfo2::prepareToSend(), Arcane::mesh::ItemsExchangeInfo2::readAndAllocItems(), Arcane::mesh::ItemsExchangeInfo2::readGroups(), and Arcane::mesh::ItemsExchangeInfo2::removeSentItems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ destRank()

virtual Int32 Arcane::MessagePassing::ISerializeMessage::destRank ( ) const
pure virtual

Destination rank (if isSend() is true) or sender.

In the case of a reception, it is possible to specify any rank by specifying A_NULL_RANK.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References destRank().

Referenced by destRank().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finished()

virtual bool Arcane::MessagePassing::ISerializeMessage::finished ( ) const
pure virtual

true if the message is finished

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References finished().

Referenced by finished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ internalTag()

virtual MessageTag Arcane::MessagePassing::ISerializeMessage::internalTag ( ) const
pure virtual

Internal tag of the message.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References internalTag().

Referenced by internalTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isProcessed()

virtual bool Arcane::MessagePassing::ISerializeMessage::isProcessed ( ) const
pure virtual

Indicates if the message has already been processed.

If the message has already been processed, it is not possible to change certain characteristics (such as the strategy or the tag)

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References isProcessed().

Referenced by isProcessed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSend()

virtual bool Arcane::MessagePassing::ISerializeMessage::isSend ( ) const
pure virtual

true if it should send, false if it should receive

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

Referenced by Arcane::ParallelExchanger::_processExchangeWithControl().

Here is the caller graph for this function:

◆ messageType()

virtual eMessageType Arcane::MessagePassing::ISerializeMessage::messageType ( ) const
pure virtual

◆ origRank()

virtual Int32 Arcane::MessagePassing::ISerializeMessage::origRank ( ) const
pure virtual

Message sender rank See also destRank() for interpretation based on the value of isSend().

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References origRank().

Referenced by origRank().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serializer()

◆ setFinished()

virtual void Arcane::MessagePassing::ISerializeMessage::setFinished ( bool v)
pure virtual

Sets the 'finished' state of the message.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References setFinished().

Referenced by setFinished().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setInternalTag()

virtual void Arcane::MessagePassing::ISerializeMessage::setInternalTag ( MessageTag tag)
pure virtual

Sets an internal tag for the message.

This tag is useful if multiple messages need to be sent/received to the same origin/destination pair.

This method is internal to Arccore.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References setInternalTag(), and tag().

Referenced by setInternalTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStrategy()

virtual void Arcane::MessagePassing::ISerializeMessage::setStrategy ( eStrategy strategy)
pure virtual

Sets the sending/receiving strategy.

The strategy used must be the same for the sent message and the receive message, otherwise the behavior is undefined.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References setStrategy(), and strategy().

Referenced by setStrategy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTag()

virtual void Arcane::MessagePassing::ISerializeMessage::setTag ( Int32 tag)
pure virtual

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References setTag(), and tag().

Referenced by setTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ source()

virtual MessageRank Arcane::MessagePassing::ISerializeMessage::source ( ) const
pure virtual

Message sender rank.

See also destination() for interpretation based on the value of isSend()

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References source().

Referenced by Arcane::ParallelExchanger::_processExchangeWithControl(), and source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ strategy()

virtual eStrategy Arcane::MessagePassing::ISerializeMessage::strategy ( ) const
pure virtual

Strategy used for sends/receives.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References strategy().

Referenced by setStrategy(), and strategy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tag()

virtual Int32 Arcane::MessagePassing::ISerializeMessage::tag ( ) const
pure virtual

Internal tag of the message.

Implemented in Arcane::MessagePassing::BasicSerializeMessage, Arcane::MessagePassing::internal::BasicSerializeMessage, Arccore::MessagePassing::internal::BasicSerializeMessage, and Arccore::MessagePassing::Mpi::BasicSerializeMessage.

References tag().

Referenced by setInternalTag(), setTag(), and tag().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: