Base class for a load balancing service. More...
#include <arcane/std/MeshPartitionerBase.h>
Public Types | |
| enum | eMarkCellWithConstraint { eCellClassical , eCellReference , eCellGrouped , eCellGhost , eCellInAConstraint } |
Public Member Functions | |
| MeshPartitionerBase (const ServiceBuildInfo &sbi) | |
| ISubDomain * | subDomain () const |
| IMesh * | mesh () const override |
| Mesh associated with the partitioner. | |
| void | setMaximumComputationTime (Real v) override |
| Sets the proportion of computation time. | |
| Real | maximumComputationTime () const override |
| void | setImbalance (Real v) override |
| Sets the computation time imbalance. | |
| Real | imbalance () const override |
| Computation time imbalance. | |
| void | setMaxImbalance (Real v) override |
| Sets the maximum allowed imbalance. | |
| Real | maxImbalance () const override |
| Maximum allowed imbalance. | |
| void | setComputationTimes (RealConstArrayView v) override |
| Computation time of this subdomain. The first element indicates the computation time of the subdomain corresponding to calculations whose cost is proportional to the cells. The following must be associated with a variable (to be done). | |
| RealConstArrayView | computationTimes () const override |
| void | setCellsWeight (ArrayView< float > weights, Integer nb_weight) override |
| Allows defining the weights of objects to be partitioned: ILoadBalanceMng must now be used. | |
| ArrayView< float > | cellsWeight () const override |
| Integer | nbCellWeight () const |
| void | setILoadBalanceMng (ILoadBalanceMng *mng) override |
| Changes the ILoadBalanceMng to use. | |
| ILoadBalanceMng * | loadBalanceMng () const override |
| void | notifyEndPartition () override |
| Notification when a re-partitioning finishes (after entity exchange). | |
| virtual void | changeOwnersFromCells () |
| Positions the new owners of nodes, edges and faces based on the cells. | |
| virtual void | initConstraints (bool uidref=true) |
| virtual void | freeConstraints () |
| virtual Int32 | nbOwnCellsWithConstraints () const |
| virtual Real | getNeighbourCellsUidWithConstraints (Cell cell, Int64Array &neighbourcells, Array< float > *commWeights=NULL, bool noCellContrib=false) |
| virtual Integer | nbNeighbourCellsWithConstraints (Cell cell) |
| virtual void | getNeighbourNodesUidWithConstraints (Cell cell, Int64UniqueArray neighbournodes) |
| virtual Int32 | localIdWithConstraints (Cell cell) |
| virtual Int32 | localIdWithConstraints (Int32 cell_lid) |
| virtual void | invertArrayLid2LidCompacted () |
| virtual SharedArray< float > | cellsWeightsWithConstraints (Int32 max_nb_weight=0, bool ask_lb_cells=false) |
| virtual SharedArray< float > | cellsSizeWithConstraints () |
| virtual bool | cellUsedWithConstraints (Cell cell) |
| virtual bool | cellUsedWithWeakConstraints (std::pair< Int64, Int64 > &paired_item) |
| virtual void | changeCellOwner (Item cell, VariableItemInt32 &cells_new_owner, Int32 new_owner) |
| virtual bool | haveConstraints () |
| virtual bool | haveWeakConstraints () |
| Public Member Functions inherited from Arcane::AbstractService | |
| ~AbstractService () override | |
| Destructor. | |
| virtual void | build () |
| Build-level construction of the service. | |
| 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::IMeshPartitioner | |
| virtual void | build ()=0 |
| virtual void | partitionMesh (bool initial_partition, Int32 nb_part)=0 |
| virtual IPrimaryMesh * | primaryMesh () override |
| Associated mesh. | |
| virtual void | partitionMesh (bool initial_partition)=0 |
| Public Member Functions inherited from Arcane::IMeshPartitionerBase | |
| virtual | ~IMeshPartitionerBase ()=default |
| Releases resources. | |
Protected Member Functions | |
| virtual void | dumpObject (String filename="toto") |
| Dumps the partitioning information to disk. | |
| virtual void * | getCommunicator () const |
| virtual Parallel::Communicator | communicator () const |
| virtual bool | cellComm () |
| virtual void | _initArrayCellsWithConstraints () |
| virtual void | _initFilterLidCells () |
| virtual void | _initUidRef () |
| virtual void | _initUidRef (VariableCellInteger &cell_renum_uid) |
| virtual void | _initLid2LidCompacted () |
| virtual void | _initNbCellsWithConstraints () |
| virtual void | _clearCellWgt () |
| bool | _isNonManifoldMesh () const |
| Int32 | _meshDimension () const |
| 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. | |
Protected Attributes | |
| IItemFamily * | m_cell_family = nullptr |
Private Member Functions | |
| Real | _addNgb (const Cell &cell, const Face &face, Int64Array &neighbourcells, Array< bool > &contrib, HashTableMapT< Int64, Int32 > &map, Array< float > *ptrcommWeights, Int32 offset, HashTableMapT< Int32, Int32 > &lids, bool special=false) |
| bool | _createConstraintsLists (Int64MultiArray2 &tied_uid) |
| SharedArray< float > | _cellsProjectWeights (VariableCellArrayReal &cellWgtIn, Int32 nbWgt) const |
| SharedArray< float > | _cellsProjectWeights (VariableCellReal &cellWgtIn) const |
| void | _checkCreateVar () |
Private Attributes | |
| ISubDomain * | m_sub_domain = nullptr |
| IMesh * | m_mesh = nullptr |
| IParallelMng * | m_pm_sub = nullptr |
| ILoadBalanceMng * | m_lbMng = nullptr |
| ILoadBalanceMngInternal * | m_lb_mng_internal = nullptr |
| Real | m_maximum_computation_time = 0.0 |
| Real | m_imbalance = 0.0 |
| Real | m_max_imbalance = 0.0 |
| UniqueArray< Real > | m_computation_times |
| UniqueArray< SharedArray< Cell > > | m_cells_with_constraints |
| std::set< std::pair< Int64, Int64 > > | m_cells_with_weak_constraints |
| Integer | m_nb_cells_with_constraints = 0 |
| UniqueArray< eMarkCellWithConstraint > | m_filter_lid_cells |
| UniqueArray< Int32 > | m_local_id_2_local_id_compacted |
| VariableCellInt64 * | m_unique_id_reference = nullptr |
| UniqueArray< Int32 > | m_check |
| bool | m_is_non_manifold_mesh = false |
| Int32 | m_mesh_dimension = -1 |
Base class for a load balancing service.
Definition at line 40 of file MeshPartitionerBase.h.
| enum Arcane::MeshPartitionerBase::eMarkCellWithConstraint |
Definition at line 90 of file MeshPartitionerBase.h.
|
explicit |
Definition at line 55 of file MeshPartitionerBase.cc.
|
override |
Definition at line 72 of file MeshPartitionerBase.cc.
|
private |
Definition at line 428 of file MeshPartitionerBase.cc.
|
private |
Definition at line 671 of file MeshPartitionerBase.cc.
|
private |
Definition at line 702 of file MeshPartitionerBase.cc.
|
private |
Definition at line 287 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 802 of file MeshPartitionerBase.cc.
|
private |
Definition at line 152 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 207 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 257 of file MeshPartitionerBase.cc.
|
protectedvirtual |
info()<<"m_local_id_2_local_id_compacted["<<icell->localId()<<"(gid:"<<icell->uniqueId()<<")] = "<<index-1;
Definition at line 344 of file MeshPartitionerBase.cc.
References ENUMERATE_CELL.
|
protectedvirtual |
Definition at line 375 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 297 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 320 of file MeshPartitionerBase.cc.
|
inlineprotected |
Definition at line 168 of file MeshPartitionerBase.h.
|
inlineprotected |
Definition at line 169 of file MeshPartitionerBase.h.
|
inlineprotectedvirtual |
Definition at line 154 of file MeshPartitionerBase.h.
|
virtual |
Definition at line 643 of file MeshPartitionerBase.cc.
|
overridevirtual |
Implements Arcane::IMeshPartitioner.
Definition at line 796 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 650 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 723 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 731 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 739 of file MeshPartitionerBase.cc.
|
virtual |
Positions the new owners of nodes, edges and faces based on the cells.
Assuming the new owners of the cells are known (and synchronized), determines the new owners of the other entities.
Definition at line 100 of file MeshPartitionerBase.cc.
Referenced by Arcane::MetisMeshPartitioner::_partitionMesh(), Arcane::SplitSDMeshPartitioner::ConnexifieDomaine(), Arcane::SplitSDMeshPartitioner::Equilibrage(), and Arcane::SplitSDMeshPartitioner::init().
|
protectedvirtual |
Definition at line 91 of file MeshPartitionerBase.cc.
|
inlineoverridevirtual |
Implements Arcane::IMeshPartitioner.
Definition at line 65 of file MeshPartitionerBase.h.
|
protectedvirtual |
Dumps the partitioning information to disk.
Definition at line 855 of file MeshPartitionerBase.cc.
References Arcane::Array< T >::add(), Arcane::centralizePartInfo(), dumpObject(), ENUMERATE_CELL, Arcane::Array< T >::fill(), mesh(), Arcane::IParallelMng::reduce(), Arcane::MessagePassing::ReduceSum, Arcane::AbstractArray< T >::size(), Arcane::Convert::toDouble(), Arcane::StringBuilder::toString(), and Arcane::IParallelMng::waitAllRequests().
Referenced by dumpObject().
|
virtual |
Definition at line 134 of file MeshPartitionerBase.cc.
|
protectedvirtual |
Definition at line 82 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 478 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 604 of file MeshPartitionerBase.cc.
|
inlinevirtual |
Definition at line 143 of file MeshPartitionerBase.h.
|
inlinevirtual |
Definition at line 145 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Computation time imbalance.
Implements Arcane::IMeshPartitioner.
Definition at line 59 of file MeshPartitionerBase.h.
Referenced by Arcane::MetisMeshPartitioner::_partitionMesh().
|
virtual |
Definition at line 109 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 629 of file MeshPartitionerBase.cc.
|
inlineoverridevirtual |
Implements Arcane::IMeshPartitioner.
Definition at line 73 of file MeshPartitionerBase.h.
Definition at line 615 of file MeshPartitionerBase.cc.
Definition at line 621 of file MeshPartitionerBase.cc.
|
inlineoverridevirtual |
Maximum allowed imbalance.
Implements Arcane::IMeshPartitioner.
Definition at line 62 of file MeshPartitionerBase.h.
Referenced by Arcane::MetisMeshPartitioner::_partitionMesh(), and Arcane::SplitSDMeshPartitioner::Equilibrage().
|
inlineoverridevirtual |
Implements Arcane::IMeshPartitioner.
Definition at line 56 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Mesh associated with the partitioner.
Implements Arcane::IMeshPartitioner.
Definition at line 52 of file MeshPartitionerBase.h.
Referenced by dumpObject().
| Integer Arcane::MeshPartitionerBase::nbCellWeight | ( | ) | const |
Definition at line 790 of file MeshPartitionerBase.cc.
Definition at line 410 of file MeshPartitionerBase.cc.
|
virtual |
Definition at line 402 of file MeshPartitionerBase.cc.
|
inlineoverridevirtual |
Notification when a re-partitioning finishes (after entity exchange).
Implements Arcane::IMeshPartitionerBase.
Reimplemented in Arcane::ZoltanMeshPartitioner.
Definition at line 77 of file MeshPartitionerBase.h.
|
overridevirtual |
Allows defining the weights of objects to be partitioned: ILoadBalanceMng must now be used.
Implements Arcane::IMeshPartitioner.
Definition at line 765 of file MeshPartitionerBase.cc.
References ENUMERATE_CELL, Arcane::IVariable::PExecutionDepend, Arcane::IVariable::PNoDump, Arcane::IVariable::PTemporary, setCellsWeight(), and Arcane::StringBuilder::toString().
Referenced by setCellsWeight().
|
inlineoverridevirtual |
Computation time of this subdomain. The first element indicates the computation time of the subdomain corresponding to calculations whose cost is proportional to the cells. The following must be associated with a variable (to be done).
Implements Arcane::IMeshPartitioner.
Definition at line 64 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Changes the ILoadBalanceMng to use.
Implements Arcane::IMeshPartitioner.
Definition at line 72 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Sets the computation time imbalance.
Implements Arcane::IMeshPartitioner.
Definition at line 58 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Sets the maximum allowed imbalance.
Implements Arcane::IMeshPartitioner.
Definition at line 61 of file MeshPartitionerBase.h.
|
inlineoverridevirtual |
Sets the proportion of computation time.
Proportion of computation time Computation time of the most heavily loaded subdomain
Implements Arcane::IMeshPartitioner.
Definition at line 55 of file MeshPartitionerBase.h.
|
inline |
Definition at line 51 of file MeshPartitionerBase.h.
|
protected |
Definition at line 189 of file MeshPartitionerBase.h.
|
private |
Definition at line 202 of file MeshPartitionerBase.h.
|
private |
Definition at line 203 of file MeshPartitionerBase.h.
|
private |
Definition at line 210 of file MeshPartitionerBase.h.
|
private |
Definition at line 199 of file MeshPartitionerBase.h.
|
private |
Definition at line 205 of file MeshPartitionerBase.h.
|
private |
Definition at line 197 of file MeshPartitionerBase.h.
|
private |
Definition at line 211 of file MeshPartitionerBase.h.
|
private |
Definition at line 194 of file MeshPartitionerBase.h.
|
private |
Definition at line 193 of file MeshPartitionerBase.h.
|
private |
Definition at line 206 of file MeshPartitionerBase.h.
|
private |
Definition at line 198 of file MeshPartitionerBase.h.
|
private |
Definition at line 196 of file MeshPartitionerBase.h.
|
private |
Definition at line 184 of file MeshPartitionerBase.h.
|
private |
Definition at line 212 of file MeshPartitionerBase.h.
|
private |
Definition at line 204 of file MeshPartitionerBase.h.
|
private |
Definition at line 185 of file MeshPartitionerBase.h.
|
private |
Definition at line 183 of file MeshPartitionerBase.h.
|
private |
Definition at line 207 of file MeshPartitionerBase.h.