[petsc-dev] [pflotran-dev: 976] Re: [pflotran-users: 998] Distorted structured grid

Jed Brown jedbrown at mcs.anl.gov
Sun Nov 3 06:34:53 CST 2013


Paolo Orsini <paolo.orsini at gmail.com> writes:

> The computation of the dual graph of the mesh is a bit more complicated
> than multiplying the adjacency matrix by its transpose, but not far off.
> With this operation, also the cells that share only one node are connected
> in the dual graph.
> Instead, the minimum number of common nodes is >1 (2 in 2D probelms, 3 in
> 3D problems). In fact, this is an input of MatMeshToCellGraph, I should
> have understood this before.
>
> This can be computed doing the transpose adjacency matrix (Adj_T), then
> doing the multiplication line by line of Adj time Adj_T, and discard the
> non zero entries coming from to elements that share a number of nodes less
> than  the minimum number of common nodes imposed. I have not implement this
> yet, any suggestion is welcome.


You can just put in weights of 1.0, call MatMatTransposeMult, and filter
the resulting matrix.  It'll take a bit more memory, but probably not
prohibitively much.

> I also found out that Schotch has a facility to compute a dual graph from a
> mesh, but not PTScotch.
> Once the graph is computed, PTSchotch can load the central dual graph, and
> distribute it into several processors during the loading.
> Am i right to say that PETSC is interfaced only with PTSchotch and not with
> Scotch?

Scotch is serial so even if we had a specialized Scotch interface, it
would not be scalable (memory or time).

> To check if the PTSchotch partition works (within PFLOTRAN ), I am
> computing a DualMat with parmetis, saving it into a file. Then I recompile
> the code (using a petsc compiled with ptscotch), an load the DualMat from a
> file rather then forming a new one. I did a successful test when running on
> one processor. but I am having trouble when try on more.

Make sure you load on the same communicator with the same sizes set (so
that the distribution matches what you expect).  You'll have to be more
specific if you want more help.

> I though the the dual graph was computed only once, even during the mpi
> process, instead it seems to be recomputed more than once. Not sure why....
> sure i am missing something ???

That seems like a question about your program logic.  Should be easy to
figure out if you set a breakpoint in the debugger.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131103/51eb26b9/attachment.sig>


More information about the petsc-dev mailing list