Helper class to define Metis graph. More...
Helper class to define Metis graph.
TODO Transform pointer to openfpm vector
graph | structure that store the graph |
Definition at line 97 of file parmetis_dist_util.hpp.
#include <parmetis_dist_util.hpp>
Public Member Functions | |
DistParmetis (Vcluster<> &v_cl, size_t nc) | |
Constructor. | |
~DistParmetis () | |
destructor | |
void | initSubGraph (Graph &sub_g) |
Set the Sub-graph. | |
template<unsigned int i> | |
void | decompose (Graph &sub_g) |
Decompose the graph. | |
template<unsigned int i> | |
void | refine (Graph &sub_g) |
Refine the graph. | |
idx_t * | getPartition () |
Get graph partition vector. | |
void | reset (Graph &sub_g) |
Reset graph and reconstruct it. | |
Private Member Functions | |
void | constructAdjList (Graph &sub_g) |
Construct Adjacency list. | |
Private Attributes | |
Parmetis_dist_graph | Mg |
Graph in parmetis reppresentation. | |
MPI_Comm | comm = (MPI_Comm)NULL |
Communticator for OpenMPI. | |
Vcluster & | v_cl |
VCluster. | |
int | p_id = 0 |
Process rank information. | |
size_t | nc = 0 |
nc Number of partition | |
|
inline |
Constructor.
Construct a metis graph from a Graph_CSR
v_cl | Vcluster |
nc | number of partitions |
Definition at line 181 of file parmetis_dist_util.hpp.
|
inline |
destructor
Destructor, It destroy all the memory allocated
Definition at line 213 of file parmetis_dist_util.hpp.
|
inlineprivate |
Construct Adjacency list.
sub_g | graph in which we construct the adjacency list |
starting point in the adjacency list
Definition at line 119 of file parmetis_dist_util.hpp.
|
inline |
Decompose the graph.
i | which property store the decomposition |
sub_g | graph to decompose |
Definition at line 400 of file parmetis_dist_util.hpp.
|
inline |
Get graph partition vector.
Definition at line 446 of file parmetis_dist_util.hpp.
|
inline |
Set the Sub-graph.
sub_g | Sub-graph to set |
Set option for the graph partitioning (set as default)
adaptiveRepart itr value
init tpwgts to have balanced vertices and ubvec
This is used to indicate the numbering scheme that is used for the vtxdist, xadj, adjncy, and part arrays. (0 for C-style, start from 0 index)
This is used to indicate if the graph is weighted.
Definition at line 302 of file parmetis_dist_util.hpp.
|
inline |
Refine the graph.
i | which property store the refined decomposition |
sub_g | graph to decompose |
Definition at line 428 of file parmetis_dist_util.hpp.
|
inline |
Reset graph and reconstruct it.
sub_g | graph to decompose |
Definition at line 456 of file parmetis_dist_util.hpp.
|
private |
Communticator for OpenMPI.
Definition at line 103 of file parmetis_dist_util.hpp.
|
private |
Graph in parmetis reppresentation.
Definition at line 100 of file parmetis_dist_util.hpp.
|
private |
nc Number of partition
Definition at line 112 of file parmetis_dist_util.hpp.
|
private |
Process rank information.
Definition at line 109 of file parmetis_dist_util.hpp.
|
private |
VCluster.
Definition at line 106 of file parmetis_dist_util.hpp.