Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
MetisWrapper.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* MetisWrapper.h (C) 2000-2024 */
9/* */
10/* Wrapper autour des appels de Parmetis. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_STD_METISWRAPPER
13#define ARCANE_STD_METISWRAPPER
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18
19#include <parmetis.h>
20#include <functional>
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25namespace Arcane
26{
27class MetisGraphView;
28class IParallelMng;
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
36: public TraceAccessor
37{
38 private:
39
40 using MetisCall = std::function<int(IParallelMng* pm, MetisGraphView graph,
42
43 public:
44
45 explicit MetisWrapper(IParallelMng* pm);
46
47 public:
48
56 int callPartKway(const bool print_digest, const bool gather,
57 idx_t* vtxdist, idx_t* xadj, idx_t* adjncy, idx_t* vwgt,
59 real_t* tpwgts, real_t* ubvec, idx_t* options, idx_t* edgecut, idx_t* part);
60
69 int callAdaptiveRepart(const bool print_digest, const bool gather,
70 idx_t* vtxdist, idx_t* xadj, idx_t* adjncy, idx_t* vwgt,
71 idx_t* vsize, idx_t* adjwgt, idx_t* wgtflag, idx_t* numflag, idx_t* ncon,
73 idx_t* options, idx_t* edgecut, idx_t* part);
74
75 private:
76
77 IParallelMng* m_parallel_mng = nullptr;
78
79 private:
80
81 int _callMetisWith2Processors(const Int32 ncon, const bool need_part,
83 MetisCall& metis);
84};
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89} // End namespace Arcane
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
93
94#endif
Interface du gestionnaire de parallélisme pour un sous-domaine.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Wrapper autour des appels de Parmetis.
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 autour de la routine ParMetis "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 autour de la routine ParMetis "ParMETIS_V3_AdaptiveRepart".
int _callMetisWith2Processors(const Int32 ncon, const bool need_part, ConstArrayView< idx_t > vtxdist, MetisGraphView my_graph, MetisCall &metis)
Appelle Metis en regroupant le graph sur 2 processeurs.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-