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

Treue, Frederik frtr at risoe.dtu.dk
Mon Dec 5 11:55:05 CST 2011


>   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.
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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: NONEout
Type: application/octet-stream
Size: 10470 bytes
Desc: NONEout
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111205/7dbed5d7/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GHOSTout
Type: application/octet-stream
Size: 10380 bytes
Desc: GHOSTout
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111205/7dbed5d7/attachment-0003.obj>


More information about the petsc-users mailing list