#include <arcane/mesh/NonBlockingParticleExchanger.h>
Public Member Functions | |
| NonBlockingParticleExchanger (const ServiceBuildInfo &sbi) | |
| void | build () override |
| Build-level construction of the service. | |
| void | initialize (IItemFamily *item_family) override |
| Initializes the exchanger for the item_family item_family. | |
| void | beginNewExchange (Integer nb_particule) override |
| Starts a new particle exchange. | |
| IItemFamily * | itemFamily () override |
| Associated family. | |
| bool | exchangeItems (Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, ItemGroup item_group, IFunctor *functor) override |
| Exchanges particles between sub-domains. | |
| bool | exchangeItems (Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, Int32Array *new_particle_local_ids, IFunctor *functor) override |
| Exchanges particles between sub-domains. | |
| void | sendItems (Integer nb_particle_finish_exchange, Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send) override |
| bool | waitMessages (Integer nb_pending_particle, Int32Array *new_particle_local_ids, IFunctor *functor) override |
| void | addNewParticles (Integer nb_particle) override |
| Adds nb_particle to the current exchange. | |
| void | setVerboseLevel (Integer level) override |
| Sets the verbosity level (0 for no messages). | |
| Integer | verboseLevel () const override |
| Verbosity level. | |
| IAsyncParticleExchanger * | asyncParticleExchanger () override |
| Asynchronism management (returns nullptr if functionality is not available). | |
| void | reset () |
| Public Member Functions inherited from Arcane::BasicService | |
| ~BasicService () override | |
| Releases resources. | |
| virtual ISubDomain * | subDomain () |
| Public Member Functions inherited from Arcane::AbstractService | |
| ~AbstractService () override | |
| Destructor. | |
| IServiceInfo * | serviceInfo () const override |
| Access to service information. See IServiceInfo for details. | |
| IBase * | serviceParent () const override |
| Access to the base interface of main Arcane objects. | |
| IService * | serviceInterface () override |
| Returns the low-level IService interface of the service. | |
| 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 |
| Public Member Functions inherited from Arcane::IService | |
| virtual | ~IService () |
| Releases resources. | |
| Public Member Functions inherited from Arcane::MeshAccessor | |
| MeshAccessor (ISubDomain *sd) | |
| MeshAccessor (IMesh *mesh) | |
| MeshAccessor (const MeshHandle &mesh_handle) | |
| Integer | nbCell () const |
| Returns the number of cells in the mesh. | |
| Integer | nbFace () const |
| Returns the number of faces in the mesh. | |
| Integer | nbEdge () const |
| Returns the number of edges in the mesh. | |
| Integer | nbNode () const |
| Returns the number of nodes in the mesh. | |
| VariableNodeReal3 & | nodesCoordinates () const |
| Returns the coordinates of the mesh nodes. | |
| NodeGroup | allNodes () const |
| Returns the group containing all nodes. | |
| EdgeGroup | allEdges () const |
| Returns the group containing all edges. | |
| FaceGroup | allFaces () const |
| Returns the group containing all faces. | |
| CellGroup | allCells () const |
| Returns the group containing all cells. | |
| FaceGroup | outerFaces () const |
| Returns the group containing all boundary faces. | |
| NodeGroup | ownNodes () const |
| Returns the group containing all nodes specific to this domain. | |
| CellGroup | ownCells () const |
| Returns the group containing all cells specific to this domain. | |
| FaceGroup | ownFaces () const |
| Group containing all faces specific to this domain. | |
| EdgeGroup | ownEdges () const |
| Group containing all edges specific to this domain. | |
| IMesh * | mesh () const |
| const MeshHandle & | meshHandle () const |
| Public Member Functions inherited from Arcane::CommonVariables | |
| CommonVariables (IModule *c) | |
| Constructs the references of the common variables for the module c. | |
| CommonVariables (IVariableMng *variable_mng) | |
| Constructs the references of the common variables for the manager variable_mng. | |
| CommonVariables (ISubDomain *sd) | |
| Constructs the references of the common variables for the subdomain sd. | |
| virtual | ~CommonVariables () |
| Releases resources. | |
| Int32 | globalIteration () const |
| Current iteration number. | |
| Real | globalTime () const |
| Current time. | |
| Real | globalOldTime () const |
| Previous current time. | |
| Real | globalFinalTime () const |
| Final time of the simulation. | |
| Real | globalDeltaT () const |
| Current Delta T. | |
| Real | globalCPUTime () const |
| CPU time used (in seconds). | |
| Real | globalOldCPUTime () const |
| Previous CPU time used (in seconds). | |
| Real | globalElapsedTime () const |
| Clock time (elapsed) used (in seconds). | |
| Real | globalOldElapsedTime () const |
| Previous clock time (elapsed) used (in seconds). | |
| Public Member Functions inherited from Arcane::IParticleExchanger | |
| virtual | ~IParticleExchanger ()=default |
| Releases resources. | |
Private Member Functions | |
| void | _clearMessages () |
| void | _serializeMessage (ISerializeMessage *msg, Int32ConstArrayView acc_ids, Int64Array &items_to_send_uid, Int64Array &items_to_send_cells_uid) |
| void | _deserializeMessage (ISerializeMessage *msg, Int64Array &items_to_create_id, Int64Array &items_to_create_cell_id, ItemGroup item_group, Int32Array *new_particle_local_ids) |
| void | _processFinishTrackingMessage () |
| void | _addFinishExchangeParticle (Int64 nb_particle_finish_exchange) |
| void | _sendFinishExchangeParticle () |
| void | _addItemsToSend (Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, Int32ConstArrayView communicating_sub_domains, UniqueArray< SharedArray< Int32 > > &ids_to_send) |
| void | _sendPendingMessages () |
| void | _checkNeedReceiveMessage () |
| bool | _exchangeItems (Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send, ItemGroup item_group, Int32Array *new_particle_local_ids, IFunctor *functor) |
| void | _checkSendItems (Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send) |
| void | _generateSendItemsMessages (Int32ConstArrayView local_ids, Int32ConstArrayView sub_domains_to_send) |
| void | _checkInitialized () |
| void | _processMessages (ItemGroup item_group, Int32Array *new_particle_local_ids, bool wait_all, IFunctor *functor) |
| bool | _waitMessages (Integer nb_pending_particle, ItemGroup group, Int32Array *new_particle_local_ids, IFunctor *functor) |
Static Private Attributes | |
| static const Integer | MESSAGE_EXCHANGE = 1 |
| static const Integer | MESSAGE_NB_FINISH_EXCHANGE = 2 |
| static const Integer | MESSAGE_FINISH_EXCHANGE_STATUS = 3 |
| static const Integer | MESSAGE_CHANGE_BLOCKING = 4 |
Additional Inherited Members | |
| Public Attributes inherited from Arcane::CommonVariables | |
| VariableScalarInt32 | m_global_iteration |
| Current iteration. | |
| VariableScalarReal | m_global_time |
| Current time. | |
| VariableScalarReal | m_global_deltat |
| Global Delta T. | |
| VariableScalarReal | m_global_old_time |
| Time previous to the current time. | |
| VariableScalarReal | m_global_old_deltat |
| Delta T at the time previous to the global time. | |
| VariableScalarReal | m_global_final_time |
| Final time of the case. | |
| VariableScalarReal | m_global_old_cpu_time |
| Previous CPU time used (in seconds). | |
| VariableScalarReal | m_global_cpu_time |
| CPU time used (in seconds). | |
| VariableScalarReal | m_global_old_elapsed_time |
| Previous clock time used (in seconds). | |
| VariableScalarReal | m_global_elapsed_time |
| Clock time used (in seconds). | |
| Protected Member Functions inherited from Arcane::BasicService | |
| BasicService (const ServiceBuildInfo &) | |
| Protected Member Functions inherited from Arcane::AbstractService | |
| AbstractService (const ServiceBuildInfo &) | |
| Constructor from a ServiceBuildInfo. | |
| Protected Member Functions inherited from Arcane::TraceAccessor | |
| void | _setLocalVerboseLevel (Int32 v) |
| Int32 | _localVerboseLevel () const |
| Protected Member Functions inherited from Arcane::IService | |
| IService () | |
| Constructor. | |
Particle Exchanger.
Definition at line 46 of file NonBlockingParticleExchanger.h.
|
explicit |
Definition at line 46 of file NonBlockingParticleExchanger.cc.
|
override |
Definition at line 82 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 777 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 370 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 827 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 289 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 209 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 111 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 577 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 233 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 302 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 713 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 410 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 750 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 472 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 500 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 259 of file NonBlockingParticleExchanger.cc.
|
inlineoverridevirtual |
Adds nb_particle to the current exchange.
This method allows indicating that new particles will participate in the exchange, for example following their creation.
Implements Arcane::IParticleExchanger.
Definition at line 86 of file NonBlockingParticleExchanger.h.
|
inlineoverridevirtual |
Asynchronism management (returns nullptr if functionality is not available).
Implements Arcane::IParticleExchanger.
Definition at line 93 of file NonBlockingParticleExchanger.h.
|
overridevirtual |
Starts a new particle exchange.
nb_particle is the number of particles in the sub-domain that will take part in a potential exchange.
This method is collective and must be called by all sub-domains.
Implements Arcane::IParticleExchanger.
Definition at line 124 of file NonBlockingParticleExchanger.cc.
References Arcane::platform::getCurrentDateTime(), Arcane::TraceAccessor::info(), m_nb_blocking_size, m_variables_to_exchange, Arcane::IParallelMng::reduce(), and Arcane::MessagePassing::ReduceSum.
|
inlineoverridevirtual |
Build-level construction of the service.
This method is called right after the constructor.
Reimplemented from Arcane::AbstractService.
Definition at line 64 of file NonBlockingParticleExchanger.h.
|
overridevirtual |
Exchanges particles between sub-domains.
This operation sends the particles from the item_family item_family whose local indices are given by the list local_ids to the sub-domains specified by sub_domains_to_send, and receives from these same sub-domains those that this sub-domain owns. The sent particles are deleted from the item_family item_family and the received ones are added.
Variables associated with the item_family item_family are transferred at the same time as the particles.
This operation is collective and blocking.
If new_particle_local_ids is not null, it will contain in return the array of local indices of the new entities.
If wait_functor is not null, the functor is called during the sending and receiving of messages. It is then possible to perform operations. Operations must not use particles, nor variables on the particles of the exchanged family.
a true if all exchange phases are finished
a false otherwise
Implements Arcane::IParticleExchanger.
Definition at line 172 of file NonBlockingParticleExchanger.cc.
|
overridevirtual |
Exchanges particles between sub-domains.
This operation sends the particles from the item_family item_family whose local indices are given by the list local_ids to the sub-domains specified by sub_domains_to_send, and receives from these same sub-domains those that this sub-domain owns. The sent particles are deleted from the item_family item_family and the received ones are added.
Variables associated with the item_family item_family are transferred at the same time as the particles.
This operation is collective and blocking.
If item_group is not null, it will contain the list of new entities in return.
If wait_functor is not null, the functor is called during the sending and receiving of messages. It is then possible to perform operations. Operations must not use particles, nor variables on the particles of the exchanged family.
a true if all exchange phases are finished
a false otherwise
Implements Arcane::IParticleExchanger.
Definition at line 158 of file NonBlockingParticleExchanger.cc.
|
overridevirtual |
Initializes the exchanger for the item_family item_family.
Implements Arcane::IParticleExchanger.
Definition at line 102 of file NonBlockingParticleExchanger.cc.
|
inlineoverridevirtual |
Associated family.
Implements Arcane::IParticleExchanger.
Definition at line 70 of file NonBlockingParticleExchanger.h.
| void Arcane::mesh::NonBlockingParticleExchanger::reset | ( | ) |
Definition at line 702 of file NonBlockingParticleExchanger.cc.
|
overridevirtual |
Implements Arcane::IParticleExchanger.
Definition at line 187 of file NonBlockingParticleExchanger.cc.
|
inlineoverridevirtual |
Sets the verbosity level (0 for no messages).
Implements Arcane::IParticleExchanger.
Definition at line 91 of file NonBlockingParticleExchanger.h.
|
inlineoverridevirtual |
Verbosity level.
Implements Arcane::IParticleExchanger.
Definition at line 92 of file NonBlockingParticleExchanger.h.
|
overridevirtual |
Implements Arcane::IParticleExchanger.
Definition at line 200 of file NonBlockingParticleExchanger.cc.
|
private |
Definition at line 101 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 132 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 133 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 131 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 128 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 145 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 99 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 129 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 119 of file NonBlockingParticleExchanger.h.
|
private |
Number of remaining particles before switching to blocking mode.
Definition at line 126 of file NonBlockingParticleExchanger.h.
Referenced by beginNewExchange().
|
private |
Definition at line 124 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 140 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 138 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 122 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 121 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 130 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 100 of file NonBlockingParticleExchanger.h.
|
private |
List of messages pending sending.
Definition at line 114 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 103 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 106 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 107 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 108 of file NonBlockingParticleExchanger.h.
|
private |
List of variables to exchange.
Definition at line 111 of file NonBlockingParticleExchanger.h.
Referenced by beginNewExchange().
|
private |
Definition at line 144 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 142 of file NonBlockingParticleExchanger.h.
|
private |
List of messages sent but currently being processed.
Definition at line 117 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 143 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 136 of file NonBlockingParticleExchanger.h.
|
private |
Definition at line 135 of file NonBlockingParticleExchanger.h.
|
staticprivate |
Definition at line 55 of file NonBlockingParticleExchanger.h.
|
staticprivate |
Definition at line 52 of file NonBlockingParticleExchanger.h.
|
staticprivate |
Definition at line 54 of file NonBlockingParticleExchanger.h.
|
staticprivate |
Definition at line 53 of file NonBlockingParticleExchanger.h.