Interface of a variable synchronization service. More...
#include <arcane/impl/internal/VariableSynchronizer.h>
Classes | |
| class | SyncMessage |
| Synchronization management. More... | |
Public Member Functions | |
| VariableSynchronizer (IParallelMng *pm, const ItemGroup &group, Ref< IDataSynchronizeImplementationFactory > implementation_factory) | |
| IParallelMng * | parallelMng () override |
| Associated parallel manager. | |
| const ItemGroup & | itemGroup () override |
| Entity group used for synchronization. | |
| void | compute () override |
| Creation of the list of synchronization elements. | |
| void | changeLocalIds (Int32ConstArrayView old_to_new_ids) override |
| Called when the local IDs of the entities are modified. | |
| void | synchronize (IVariable *var) override |
| Synchronizes the variable var in blocking mode. | |
| void | synchronize (IVariable *var, Int32ConstArrayView local_ids) override |
| Synchronizes the variable var on the entities local_ids in blocking mode. | |
| void | synchronize (VariableCollection vars) override |
| Synchronizes the variables vars in blocking mode. | |
| void | synchronize (VariableCollection vars, Int32ConstArrayView local_ids) override |
| Synchronizes the variables vars in blocking mode. | |
| Int32ConstArrayView | communicatingRanks () override |
| Ranks of subdomains with which communication occurs. | |
| Int32ConstArrayView | sharedItems (Int32 index) override |
| List of local IDs of entities shared with a subdomain. | |
| Int32ConstArrayView | ghostItems (Int32 index) override |
| List of local IDs of ghost entities with a subdomain. | |
| void | synchronizeData (IData *data) override |
| Synchronizes the data data. | |
| EventObservable< const VariableSynchronizerEventArgs & > & | onSynchronized () override |
| Event sent at the beginning and end of synchronization. | |
| IVariableSynchronizerMng * | synchronizeMng () const |
| 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 | |
| void | _synchronize (IVariable *var, SyncMessage *message) |
| void | _synchronizeMulti (const VariableCollection &vars, SyncMessage *message) |
| bool | _canSynchronizeMulti (const VariableCollection &vars) |
| Indicates if the variables in the list vars can be synchronized at once. | |
| DataSynchronizeResult | _synchronize (INumericDataInternal *data, bool is_compare_sync) |
| SyncMessage * | _buildMessage () |
| SyncMessage * | _buildMessage (Ref< DataSynchronizeInfo > &sync_info) |
| void | _rebuildMessage (Int32ConstArrayView local_ids) |
| void | _sendBeginEvent (VariableSynchronizerEventArgs &args) |
| void | _sendEndEvent (VariableSynchronizerEventArgs &args) |
| void | _sendEvent (VariableSynchronizerEventArgs &args) |
| void | _checkCreateTimer () |
| void | _doSynchronize (SyncMessage *message) |
| void | _setCurrentDevice () |
| Positions the device associated with our RunQueue as the current device. | |
Private Attributes | |
| IParallelMng * | m_parallel_mng = nullptr |
| ItemGroup | m_item_group |
| Ref< DataSynchronizeInfo > | m_sync_info |
| Timer * | m_sync_timer = nullptr |
| bool | m_is_verbose = false |
| bool | m_allow_multi_sync = true |
| bool | m_trace_sync = false |
| EventObservable< const VariableSynchronizerEventArgs & > | m_on_synchronized |
| Ref< IDataSynchronizeImplementationFactory > | m_implementation_factory |
| IVariableSynchronizerMng * | m_variable_synchronizer_mng = nullptr |
| SyncMessage * | m_default_message = nullptr |
| Runner | m_runner |
| Ref< DataSynchronizeInfo > | m_partial_sync_info |
| Ref< SyncMessage > | m_partial_message |
| UniqueArray< Int32 > | m_partial_local_ids |
| bool | m_is_check_coherence = false |
Friends | |
| class | VariableSynchronizerComputeList |
Additional Inherited Members | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
Interface of a variable synchronization service.
An instance of this class is created via IParallelMng::createVariableSynchronizer(). An instance is associated with an item group. The compute() function must be called to calculate the synchronization information.
Definition at line 53 of file VariableSynchronizer.h.
| Arcane::VariableSynchronizer::VariableSynchronizer | ( | IParallelMng * | pm, |
| const ItemGroup & | group, | ||
| Ref< IDataSynchronizeImplementationFactory > | implementation_factory ) |
Definition at line 198 of file VariableSynchronizer.cc.
|
override |
Definition at line 236 of file VariableSynchronizer.cc.
|
private |
Definition at line 246 of file VariableSynchronizer.cc.
|
private |
Definition at line 263 of file VariableSynchronizer.cc.
|
private |
Indicates if the variables in the list vars can be synchronized at once.
For this to be possible, these variables must not be partial and must rely on the same ItemGroup (i.e., belong to the same family)
Definition at line 546 of file VariableSynchronizer.cc.
References Arcane::IVariable::isPartial(), and Arcane::IVariable::itemGroup().
Referenced by synchronize(), and synchronize().
|
private |
Definition at line 651 of file VariableSynchronizer.cc.
|
private |
Definition at line 316 of file VariableSynchronizer.cc.
|
private |
Definition at line 354 of file VariableSynchronizer.cc.
|
private |
Definition at line 616 of file VariableSynchronizer.cc.
|
private |
Definition at line 627 of file VariableSynchronizer.cc.
|
private |
Definition at line 641 of file VariableSynchronizer.cc.
|
private |
Positions the device associated with our RunQueue as the current device.
If a RunQueue is used, it positions the device associated with that RunQueue. This ensures that memory allocations performed during synchronizations will be on the correct device.
Definition at line 668 of file VariableSynchronizer.cc.
Referenced by compute().
|
private |
Definition at line 504 of file VariableSynchronizer.cc.
|
private |
Definition at line 424 of file VariableSynchronizer.cc.
|
private |
Definition at line 571 of file VariableSynchronizer.cc.
|
overridevirtual |
Called when the local IDs of the entities are modified.
Implements Arcane::IVariableSynchronizer.
Definition at line 526 of file VariableSynchronizer.cc.
References Arcane::TraceAccessor::info().
|
overridevirtual |
Ranks of subdomains with which communication occurs.
Implements Arcane::IVariableSynchronizer.
Definition at line 589 of file VariableSynchronizer.cc.
Referenced by Arcane::VariableSynchronizerMpiCommunicator::compute().
|
overridevirtual |
Creation of the list of synchronization elements.
Implements Arcane::IVariableSynchronizer.
Definition at line 301 of file VariableSynchronizer.cc.
References _setCurrentDevice(), Arcane::VariableSynchronizerComputeList::compute(), Arcane::platform::getCurrentDateTime(), and Arcane::TraceAccessor::info().
Referenced by Arcane::MpiVariableSynchronizer::compute().
|
overridevirtual |
List of local IDs of ghost entities with a subdomain.
The rank of the subdomain is that of communicatingRanks()[index].
Implements Arcane::IVariableSynchronizer.
Definition at line 607 of file VariableSynchronizer.cc.
|
inlineoverridevirtual |
Entity group used for synchronization.
The current implementation only supports the group of all entities of a family.
Implements Arcane::IVariableSynchronizer.
Definition at line 73 of file VariableSynchronizer.h.
|
inlineoverridevirtual |
Event sent at the beginning and end of synchronization.
This event is sent during calls to the methods synchronize(IVariable* var) and synchronize(VariableCollection vars). If you wish to be notified of synchronizations for all instances of IVariableSynchronizer, you must use IVariableMng::synchronizerMng().
Implements Arcane::IVariableSynchronizer.
Definition at line 95 of file VariableSynchronizer.h.
|
inlineoverridevirtual |
Associated parallel manager.
Implements Arcane::IVariableSynchronizer.
Definition at line 68 of file VariableSynchronizer.h.
|
overridevirtual |
List of local IDs of entities shared with a subdomain.
The rank of the subdomain is that of communicatingRanks()[index].
Implements Arcane::IVariableSynchronizer.
Definition at line 598 of file VariableSynchronizer.cc.
|
overridevirtual |
Synchronizes the variable var in blocking mode.
Implements Arcane::IVariableSynchronizer.
Definition at line 443 of file VariableSynchronizer.cc.
|
overridevirtual |
Synchronizes the variable var on the entities local_ids in blocking mode.
Only the entities listed in local_ids will be synchronized. Note: an entity present in this list on one subdomain must be present in this list for any other subdomain that owns this entity.
Reimplemented from Arcane::IVariableSynchronizer.
Definition at line 452 of file VariableSynchronizer.cc.
|
overridevirtual |
Synchronizes the variables vars in blocking mode.
All variables must belong to the same family and this entity group.
Implements Arcane::IVariableSynchronizer.
Definition at line 462 of file VariableSynchronizer.cc.
References _canSynchronizeMulti().
|
overridevirtual |
Synchronizes the variables vars in blocking mode.
All variables must belong to the same family and this entity group.
Only the entities listed in local_ids will be synchronized. Note: an entity present in this list on one subdomain must be present in this list for any other subdomain that owns this entity.
Reimplemented from Arcane::IVariableSynchronizer.
Definition at line 482 of file VariableSynchronizer.cc.
References _canSynchronizeMulti().
|
overridevirtual |
Synchronizes the data data.
The data data must be associated with a variable for which it is valid to call synchronize(). This method is internal to Arcane.
Implements Arcane::IVariableSynchronizer.
Definition at line 513 of file VariableSynchronizer.cc.
References Arcane::IData::_commonInternal(), ARCANE_CHECK_POINTER, ARCANE_FATAL, and Arcane::IDataInternal::numericData().
|
inline |
Definition at line 102 of file VariableSynchronizer.h.
|
friend |
Definition at line 57 of file VariableSynchronizer.h.
|
private |
Definition at line 111 of file VariableSynchronizer.h.
|
private |
Definition at line 116 of file VariableSynchronizer.h.
|
private |
Definition at line 114 of file VariableSynchronizer.h.
|
private |
Definition at line 122 of file VariableSynchronizer.h.
|
private |
Definition at line 110 of file VariableSynchronizer.h.
|
private |
Definition at line 107 of file VariableSynchronizer.h.
|
private |
Definition at line 113 of file VariableSynchronizer.h.
|
private |
Definition at line 106 of file VariableSynchronizer.h.
|
private |
Definition at line 121 of file VariableSynchronizer.h.
|
private |
Definition at line 120 of file VariableSynchronizer.h.
|
private |
Definition at line 119 of file VariableSynchronizer.h.
|
private |
Definition at line 117 of file VariableSynchronizer.h.
|
private |
Definition at line 108 of file VariableSynchronizer.h.
|
private |
Definition at line 109 of file VariableSynchronizer.h.
|
private |
Definition at line 112 of file VariableSynchronizer.h.
|
private |
Definition at line 115 of file VariableSynchronizer.h.