[petsc-users] Using parmetis from petsc

Edoardo alinovi edoardo.alinovi at gmail.com
Wed Feb 10 09:00:49 CST 2021


Thanks Matthew,

Probably in my case is a good idea to use parmetis directly as i just need
the cell distribution in pre-procrssing. Thanks for the clarification.

On an affine side, it's a while i am interrogating my self about a thing.
Let's say i have my cell distribution accross processors from parmetis.
Since petsc needs to have the unknows from 1 to N0 hosted by rank 0,
N0+1:N2 hosted by rank 2 and so on, what i am doing is relabelling local
cells in order to meet this requirement . Is that right? I am wondering if
such a way of things is leading to a suboptimal matrix bandwith. What do
you think about this?

Many thanks,

Edoardo

On Wed, 10 Feb 2021, 13:12 Matthew Knepley, <knepley at gmail.com> wrote:

> On Wed, Feb 10, 2021 at 4:07 AM Edoardo alinovi <edoardo.alinovi at gmail.com>
> wrote:
>
>> Hello PETSc friends,
>>
>> I am working on a code to partition a mesh in parallel and I am looking
>> at parmetis. As far as I know petsc is interfaced with metis and parmetis
>> and I have seen people using it within dmplex. Now, I am not using dmplex,
>> but  I have petsc compiled along with my code for the linear system part.
>> I am wondering if there is a way to load up a mesh file in the parmetis
>> format and use petsc to get the elements partitioning only in output. Is
>> that possible?
>>
>
> ParMetis does not really have a mesh format. It partitions distributed
> graphs. Most people want to partition cells in their mesh, and
> then ParMetis would want the graph for cell connectivity. This is not
> usually what people store, so typically there is a conversion process
> here. If you want to use PETSc for partitioning, and not use DMPlex, the
> easiest way to do it is to put your cell connectivity in a Mat,
> storing the adjacency graph for cells. Then use MatPartitioning.
>
>  Thanks,
>
>      Matt
>
>
>> Thank you for the help,
>>
>> Edoardo
>>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210210/376d80cb/attachment.html>


More information about the petsc-users mailing list