14#include "arcane/utils/NotImplementedException.h"
15#include "arcane/utils/CheckedConvert.h"
17#include "arcane/core/IParallelMng.h"
18#include "arcane/core/IMeshBuilderCustomiser.h"
19#include "arcane/core/MeshBuildInfo.h"
21#include "arcane/impl/ArcaneParallelMngSplitterMeshBuilderCustomiser_axl.h"
32class ArcaneParallelMngSplitterMeshBuilderCustomiser
37 explicit ArcaneParallelMngSplitterMeshBuilderCustomiser(
const ServiceBuildInfo& sbi)
47 ARCANE_FATAL(
"subset-ratio '{0}' is strictly positive",divider);
53 for (
Int32 i = 0; i < nb_rank; ++i) {
54 if ((i % divider) == 0)
57 info() <<
"Splitting IParallelMng my_rank=" << my_rank;
58 info() <<
"RanksToKeep=" << kept_ranks;
61 info() <<
"Rank=" << my_rank <<
" RankAfter=" << new_pm.
get()->commRank();
63 info() <<
"Rank=" << my_rank <<
": I am not in the new IParallelMng";
72ARCANE_REGISTER_SERVICE_ARCANEPARALLELMNGSPLITTERMESHBUILDERCUSTOMISER(ArcaneParallelMngSplitterMeshBuilderCustomiser,
73 ArcaneParallelMngSplitterMeshBuilderCustomiser);
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
ArcaneArcaneParallelMngSplitterMeshBuilderCustomiserObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
CaseOptionsArcaneParallelMngSplitterMeshBuilderCustomiser * options() const
Options du jeu de données du service.
void applyCustomisation(MeshBuildInfo &build_info) override
Modify build_info to customise mesh creation.
void add(ConstReferenceType val)
Adds element val to the end of the array.
void reserve(Int64 new_capacity)
Reserves memory for new_capacity elements.
Interface of the parallelism manager for a subdomain.
virtual Int32 commRank() const =0
Rank of this instance in the communicator.
virtual Int32 commSize() const =0
Number of instances in the communicator.
virtual Ref< IParallelMng > createSubParallelMngRef(Int32ConstArrayView kept_ranks)=0
Creates a new parallelism manager for a subset of ranks.
virtual IParallelMng * parallelMng()=0
Returns the parallelism manager.
Parameters necessary for building a mesh.
MeshBuildInfo & addParallelMng(Ref< IParallelMng > pm)
Sets the parallelism manager to create the mesh.
InstanceType * get() const
Associated instance or nullptr if none.
Reference to an instance.
ISubDomain * subDomain() const
Access to the associated ISubDomain.
Structure containing the information to create a service.
TraceMessage info() const
Flow for an information message.
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int32_t Int32
Signed integer type of 32 bits.