[petsc-users] newbie question on the parallel allocation of matrices

Matthew Knepley knepley at gmail.com
Mon Dec 5 12:12:21 CST 2011


On Mon, Dec 5, 2011 at 11:55 AM, Treue, Frederik <frtr at risoe.dtu.dk> wrote:

> >   Ghosted has nothing to do with MPI communication!  Ghosted vs None is
> only about the physical boundary, nothing to do with the boundary between
> domains.
>
> >    Ghosted is only for the (nonlinear) function evaluation. It is not
> for storage of the Jacobian/matrix.
>
> >  I suggest just using NONE and make your life and understanding easier.
> You can do Neuman and Dirichlet boundary conditions with none just fine.
>
>
> OK, I tried this, but as far as I can see, GHOSTED and NONE _does_ effect
> the MPI communication. I'm setting up a simple FD matrix for a first order
> differncial operator in (say) the x direction (periodic in the y
> direction), which should have dirichlet boundary conditions, ie.
>

1) I can't make any sense of what you are doing. If you describe it
carefully, maybe this can be puzzled out.

2) NONE is very simple, it does nothing for boundaries, so there should be
no surprises

3) When showing an example, make it as small as possible, and run on 2
procs. That makes everything obvious. I guarantee
    you, there are no bugs in this code. This is an understanding issue.

   Matt


> 0 0 0 0 0 0
> -1 0 1 0 0  0
> 0 -1 0 1 0 0
> 0 0 -1 0 1 0
> 0 0 0 -1 0 1
> 0 0 0 0 0 0
>
> Where the first and last row will be set later for BC. This works
> perfectly fine in both sequencial and GHOSTED, but fails with NONE - see
> the attached output files, which is simply from MatView on a 12x10 grid
> (the 0th and 11th columns will be ghostpoints).
> NOTHING has been changed between the two runs, but notice the spurious
> generation of elements in the middle of every (grid)row, ie. In row
> 6,18,30, etc. where the point in the middle of the (grid)row is connected
> to the next (grid)row - notice that the mpi division is exactly between 6
> and 7, 18 and 19, 30 and 31 and so on, which makes me suspect that there is
> a connection to the MPI communication.
>
> Is there a logical explanation for this? It looks like a bug to me, but
> then, I haven't quite understood what the difference between GHOSTED and
> NONE is.
>
> ---
> yours sincerily
> Frederik Treue
>
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111205/357b50d3/attachment.htm>


More information about the petsc-users mailing list