Search code examples
mpipartitionmetis

Is the ParMetis generating any information about neighbors of a processor?


I am working on a parallel finite element method on moving meshes.

So I will need to call ParMETIS_V3_AdaptiveRepart from ParMetis to perform re-partitioning every time I re-mesh.

When successful, the function only generates the partitioning information, i.e. the elements on the processors.

However, the neighbors of a process are important as well, in order to construct the ghost layers of a sub-mesh.

So I am wondering if there is any efficient way to get the information about shared (overlapped) entities and neighbors, or does the ParMetis actually provide this information?


Solution

  • ParMetis is the function ParMETIS_V3_AdaptiveRepart does more or less the smae thing as ParMETIS_V3_PartKway

    The ouput of ParMETIS_V3_PartKway is part "an array of size equal to the number of locally-stored vertices. Upon successful completion the partition vector of the locally-stored vertices is written to this array."

    It also returns the number of edges that are cut. (which is only a part of what you want).

    But METIS does not provide a way to create the "ghost layers" as you elegantly say.

    However since you have the created the graph you know how to find each neighbour for each element. And you can check if your neighbour element is in your current process's graph and if part[element]==part[neighbour_element]. If the neighbour element is not in your current process you will have to do a bit of MPI.