Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::MetisWrapper Class Reference

Wrapper around Parmetis calls. More...

#include <arcane/std/internal/MetisWrapper.h>

Inheritance diagram for Arcane::MetisWrapper:
Collaboration diagram for Arcane::MetisWrapper:

Public Member Functions

 MetisWrapper (IParallelMng *pm)
int callPartKway (const bool print_digest, const bool gather, idx_t *vtxdist, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *adjwgt, idx_t *wgtflag, idx_t *numflag, idx_t *ncon, idx_t *nparts, real_t *tpwgts, real_t *ubvec, idx_t *options, idx_t *edgecut, idx_t *part)
 Simple wrapper around the ParMetis routine "ParMETIS_V3_PartKway".
int callAdaptiveRepart (const bool print_digest, const bool gather, idx_t *vtxdist, idx_t *xadj, idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt, idx_t *wgtflag, idx_t *numflag, idx_t *ncon, idx_t *nparts, real_t *tpwgts, real_t *ubvec, real_t *ipc2redist, idx_t *options, idx_t *edgecut, idx_t *part)
 Simple wrapper around the ParMetis routine "ParMETIS_V3_AdaptiveRepart".
Public Member Functions inherited from Arcane::TraceAccessor
 TraceAccessor (ITraceMng *m)
 Constructs an accessor via the trace manager m.
 TraceAccessor (const TraceAccessor &rhs)
 Copy constructor.
TraceAccessoroperator= (const TraceAccessor &rhs)
 Copy assignment operator.
virtual ~TraceAccessor ()
 Frees resources.
ITraceMngtraceMng () 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 Types

using MetisCall

Private Member Functions

int _callMetisWith2Processors (const Int32 ncon, const bool need_part, ConstArrayView< idx_t > vtxdist, MetisGraphView my_graph, MetisCall &metis)
 Calls Metis by grouping the graph onto 2 processors.

Private Attributes

IParallelMngm_parallel_mng = nullptr

Additional Inherited Members

Protected Member Functions inherited from Arcane::TraceAccessor
void _setLocalVerboseLevel (Int32 v)
Int32 _localVerboseLevel () const

Detailed Description

Wrapper around Parmetis calls.

Definition at line 35 of file MetisWrapper.h.

Member Typedef Documentation

◆ MetisCall

using Arcane::MetisWrapper::MetisCall
private
Initial value:
std::function<int(IParallelMng* pm, MetisGraphView graph,
ArrayView<idx_t> vtxdist)>
Modifiable view of an array of type T.
Interface of the parallelism manager for a subdomain.

Definition at line 40 of file MetisWrapper.h.

Constructor & Destructor Documentation

◆ MetisWrapper()

Arcane::MetisWrapper::MetisWrapper ( IParallelMng * pm)
explicit

Definition at line 37 of file MetisWrapper.cc.

Member Function Documentation

◆ _callMetisWith2Processors()

int Arcane::MetisWrapper::_callMetisWith2Processors ( const Int32 ncon,
const bool need_part,
ConstArrayView< idx_t > vtxdist,
MetisGraphView my_graph,
MetisCall & metis )
private

Calls Metis by grouping the graph onto 2 processors.

Definition at line 53 of file MetisWrapper.cc.

References Arcane::ParallelMngUtils::createSubParallelMngRef(), Arcane::MetisGraphGather::gatherGraph(), Arcane::RefImpl< InstanceType, RefClassType, ImplTagId >::get(), Arcane::MetisGraphGather::scatterPart(), and Arcane::ConstArrayView< T >::size().

Referenced by callAdaptiveRepart(), and callPartKway().

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

◆ callAdaptiveRepart()

int Arcane::MetisWrapper::callAdaptiveRepart ( const bool print_digest,
const bool gather,
idx_t * vtxdist,
idx_t * xadj,
idx_t * adjncy,
idx_t * vwgt,
idx_t * vsize,
idx_t * adjwgt,
idx_t * wgtflag,
idx_t * numflag,
idx_t * ncon,
idx_t * nparts,
real_t * tpwgts,
real_t * ubvec,
real_t * ipc2redist,
idx_t * options,
idx_t * edgecut,
idx_t * part )

Simple wrapper around the ParMetis routine "ParMETIS_V3_AdaptiveRepart".

When gather == true, the graph is grouped on 2 processors before calling ParMETIS_V3_AdaptiveRepart. When print_digest == true, the signature of the inputs/outputs of ParMETIS_V3_AdaptiveRepart is displayed.

Definition at line 221 of file MetisWrapper.cc.

References _callMetisWith2Processors(), Arcane::IParallelMng::communicator(), Arcane::MetisGraphDigest::computeInputDigest(), Arcane::MetisGraphDigest::computeOutputDigest(), Arcane::TraceAccessor::info(), and Arcane::TraceAccessor::pwarning().

Referenced by Arcane::MetisMeshPartitioner::_partitionMesh().

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

◆ callPartKway()

int Arcane::MetisWrapper::callPartKway ( const bool print_digest,
const bool gather,
idx_t * vtxdist,
idx_t * xadj,
idx_t * adjncy,
idx_t * vwgt,
idx_t * adjwgt,
idx_t * wgtflag,
idx_t * numflag,
idx_t * ncon,
idx_t * nparts,
real_t * tpwgts,
real_t * ubvec,
idx_t * options,
idx_t * edgecut,
idx_t * part )

Simple wrapper around the ParMetis routine "ParMETIS_V3_PartKway".

When gather == true, the graph is grouped on 2 processors before calling ParMETIS_V3_PartKway. When print_digest == true, the signature of the inputs/outputs of ParMETIS_V3_PartKway is displayed.

Definition at line 118 of file MetisWrapper.cc.

References _callMetisWith2Processors(), Arcane::IParallelMng::communicator(), Arcane::MetisGraphDigest::computeInputDigest(), Arcane::MetisGraphDigest::computeOutputDigest(), Arcane::TraceAccessor::info(), and Arcane::TraceAccessor::pwarning().

Referenced by Arcane::MetisMeshPartitioner::_partitionMesh().

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

Member Data Documentation

◆ m_parallel_mng

IParallelMng* Arcane::MetisWrapper::m_parallel_mng = nullptr
private

Definition at line 76 of file MetisWrapper.h.


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